From 1da40b0bf07319bdb2e9a89f8d7d6ecfbc638952 Mon Sep 17 00:00:00 2001
From: ArenBabikian
Date: Sat, 16 Feb 2019 15:45:14 -0500
Subject: Integrate queries partially #19
---
.../.classpath | 1 +
.../.project | 6 +
.../META-INF/MANIFEST.MF | 34 +-
.../build.properties | 4 +-
.../configurations/ecore.vsconfig | 5 +-
.../configurations/fam.vsconfig | 4 +-
.../configurations/fileSystem.vsconfig | 4 +-
.../configurations/yakindu.vsconfig | 6 +-
.../metamodels/fam.ecore | 4 +-
.../metamodels/filesystem.ecore | 2 +-
.../outputs/fam/debug/errors.txt | 114 +
.../fam/debug/generated3valued.vql_deactivated | 32522 +++++++++++++++++++
.../outputs/fam/debug/generation.logicproblem | 2 +-
.../outputs/fam/debug/problem.als | 203 +
.../outputs/fam/log.txt | 2 +-
.../outputs/fam/models/1.gml | 6779 ++++
.../outputs/fam/models/1.png | Bin 141462 -> 159195 bytes
.../outputs/fam/models/1.xmi | 13 +-
.../outputs/fam/models/2.gml | 6874 ++++
.../outputs/fam/models/2.png | Bin 151601 -> 177546 bytes
.../outputs/fam/models/2.xmi | 13 +-
.../outputs/fam/models/3.gml | 5613 ++++
.../outputs/fam/models/3.png | Bin 157309 -> 177661 bytes
.../outputs/fam/models/3.xmi | 13 +-
.../outputs/fam/models/4.gml | 1136 +
.../outputs/fam/models/4.png | Bin 162587 -> 189772 bytes
.../outputs/fam/models/4.xmi | 11 +-
.../outputs/fam/models/5.gml | 1155 +
.../outputs/fam/models/5.png | Bin 168585 -> 194199 bytes
.../outputs/fam/models/5.xmi | 11 +-
.../outputs/fam/statistics.csv | 16 +
.../outputs/yakindu/debug/errors.txt | 54 +
.../yakindu/debug/generated3valued.vql_deactivated | 23532 ++++++++++++++
.../outputs/yakindu/debug/generation.logicproblem | 277 +-
.../outputs/yakindu/debug/init.partialmodel | 47 +-
.../outputs/yakindu/log.txt | 2 +-
.../outputs/yakindu/models/1.gml | 4304 +++
.../outputs/yakindu/models/1.png | Bin 30880 -> 33827 bytes
.../outputs/yakindu/models/1.xmi | 16 +-
.../outputs/yakindu/models/2.gml | 3692 +++
.../outputs/yakindu/models/2.png | Bin 36094 -> 29697 bytes
.../outputs/yakindu/models/2.xmi | 15 +-
.../outputs/yakindu/statistics.csv | 20 +
.../plugin.xml | 168 +-
.../test/ecore/queries/ecorePatterns.vql | 29 +
.../standalone/test/fam/queries/famPatterns.vql | 103 +
.../test/filesystem/queries/FileSystemPatterns.vql | 24 +
.../yakindu/queries/yakinduMutatedPatterns.vql | 270 +
.../test/yakindu/queries/yakinduPatterns.vql | 227 +
.../standalone/test/ecore/queries/.gitignore | 13 +
.../standalone/test/fam/queries/.gitignore | 10 +
.../test/fam/queries/TerminatorAndInformation.java | 747 +
.../standalone/test/fam/queries/Type.java | 770 +
.../standalone/test/filesystem/queries/.gitignore | 9 +
.../standalone/test/yakindu/queries/.gitignore | 158 +
.../standalone/test/yakindu/queries/Child.java | 721 +
.../test/yakindu/queries/ChoiceHasNoIncoming.java | 551 +
.../test/yakindu/queries/ChoiceHasNoOutgoing.java | 559 +
.../test/yakindu/queries/EntryInRegion.java | 702 +
.../queries/HasMultipleIncomingTrainsition.java | 549 +
.../queries/HasMultipleOutgoingTrainsition.java | 549 +
.../test/yakindu/queries/HasMultipleRegions.java | 555 +
.../test/yakindu/queries/IncomingToEntry.java | 703 +
.../queries/MultipleTransitionFromEntry.java | 827 +
.../test/yakindu/queries/NoEntryInRegion.java | 550 +
.../queries/NoOutgoingTransitionFromEntry.java | 551 +
.../test/yakindu/queries/NoStateInRegion.java | 558 +
.../yakindu/queries/NotSynchronizingStates.java | 554 +
.../test/yakindu/queries/OutgoingFromExit.java | 715 +
.../test/yakindu/queries/OutgoingFromFinal.java | 715 +
.../test/yakindu/queries/StateInRegion.java | 694 +
.../test/yakindu/queries/SynchHasNoIncoming.java | 551 +
.../test/yakindu/queries/SynchHasNoOutgoing.java | 559 +
.../test/yakindu/queries/SynchThree.java | 639 +
.../queries/SynchronizedIncomingInSameRegion.java | 888 +
...nchronizedRegionDoesNotHaveMultipleRegions.java | 744 +
.../queries/SynchronizedRegionsAreNotSiblings.java | 902 +
.../test/yakindu/queries/Transition.java | 808 +
.../standalone/test/yakindu/queries/TwoSynch.java | 714 +
.../standalone/test/ecore/queries/Ecore.vql | 29 -
.../dslreasoner/standalone/test/fam/Function.java | 2 +-
.../standalone/test/fam/FunctionalElement.java | 2 +-
.../standalone/test/fam/impl/famPackageImpl.java | 4 +-
.../standalone/test/fam/queries/famPatterns.vql | 103 -
.../test/filesystem/queries/FileSystem.vql | 24 -
.../yakindu/queries/yakinduMutatedPatterns.vql | 270 -
.../test/yakindu/queries/yakinduPatterns.vql | 227 -
87 files changed, 104682 insertions(+), 871 deletions(-)
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/problem.als
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/ecorePatterns.vql
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystemPatterns.vql
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduMutatedPatterns.vql
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/.gitignore
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/.gitignore
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/TerminatorAndInformation.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/Type.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/.gitignore
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/.gitignore
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/Child.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/ChoiceHasNoIncoming.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/ChoiceHasNoOutgoing.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/EntryInRegion.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleIncomingTrainsition.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleOutgoingTrainsition.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleRegions.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/IncomingToEntry.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/MultipleTransitionFromEntry.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoEntryInRegion.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoOutgoingTransitionFromEntry.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoStateInRegion.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NotSynchronizingStates.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/OutgoingFromExit.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/OutgoingFromFinal.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/StateInRegion.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchHasNoIncoming.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchHasNoOutgoing.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchThree.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchronizedIncomingInSameRegion.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchronizedRegionDoesNotHaveMultipleRegions.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchronizedRegionsAreNotSiblings.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/Transition.java
create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/TwoSynch.java
delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql
delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql
delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql
delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduMutatedPatterns.vql
delete mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.classpath b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.classpath
index d8bd95f6..dbb1533f 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.classpath
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.classpath
@@ -1,6 +1,7 @@
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.project b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.project
index c2212771..279c4d65 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.project
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.project
@@ -5,6 +5,11 @@
+
+ org.eclipse.xtext.ui.shared.xtextBuilder
+
+
+
org.eclipse.viatra.query.tooling.ui.projectbuilder
@@ -30,5 +35,6 @@
org.eclipse.pde.PluginNature
org.eclipse.jdt.core.javanature
org.eclipse.viatra.query.projectnature
+ org.eclipse.xtext.ui.shared.xtextNature
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/META-INF/MANIFEST.MF b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/META-INF/MANIFEST.MF
index ca7ad11c..61135ac9 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/META-INF/MANIFEST.MF
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/META-INF/MANIFEST.MF
@@ -6,22 +6,26 @@ Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
-Export-Package: ca.mcgill.ecse.dslreasoner.standalone.test.fam,
- ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl,
- ca.mcgill.ecse.dslreasoner.standalone.test.fam.util,
- ca.mcgill.ecse.dslreasoner.standalone.test.yakindu,
- ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl,
- ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.util,
- ca.mcgill.ecse.dslreasoner.standalone.test.filesystem,
- ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl,
- ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.util
+Export-Package: ca.mcgill.ecse.dslreasoner.standalone.test.ecore.queries,
+ ca.mcgill.ecse.dslreasoner.standalone.test.fam,
+ ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl,
+ ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries,
+ ca.mcgill.ecse.dslreasoner.standalone.test.fam.util,
+ ca.mcgill.ecse.dslreasoner.standalone.test.filesystem,
+ ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl,
+ ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries,
+ ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.util,
+ ca.mcgill.ecse.dslreasoner.standalone.test.yakindu,
+ ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl,
+ ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries,
+ ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.util
Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime,
- org.eclipse.core.runtime;bundle-version="3.13.0",
- org.eclipse.emf.ecore;bundle-version="2.13.0";visibility:=reexport,
- org.eclipse.viatra.query.runtime;bundle-version="2.1.0",
- org.eclipse.viatra.query.runtime.rete;bundle-version="2.1.0",
- org.eclipse.viatra.query.runtime.localsearch;bundle-version="2.1.0",
- org.eclipse.xtext.xbase.lib;bundle-version="2.12.0"
+ org.eclipse.core.runtime;bundle-version="3.13.0",
+ org.eclipse.emf.ecore;bundle-version="2.13.0";visibility:=reexport,
+ org.eclipse.viatra.query.runtime;bundle-version="2.1.0",
+ org.eclipse.viatra.query.runtime.rete;bundle-version="2.1.0",
+ org.eclipse.viatra.query.runtime.localsearch;bundle-version="2.1.0",
+ org.eclipse.xtext.xbase.lib;bundle-version="2.12.0"
Import-Package: org.apache.log4j
Automatic-Module-Name: ca.mcgill.ecse.dslreasoner.standalone.test
Bundle-ActivationPolicy: lazy
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/build.properties b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/build.properties
index 8ae35ddd..876d970c 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/build.properties
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/build.properties
@@ -3,5 +3,7 @@ bin.includes = META-INF/,\
plugin.properties
jars.compile.order = .
-source.. = src/
+source.. = src/,\
+ src-gen/,\
+ queries/
output.. = bin/
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/ecore.vsconfig b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/ecore.vsconfig
index e5873211..9360ab61 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/ecore.vsconfig
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/ecore.vsconfig
@@ -1,4 +1,5 @@
import epackage "http://www.eclipse.org/emf/2002/Ecore"
+import viatra "ca.mcgill.ecse.dslreasoner.standalone.test.ecore.queries.EcorePatterns"
metamodel allSupported { package ecore excluding {
EClassifier.instanceClass,EClassifier.defaultValue,EEnumLiteral.instance,EStructuralFeature.defaultValue,
@@ -9,7 +10,7 @@ metamodel allSupported { package ecore excluding {
generate {
metamodel = allSupported
- //constraints = { ... }
+// constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.ecore.queries}
partial-model = { "platform:/resource/Ecore-Plugin/InitialPackage.ecore" }
solver = ViatraSolver
scope = {
@@ -23,7 +24,7 @@ generate {
log-level = normal
}
- number = 5
+ number = 3
runs = 1
debug = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug"
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fam.vsconfig b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fam.vsconfig
index f4f29089..d376dce8 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fam.vsconfig
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fam.vsconfig
@@ -1,9 +1,9 @@
import epackage "FamMetamodel"
-//import viatra "ca.mcgill.ecse.dslreasoner.standalone.test.queries.fam.FamPatterns"
+import viatra "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.FamPatterns"
generate {
metamodel = { package fam }
-// constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.xyz }
+ constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries}
partial-model = { "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/famInstance.xmi"}
solver = ViatraSolver
scope = {
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fileSystem.vsconfig b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fileSystem.vsconfig
index 64775e8d..0e510a55 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fileSystem.vsconfig
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fileSystem.vsconfig
@@ -1,9 +1,9 @@
import epackage "FileSystemMetamodel"
-//import viatra ""
+import viatra "ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries.FileSystemPatterns"
generate {
metamodel = { package filesystem }
-// constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.xyz }
+ constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries}
partial-model = { "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/filesystemInstance.xmi"}
solver = ViatraSolver
scope = {
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/yakindu.vsconfig b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/yakindu.vsconfig
index 246337de..423bf80e 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/yakindu.vsconfig
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/yakindu.vsconfig
@@ -1,13 +1,13 @@
import epackage "YakinduMetamodel"
-//import viatra ""
+import viatra "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.YakinduPatterns"
generate {
metamodel = { package yakindu }
-// constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.xyz }
+ constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries }
partial-model = { "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/yakinduInstance.xmi"}
solver = ViatraSolver
scope = {
- #node = 5
+ #node = 6
}
config = {
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.ecore b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.ecore
index 498e9838..d9c8bfef 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.ecore
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.ecore
@@ -10,7 +10,7 @@
-
+
-
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.ecore b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.ecore
index 3dd2061b..8952cfb5 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.ecore
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.ecore
@@ -10,7 +10,7 @@
-
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt
index 94b0f4e3..e96fe7c5 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt
@@ -192,4 +192,118 @@ Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalo
hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339)
hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (NullPointerException):
+ hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.lambda$8(QueryLoader.java:108)
+ org.eclipse.xtext.xbase.lib.internal.BooleanFunctionDelegate.apply(BooleanFunctionDelegate.java:41)
+ com.google.common.collect.Iterators$6.computeNext(Iterators.java:617)
+ com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)
+ com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)
+ com.google.common.collect.Iterators.addAll(Iterators.java:366)
+ com.google.common.collect.Iterables.addAll(Iterables.java:332)
+ com.google.common.collect.Sets.newLinkedHashSet(Sets.java:383)
+ org.eclipse.xtext.xbase.lib.IterableExtensions.toSet(IterableExtensions.java:592)
+ hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader._getPatterns(QueryLoader.java:84)
+ hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.getPatterns(QueryLoader.java:213)
+ hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.loadQueries(QueryLoader.java:54)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:167)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (UnsupportedOperationException): Can not transform pattern "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type"! Reason: Unknown constant type: class ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.transformPattern(RelationDefinitionIndexer.java:205)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.generateRelationDefinitions(RelationDefinitionIndexer.java:66)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator.transformBaseProperties(PatternGenerator.java:423)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider.generateQueries(PatternProvider.java:59)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider.createModelGenerationMethod(ModelGenerationMethodProvider.java:57)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner.solve(ViatraReasoner.java:96)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:316)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (UnsupportedOperationException): Can not transform pattern "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type"! Reason: Unknown constant type: class ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.transformPattern(RelationDefinitionIndexer.java:205)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.generateRelationDefinitions(RelationDefinitionIndexer.java:66)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator.transformBaseProperties(PatternGenerator.java:423)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider.generateQueries(PatternProvider.java:59)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider.createModelGenerationMethod(ModelGenerationMethodProvider.java:57)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner.solve(ViatraReasoner.java:96)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:316)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (UnsupportedOperationException): Can not transform pattern "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type"! Reason: Unknown constant type: class ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.transformPattern(RelationDefinitionIndexer.java:205)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.generateRelationDefinitions(RelationDefinitionIndexer.java:66)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator.transformBaseProperties(PatternGenerator.java:423)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider.generateQueries(PatternProvider.java:59)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider.createModelGenerationMethod(ModelGenerationMethodProvider.java:57)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner.solve(ViatraReasoner.java:96)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:316)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (UnsupportedOperationException): Can not transform pattern "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type"! Reason: Unknown constant type: class ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.transformPattern(RelationDefinitionIndexer.java:205)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.generateRelationDefinitions(RelationDefinitionIndexer.java:66)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator.transformBaseProperties(PatternGenerator.java:423)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider.generateQueries(PatternProvider.java:59)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider.createModelGenerationMethod(ModelGenerationMethodProvider.java:57)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner.solve(ViatraReasoner.java:96)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:316)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (NullPointerException):
+ hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.Alloy2LogicMapper.transformOutput(Alloy2LogicMapper.java:53)
+ hu.bme.mit.inf.dlsreasoner.alloy.reasoner.AlloySolver.solve(AlloySolver.java:66)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:316)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:132)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:343)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (UnsupportedOperationException): Can not transform pattern "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type"! Reason: Unknown constant type: class ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.transformPattern(RelationDefinitionIndexer.java:205)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.generateRelationDefinitions(RelationDefinitionIndexer.java:66)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator.transformBaseProperties(PatternGenerator.java:423)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider.generateQueries(PatternProvider.java:59)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider.createModelGenerationMethod(ModelGenerationMethodProvider.java:57)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner.solve(ViatraReasoner.java:96)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:316)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:132)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:343)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (UnsupportedOperationException): Can not transform pattern "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type"! Reason: Unknown constant type: class ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.transformPattern(RelationDefinitionIndexer.java:205)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.RelationDefinitionIndexer.generateRelationDefinitions(RelationDefinitionIndexer.java:66)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator.transformBaseProperties(PatternGenerator.java:423)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider.generateQueries(PatternProvider.java:59)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider.createModelGenerationMethod(ModelGenerationMethodProvider.java:57)
+ hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner.solve(ViatraReasoner.java:96)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:316)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:132)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:343)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalArgumentException): Unable to translate query "ca.mcgill.ecse.dslreasoner.standalone.test.ecore.queries.oppositeDifferentClass".
+Reason: IllegalArgumentException, Inconsistent types: [EStructuralFeature class, EModelElement class, ENamedElement class, EReference class, EObject class, ETypedElement class]
+ hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:166)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:132)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:343)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalArgumentException): Unable to translate query "ca.mcgill.ecse.dslreasoner.standalone.test.ecore.queries.oppositeDifferentClass".
+Reason: IllegalArgumentException, Inconsistent types: [EStructuralFeature class, EModelElement class, ENamedElement class, EReference class, EObject class, ETypedElement class]
+ hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:166)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:132)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:343)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
\ No newline at end of file
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated
index 88497c64..f02c64b0 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated
@@ -31731,3 +31731,32525 @@ pattern refineRelation_value_attribute_EStringToStringMapEntry(
find mayInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
neg find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "FunctionalElement class".
+ */
+private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalElement class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalElement class".
+ */
+private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalArchitectureModel class".
+ */
+private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalArchitectureModel class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalArchitectureModel class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalArchitectureModel class".
+ */
+private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Function class".
+ */
+private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Function class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Function class");
+}
+
+/**
+ * An element may be an instance of type "Function class".
+ */
+private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunction_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunction_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunction_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FAMTerminator class".
+ */
+private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FAMTerminator class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FAMTerminator class");
+}
+
+/**
+ * An element may be an instance of type "FAMTerminator class".
+ */
+private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "InformationLink class".
+ */
+private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"InformationLink class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"InformationLink class");
+}
+
+/**
+ * An element may be an instance of type "InformationLink class".
+ */
+private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewInformationLink_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewInformationLink_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfInformationLink_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalInterface class".
+ */
+private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalInterface class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalInterface class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalInterface class".
+ */
+private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalInput class".
+ */
+private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalInput class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalInput class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalInput class".
+ */
+private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalOutput class".
+ */
+private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalOutput class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalOutput class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalOutput class".
+ */
+private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalData class".
+ */
+private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalData class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalData class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalData class".
+ */
+private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalData_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalData_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionType enum".
+ */
+private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionType enum");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionType enum");
+}
+
+/**
+ * An element may be an instance of type "FunctionType enum".
+ */
+private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart".
+ */
+private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalArchitectureModel class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalArchitectureModel class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart".
+ */
+private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart".
+ */
+private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalArchitectureModel class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalArchitectureModel class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart".
+ */
+private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target)
+ */
+private pattern mustInRelationinterface_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target)
+ */
+private pattern mayInRelationinterface_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []model reference FunctionalElement(source,target)
+ */
+private pattern mustInRelationmodel_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target)
+ */
+private pattern mayInRelationmodel_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target)
+ */
+private pattern mustInRelationparent_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target)
+ */
+private pattern mayInRelationparent_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,source);
+ find mayInstanceOfFunction_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target)
+ */
+private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target)
+ */
+private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []subElements reference Function(source,target)
+ */
+private pattern mustInRelationsubElements_reference_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>subElements reference Function(source,target)
+ */
+private pattern mayInRelationsubElements_reference_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunction_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationsubElements_reference_Function(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []data reference FAMTerminator(source,target)
+ */
+private pattern mustInRelationdata_reference_FAMTerminator(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target)
+ */
+private pattern mayInRelationdata_reference_FAMTerminator(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalData_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []from reference InformationLink(source,target)
+ */
+private pattern mustInRelationfrom_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>from reference InformationLink(source,target)
+ */
+private pattern mayInRelationfrom_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfInformationLink_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []to reference InformationLink(source,target)
+ */
+private pattern mustInRelationto_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>to reference InformationLink(source,target)
+ */
+private pattern mayInRelationto_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfInformationLink_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationto_reference_InformationLink(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target)
+ */
+private pattern mustInRelationdata_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target)
+ */
+private pattern mayInRelationdata_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalData_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target)
+ */
+private pattern mustInRelationelement_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target)
+ */
+private pattern mayInRelationelement_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target)
+ */
+private pattern mustInRelationIncomingLinks_reference_FunctionalInput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target)
+ */
+private pattern mayInRelationIncomingLinks_reference_FunctionalInput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,source);
+ find mayInstanceOfInformationLink_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+} or {
+ find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target)
+ */
+private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target)
+ */
+private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,source);
+ find mayInstanceOfInformationLink_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target)
+ */
+private pattern mustInRelationterminator_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target)
+ */
+private pattern mayInRelationterminator_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalData_class(problem,interpretation,source);
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []interface reference FunctionalData(source,target)
+ */
+private pattern mustInRelationinterface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target)
+ */
+private pattern mayInRelationinterface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalData_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []type attribute Function(source,target)
+ */
+private pattern mustInRelationtype_attribute_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>type attribute Function(source,target)
+ */
+private pattern mayInRelationtype_attribute_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunction_class(problem,interpretation,source);
+ find mayInstanceOfFunctionType_enum(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtype_attribute_Function(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or
+
+ { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or
+
+ { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or
+
+ { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or
+
+ { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement");
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink");
+ find mustInstanceOfInformationLink_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function");
+ find mustInstanceOfFunction_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalInput_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFAMTerminator_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunction_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfInformationLink_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalOutput_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalData_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalInterface_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface");
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,container);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject);
+ find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalInterface_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class");
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink");
+ find mustInstanceOfFunctionalOutput_class(problem,interpretation,container);
+ find mayInstanceOfInformationLink_class(problem,interpretation,newObject);
+ find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_InformationLink_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class");
+ find mayInstanceOfInformationLink_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator");
+ find mustInstanceOfFunctionalData_class(problem,interpretation,container);
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject);
+ find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FAMTerminator_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class");
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData");
+ find mustInstanceOfFunctionalInterface_class(problem,interpretation,container);
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject);
+ find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalInput_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class");
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalArchitectureModel_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart");
+ find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel");
+ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container);
+ find mayInstanceOfFunction_class(problem,interpretation,newObject);
+ find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement");
+ find mustInstanceOfFunction_class(problem,interpretation,container);
+ find mayInstanceOfFunction_class(problem,interpretation,newObject);
+ find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Function_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class");
+ find mayInstanceOfFunction_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData");
+ find mustInstanceOfFunctionalInterface_class(problem,interpretation,container);
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject);
+ find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalOutput_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class");
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+}
+pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_model_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,from);
+ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to);
+ find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to);
+ neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to);
+}
+pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput");
+ PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFunctionalInput_class(problem,interpretation,from);
+ find mustInstanceOfInformationLink_class(problem,interpretation,to);
+ find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to);
+ neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to);
+}
+pattern refineRelation_type_attribute_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFunction_class(problem,interpretation,from);
+ find mustInstanceOfFunctionType_enum(problem,interpretation,to);
+ find mayInRelationtype_attribute_Function(problem,interpretation,from,to);
+ neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "FunctionalElement class".
+ */
+private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalElement class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalElement class".
+ */
+private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalArchitectureModel class".
+ */
+private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalArchitectureModel class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalArchitectureModel class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalArchitectureModel class".
+ */
+private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Function class".
+ */
+private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Function class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Function class");
+}
+
+/**
+ * An element may be an instance of type "Function class".
+ */
+private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunction_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunction_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunction_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FAMTerminator class".
+ */
+private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FAMTerminator class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FAMTerminator class");
+}
+
+/**
+ * An element may be an instance of type "FAMTerminator class".
+ */
+private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "InformationLink class".
+ */
+private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"InformationLink class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"InformationLink class");
+}
+
+/**
+ * An element may be an instance of type "InformationLink class".
+ */
+private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewInformationLink_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewInformationLink_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfInformationLink_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalInterface class".
+ */
+private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalInterface class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalInterface class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalInterface class".
+ */
+private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalInput class".
+ */
+private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalInput class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalInput class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalInput class".
+ */
+private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalOutput class".
+ */
+private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalOutput class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalOutput class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalOutput class".
+ */
+private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalData class".
+ */
+private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalData class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalData class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalData class".
+ */
+private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalData_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalData_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionType enum".
+ */
+private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionType enum");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionType enum");
+}
+
+/**
+ * An element may be an instance of type "FunctionType enum".
+ */
+private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart".
+ */
+private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalArchitectureModel class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalArchitectureModel class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart".
+ */
+private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart".
+ */
+private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalArchitectureModel class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalArchitectureModel class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart".
+ */
+private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target)
+ */
+private pattern mustInRelationinterface_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target)
+ */
+private pattern mayInRelationinterface_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []model reference FunctionalElement(source,target)
+ */
+private pattern mustInRelationmodel_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target)
+ */
+private pattern mayInRelationmodel_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target)
+ */
+private pattern mustInRelationparent_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target)
+ */
+private pattern mayInRelationparent_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,source);
+ find mayInstanceOfFunction_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target)
+ */
+private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target)
+ */
+private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []subElements reference Function(source,target)
+ */
+private pattern mustInRelationsubElements_reference_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>subElements reference Function(source,target)
+ */
+private pattern mayInRelationsubElements_reference_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunction_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationsubElements_reference_Function(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []data reference FAMTerminator(source,target)
+ */
+private pattern mustInRelationdata_reference_FAMTerminator(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target)
+ */
+private pattern mayInRelationdata_reference_FAMTerminator(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalData_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []from reference InformationLink(source,target)
+ */
+private pattern mustInRelationfrom_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>from reference InformationLink(source,target)
+ */
+private pattern mayInRelationfrom_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfInformationLink_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []to reference InformationLink(source,target)
+ */
+private pattern mustInRelationto_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>to reference InformationLink(source,target)
+ */
+private pattern mayInRelationto_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfInformationLink_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationto_reference_InformationLink(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target)
+ */
+private pattern mustInRelationdata_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target)
+ */
+private pattern mayInRelationdata_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalData_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target)
+ */
+private pattern mustInRelationelement_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target)
+ */
+private pattern mayInRelationelement_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target)
+ */
+private pattern mustInRelationIncomingLinks_reference_FunctionalInput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target)
+ */
+private pattern mayInRelationIncomingLinks_reference_FunctionalInput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,source);
+ find mayInstanceOfInformationLink_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+} or {
+ find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target)
+ */
+private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target)
+ */
+private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,source);
+ find mayInstanceOfInformationLink_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target)
+ */
+private pattern mustInRelationterminator_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target)
+ */
+private pattern mayInRelationterminator_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalData_class(problem,interpretation,source);
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []interface reference FunctionalData(source,target)
+ */
+private pattern mustInRelationinterface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target)
+ */
+private pattern mayInRelationinterface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalData_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []type attribute Function(source,target)
+ */
+private pattern mustInRelationtype_attribute_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>type attribute Function(source,target)
+ */
+private pattern mayInRelationtype_attribute_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunction_class(problem,interpretation,source);
+ find mayInstanceOfFunctionType_enum(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtype_attribute_Function(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or
+
+ { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or
+
+ { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or
+
+ { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or
+
+ { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement");
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink");
+ find mustInstanceOfInformationLink_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function");
+ find mustInstanceOfFunction_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalInput_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFAMTerminator_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunction_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfInformationLink_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalOutput_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalData_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalInterface_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface");
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,container);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject);
+ find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalInterface_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class");
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData");
+ find mustInstanceOfFunctionalInterface_class(problem,interpretation,container);
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject);
+ find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalOutput_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class");
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalArchitectureModel_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart");
+ find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink");
+ find mustInstanceOfFunctionalOutput_class(problem,interpretation,container);
+ find mayInstanceOfInformationLink_class(problem,interpretation,newObject);
+ find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_InformationLink_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class");
+ find mayInstanceOfInformationLink_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel");
+ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container);
+ find mayInstanceOfFunction_class(problem,interpretation,newObject);
+ find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement");
+ find mustInstanceOfFunction_class(problem,interpretation,container);
+ find mayInstanceOfFunction_class(problem,interpretation,newObject);
+ find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Function_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class");
+ find mayInstanceOfFunction_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData");
+ find mustInstanceOfFunctionalInterface_class(problem,interpretation,container);
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject);
+ find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalInput_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class");
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator");
+ find mustInstanceOfFunctionalData_class(problem,interpretation,container);
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject);
+ find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FAMTerminator_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class");
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+}
+pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_model_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,from);
+ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to);
+ find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to);
+ neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to);
+}
+pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput");
+ PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFunctionalInput_class(problem,interpretation,from);
+ find mustInstanceOfInformationLink_class(problem,interpretation,to);
+ find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to);
+ neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to);
+}
+pattern refineRelation_type_attribute_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFunction_class(problem,interpretation,from);
+ find mustInstanceOfFunctionType_enum(problem,interpretation,to);
+ find mayInRelationtype_attribute_Function(problem,interpretation,from,to);
+ neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "EAttribute class".
+ */
+private pattern mustInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EAttribute class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EAttribute class");
+}
+
+/**
+ * An element may be an instance of type "EAttribute class".
+ */
+private pattern mayInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAttribute_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAttribute_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEAttribute_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EAnnotation class".
+ */
+private pattern mustInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EAnnotation class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EAnnotation class");
+}
+
+/**
+ * An element may be an instance of type "EAnnotation class".
+ */
+private pattern mayInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAnnotation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAnnotation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEAnnotation_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EClass class".
+ */
+private pattern mustInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EClass class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEClass_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EClass class");
+}
+
+/**
+ * An element may be an instance of type "EClass class".
+ */
+private pattern mayInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClass_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClass_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEClass_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EClassifier class".
+ */
+private pattern mustInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EClassifier class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EClassifier class");
+}
+
+/**
+ * An element may be an instance of type "EClassifier class".
+ */
+private pattern mayInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClassifier_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClassifier_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEClassifier_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EDataType class".
+ */
+private pattern mustInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EDataType class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EDataType class");
+}
+
+/**
+ * An element may be an instance of type "EDataType class".
+ */
+private pattern mayInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEDataType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEDataType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEDataType_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EEnum class".
+ */
+private pattern mustInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EEnum class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EEnum class");
+}
+
+/**
+ * An element may be an instance of type "EEnum class".
+ */
+private pattern mayInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnum_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnum_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEEnum_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EEnumLiteral class".
+ */
+private pattern mustInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EEnumLiteral class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EEnumLiteral class");
+}
+
+/**
+ * An element may be an instance of type "EEnumLiteral class".
+ */
+private pattern mayInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class".
+ */
+private pattern mustInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class".
+ */
+private pattern mayInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEModelElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class".
+ */
+private pattern mustInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class".
+ */
+private pattern mayInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfENamedElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EObject class".
+ */
+private pattern mustInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EObject class");
+}
+
+/**
+ * An element may be an instance of type "EObject class".
+ */
+private pattern mayInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EOperation class".
+ */
+private pattern mustInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EOperation class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EOperation class");
+}
+
+/**
+ * An element may be an instance of type "EOperation class".
+ */
+private pattern mayInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEOperation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEOperation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEOperation_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class".
+ */
+private pattern mustInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class");
+}
+
+/**
+ * An element may be an instance of type "EPackage class".
+ */
+private pattern mayInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEPackage_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EParameter class".
+ */
+private pattern mustInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EParameter class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EParameter class");
+}
+
+/**
+ * An element may be an instance of type "EParameter class".
+ */
+private pattern mayInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEParameter_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EReference class".
+ */
+private pattern mustInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EReference class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEReference_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EReference class");
+}
+
+/**
+ * An element may be an instance of type "EReference class".
+ */
+private pattern mayInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEReference_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEReference_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEReference_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EStructuralFeature class".
+ */
+private pattern mustInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EStructuralFeature class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EStructuralFeature class");
+}
+
+/**
+ * An element may be an instance of type "EStructuralFeature class".
+ */
+private pattern mayInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ETypedElement class".
+ */
+private pattern mustInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ETypedElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ETypedElement class");
+}
+
+/**
+ * An element may be an instance of type "ETypedElement class".
+ */
+private pattern mayInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfETypedElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EStringToStringMapEntry class".
+ */
+private pattern mustInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EStringToStringMapEntry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EStringToStringMapEntry class");
+}
+
+/**
+ * An element may be an instance of type "EStringToStringMapEntry class".
+ */
+private pattern mayInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EGenericType class".
+ */
+private pattern mustInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EGenericType class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EGenericType class");
+}
+
+/**
+ * An element may be an instance of type "EGenericType class".
+ */
+private pattern mayInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEGenericType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEGenericType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEGenericType_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ETypeParameter class".
+ */
+private pattern mustInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ETypeParameter class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ETypeParameter class");
+}
+
+/**
+ * An element may be an instance of type "ETypeParameter class".
+ */
+private pattern mayInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypeParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypeParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfETypeParameter_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class DefinedPart".
+ */
+private pattern mustInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class DefinedPart".
+ */
+private pattern mayInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class UndefinedPart".
+ */
+private pattern mustInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class UndefinedPart".
+ */
+private pattern mayInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class DefinedPart".
+ */
+private pattern mustInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class DefinedPart".
+ */
+private pattern mayInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class UndefinedPart".
+ */
+private pattern mustInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class UndefinedPart".
+ */
+private pattern mayInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class DefinedPart".
+ */
+private pattern mustInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EPackage class DefinedPart".
+ */
+private pattern mayInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class UndefinedPart".
+ */
+private pattern mustInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EPackage class UndefinedPart".
+ */
+private pattern mayInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []eAttributeType reference EAttribute(source,target)
+ */
+private pattern mustInRelationeAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAttributeType reference EAttribute(source,target)
+ */
+private pattern mayInRelationeAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAttribute_class(problem,interpretation,source);
+ find mayInstanceOfEDataType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []details reference EAnnotation(source,target)
+ */
+private pattern mustInRelationdetails_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"details reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>details reference EAnnotation(source,target)
+ */
+private pattern mayInRelationdetails_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eModelElement reference EAnnotation(source,target)
+ */
+private pattern mustInRelationeModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eModelElement reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eModelElement reference EAnnotation(source,target)
+ */
+private pattern mayInRelationeModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEModelElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference EAnnotation(source,target)
+ */
+private pattern mustInRelationcontents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference EAnnotation(source,target)
+ */
+private pattern mayInRelationcontents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []references reference EAnnotation(source,target)
+ */
+private pattern mustInRelationreferences_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>references reference EAnnotation(source,target)
+ */
+private pattern mayInRelationreferences_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEObject_class(problem,interpretation,target);
+} or {
+ find mustInRelationreferences_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+} or {
+ find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOperations reference EClass(source,target)
+ */
+private pattern mustInRelationeOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperations reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOperations reference EClass(source,target)
+ */
+private pattern mayInRelationeOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllAttributes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllAttributes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllReferences reference EClass(source,target)
+ */
+private pattern mustInRelationeAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllReferences reference EClass(source,target)
+ */
+private pattern mayInRelationeAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllReferences_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eReferences reference EClass(source,target)
+ */
+private pattern mustInRelationeReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eReferences reference EClass(source,target)
+ */
+private pattern mayInRelationeReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeReferences_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAttributes reference EClass(source,target)
+ */
+private pattern mustInRelationeAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAttributes reference EClass(source,target)
+ */
+private pattern mayInRelationeAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAttributes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllContainments reference EClass(source,target)
+ */
+private pattern mustInRelationeAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllContainments reference EClass(source,target)
+ */
+private pattern mayInRelationeAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllContainments_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllOperations reference EClass(source,target)
+ */
+private pattern mustInRelationeAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllOperations reference EClass(source,target)
+ */
+private pattern mayInRelationeAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllOperations_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllStructuralFeatures reference EClass(source,target)
+ */
+private pattern mustInRelationeAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllStructuralFeatures reference EClass(source,target)
+ */
+private pattern mayInRelationeAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eIDAttribute reference EClass(source,target)
+ */
+private pattern mustInRelationeIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eIDAttribute reference EClass(source,target)
+ */
+private pattern mayInRelationeIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eStructuralFeatures reference EClass(source,target)
+ */
+private pattern mustInRelationeStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eStructuralFeatures reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eStructuralFeatures reference EClass(source,target)
+ */
+private pattern mayInRelationeStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []ePackage reference EClassifier(source,target)
+ */
+private pattern mustInRelationePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ePackage reference EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>ePackage reference EClassifier(source,target)
+ */
+private pattern mayInRelationePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameters reference EClassifier(source,target)
+ */
+private pattern mustInRelationeTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameters reference EClassifier(source,target)
+ */
+private pattern mayInRelationeTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eLiterals reference EEnum(source,target)
+ */
+private pattern mustInRelationeLiterals_reference_EEnum(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLiterals reference EEnum");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eLiterals reference EEnum(source,target)
+ */
+private pattern mayInRelationeLiterals_reference_EEnum(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnum_class(problem,interpretation,source);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eEnum reference EEnumLiteral(source,target)
+ */
+private pattern mustInRelationeEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eEnum reference EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eEnum reference EEnumLiteral(source,target)
+ */
+private pattern mayInRelationeEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ find mayInstanceOfEEnum_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAnnotations reference EModelElement(source,target)
+ */
+private pattern mustInRelationeAnnotations_reference_EModelElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAnnotations reference EModelElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAnnotations reference EModelElement(source,target)
+ */
+private pattern mayInRelationeAnnotations_reference_EModelElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEModelElement_class(problem,interpretation,source);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eContainingClass reference EOperation(source,target)
+ */
+private pattern mustInRelationeContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eContainingClass reference EOperation(source,target)
+ */
+private pattern mayInRelationeContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameters reference EOperation(source,target)
+ */
+private pattern mustInRelationeTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameters reference EOperation(source,target)
+ */
+private pattern mayInRelationeTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eParameters reference EOperation(source,target)
+ */
+private pattern mustInRelationeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eParameters reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eParameters reference EOperation(source,target)
+ */
+private pattern mayInRelationeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEParameter_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eExceptions reference EOperation(source,target)
+ */
+private pattern mustInRelationeExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eExceptions reference EOperation(source,target)
+ */
+private pattern mayInRelationeExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+} or {
+ find mustInRelationeExceptions_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericExceptions reference EOperation(source,target)
+ */
+private pattern mustInRelationeGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericExceptions reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericExceptions reference EOperation(source,target)
+ */
+private pattern mayInRelationeGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eClassifiers reference EPackage(source,target)
+ */
+private pattern mustInRelationeClassifiers_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifiers reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eClassifiers reference EPackage(source,target)
+ */
+private pattern mayInRelationeClassifiers_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSubpackages reference EPackage(source,target)
+ */
+private pattern mustInRelationeSubpackages_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSubpackages reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSubpackages reference EPackage(source,target)
+ */
+private pattern mayInRelationeSubpackages_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSuperPackage reference EPackage(source,target)
+ */
+private pattern mustInRelationeSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperPackage reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSuperPackage reference EPackage(source,target)
+ */
+private pattern mayInRelationeSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOperation reference EParameter(source,target)
+ */
+private pattern mustInRelationeOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperation reference EParameter");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOperation reference EParameter(source,target)
+ */
+private pattern mayInRelationeOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEParameter_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOpposite reference EReference(source,target)
+ */
+private pattern mustInRelationeOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOpposite reference EReference(source,target)
+ */
+private pattern mayInRelationeOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eReferenceType reference EReference(source,target)
+ */
+private pattern mustInRelationeReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eReferenceType reference EReference(source,target)
+ */
+private pattern mayInRelationeReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eKeys reference EReference(source,target)
+ */
+private pattern mustInRelationeKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eKeys reference EReference(source,target)
+ */
+private pattern mayInRelationeKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeKeys_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eContainingClass reference EStructuralFeature(source,target)
+ */
+private pattern mustInRelationeContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eContainingClass reference EStructuralFeature(source,target)
+ */
+private pattern mayInRelationeContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eType reference ETypedElement(source,target)
+ */
+private pattern mustInRelationeType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eType reference ETypedElement(source,target)
+ */
+private pattern mayInRelationeType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericType reference ETypedElement(source,target)
+ */
+private pattern mustInRelationeGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericType reference ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericType reference ETypedElement(source,target)
+ */
+private pattern mayInRelationeGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eUpperBound reference EGenericType(source,target)
+ */
+private pattern mustInRelationeUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eUpperBound reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eUpperBound reference EGenericType(source,target)
+ */
+private pattern mayInRelationeUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeArguments reference EGenericType(source,target)
+ */
+private pattern mustInRelationeTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeArguments reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeArguments reference EGenericType(source,target)
+ */
+private pattern mayInRelationeTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eRawType reference EGenericType(source,target)
+ */
+private pattern mustInRelationeRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eRawType reference EGenericType(source,target)
+ */
+private pattern mayInRelationeRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eLowerBound reference EGenericType(source,target)
+ */
+private pattern mustInRelationeLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLowerBound reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eLowerBound reference EGenericType(source,target)
+ */
+private pattern mayInRelationeLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameter reference EGenericType(source,target)
+ */
+private pattern mustInRelationeTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameter reference EGenericType(source,target)
+ */
+private pattern mayInRelationeTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eClassifier reference EGenericType(source,target)
+ */
+private pattern mustInRelationeClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eClassifier reference EGenericType(source,target)
+ */
+private pattern mayInRelationeClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eBounds reference ETypeParameter(source,target)
+ */
+private pattern mustInRelationeBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eBounds reference ETypeParameter");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eBounds reference ETypeParameter(source,target)
+ */
+private pattern mayInRelationeBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypeParameter_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []iD attribute EAttribute(source,target)
+ */
+private pattern mustInRelationiD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>iD attribute EAttribute(source,target)
+ */
+private pattern mayInRelationiD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAttribute_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source attribute EAnnotation(source,target)
+ */
+private pattern mustInRelationsource_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source attribute EAnnotation(source,target)
+ */
+private pattern mayInRelationsource_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []abstract attribute EClass(source,target)
+ */
+private pattern mustInRelationabstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>abstract attribute EClass(source,target)
+ */
+private pattern mayInRelationabstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationabstract_attribute_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationabstract_attribute_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []interface attribute EClass(source,target)
+ */
+private pattern mustInRelationinterface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface attribute EClass(source,target)
+ */
+private pattern mayInRelationinterface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_attribute_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinterface_attribute_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []instanceClassName attribute EClassifier(source,target)
+ */
+private pattern mustInRelationinstanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>instanceClassName attribute EClassifier(source,target)
+ */
+private pattern mayInRelationinstanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []instanceTypeName attribute EClassifier(source,target)
+ */
+private pattern mustInRelationinstanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>instanceTypeName attribute EClassifier(source,target)
+ */
+private pattern mayInRelationinstanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []serializable attribute EDataType(source,target)
+ */
+private pattern mustInRelationserializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>serializable attribute EDataType(source,target)
+ */
+private pattern mayInRelationserializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEDataType_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []value attribute EEnumLiteral(source,target)
+ */
+private pattern mustInRelationvalue_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>value attribute EEnumLiteral(source,target)
+ */
+private pattern mayInRelationvalue_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []literal attribute EEnumLiteral(source,target)
+ */
+private pattern mustInRelationliteral_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>literal attribute EEnumLiteral(source,target)
+ */
+private pattern mayInRelationliteral_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []name attribute ENamedElement(source,target)
+ */
+private pattern mustInRelationname_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>name attribute ENamedElement(source,target)
+ */
+private pattern mayInRelationname_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfENamedElement_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []nsURI attribute EPackage(source,target)
+ */
+private pattern mustInRelationnsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>nsURI attribute EPackage(source,target)
+ */
+private pattern mayInRelationnsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []nsPrefix attribute EPackage(source,target)
+ */
+private pattern mustInRelationnsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>nsPrefix attribute EPackage(source,target)
+ */
+private pattern mayInRelationnsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []containment attribute EReference(source,target)
+ */
+private pattern mustInRelationcontainment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>containment attribute EReference(source,target)
+ */
+private pattern mayInRelationcontainment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []container attribute EReference(source,target)
+ */
+private pattern mustInRelationcontainer_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>container attribute EReference(source,target)
+ */
+private pattern mayInRelationcontainer_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []resolveProxies attribute EReference(source,target)
+ */
+private pattern mustInRelationresolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>resolveProxies attribute EReference(source,target)
+ */
+private pattern mayInRelationresolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []changeable attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationchangeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>changeable attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationchangeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []volatile attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationvolatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>volatile attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationvolatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []transient attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationtransient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>transient attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationtransient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []defaultValueLiteral attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>defaultValueLiteral attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []unsettable attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationunsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>unsettable attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationunsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []derived attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationderived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>derived attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationderived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []ordered attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>ordered attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []unique attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationunique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>unique attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationunique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []lowerBound attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationlowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>lowerBound attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationlowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []upperBound attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationupperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>upperBound attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationupperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []many attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationmany_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>many attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationmany_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []required attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationrequired_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>required attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationrequired_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []key attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mustInRelationkey_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>key attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mayInRelationkey_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []value attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mustInRelationvalue_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>value attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mayInRelationvalue_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target); }or
+
+ { find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target); }or
+
+ { find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target); }or
+
+ { find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_eAttributeType_reference_EAttribute(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ find mustInstanceOfEAttribute_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_eReferenceType_reference_EReference(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ find mustInstanceOfEReference_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_eRawType_reference_EGenericType(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfETypeParameter_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfETypedElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEClass_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEAttribute_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEClassifier_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEGenericType_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEDataType_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEOperation_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEParameter_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEReference_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEEnum_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_EAnnotation_class_by_eAnnotations_reference_EModelElement_with_eModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eAnnotations reference EModelElement");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eModelElement reference EAnnotation");
+ find mustInstanceOfEModelElement_class(problem,interpretation,container);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,newObject);
+ find mayInRelationeAnnotations_reference_EModelElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAnnotation_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class");
+ find mayInstanceOfEAnnotation_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EClass_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEClass_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EClass_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class");
+ find mayInstanceOfEClass_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnum_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEEnum_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnum_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class");
+ find mayInstanceOfEEnum_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EReference_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEReference_class(problem,interpretation,newObject);
+ find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EReference_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class");
+ find mayInstanceOfEReference_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EOperation_class_by_eOperations_reference_EClass_with_eContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eOperations reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EOperation");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEOperation_class(problem,interpretation,newObject);
+ find mayInRelationeOperations_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EOperation_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class");
+ find mayInstanceOfEOperation_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EClassifier");
+ find mustInstanceOfEClassifier_class(problem,interpretation,container);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayInRelationeTypeParameters_reference_EClassifier(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EOperation");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayInRelationeTypeParameters_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EPackage_class_UndefinedPart_by_eSubpackages_reference_EPackage_with_eSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eSubpackages reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eSuperPackage reference EPackage");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject);
+ find mayInRelationeSubpackages_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EPackage_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart");
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EStringToStringMapEntry_class_by_details_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"details reference EAnnotation");
+ find mustInstanceOfEAnnotation_class(problem,interpretation,container);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject);
+ find mayInRelationdetails_reference_EAnnotation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EStringToStringMapEntry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class");
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EObject_class_by_contents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference EAnnotation");
+ find mustInstanceOfEAnnotation_class(problem,interpretation,container);
+ find mayInstanceOfEObject_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_EAnnotation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EObject_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class");
+ find mayInstanceOfEObject_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericSuperTypes reference EClass");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericExceptions reference EOperation");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericExceptions_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericType reference ETypedElement");
+ find mustInstanceOfETypedElement_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericType_reference_ETypedElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eUpperBound reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeUpperBound_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeArguments reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeTypeArguments_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLowerBound reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeLowerBound_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eBounds reference ETypeParameter");
+ find mustInstanceOfETypeParameter_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeBounds_reference_ETypeParameter(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EParameter_class_by_eParameters_reference_EOperation_with_eOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eParameters reference EOperation");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eOperation reference EParameter");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfEParameter_class(problem,interpretation,newObject);
+ find mayInRelationeParameters_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EParameter_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class");
+ find mayInstanceOfEParameter_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAttribute_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEAttribute_class(problem,interpretation,newObject);
+ find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAttribute_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class");
+ find mayInstanceOfEAttribute_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnumLiteral_class_by_eLiterals_reference_EEnum_with_eEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLiterals reference EEnum");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eEnum reference EEnumLiteral");
+ find mustInstanceOfEEnum_class(problem,interpretation,container);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject);
+ find mayInRelationeLiterals_reference_EEnum(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnumLiteral_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class");
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EDataType_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEDataType_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EDataType_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class");
+ find mayInstanceOfEDataType_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_EAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+}
+pattern refineTypeTo_ETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_eAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAttribute_class(problem,interpretation,from);
+ find mustInstanceOfEDataType_class(problem,interpretation,to);
+ find mayInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to);
+ neg find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to);
+}
+pattern refineRelation_references_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,from);
+ find mustInstanceOfEObject_class(problem,interpretation,to);
+ find mayInRelationreferences_reference_EAnnotation(problem,interpretation,from,to);
+ neg find mustInRelationreferences_reference_EAnnotation(problem,interpretation,from,to);
+}
+pattern refineRelation_eSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeAllReferences_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllReferences_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeReferences_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeReferences_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeAttributes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAttributes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeAllContainments_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllContainments_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEOperation_class(problem,interpretation,to);
+ find mayInRelationeAllOperations_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllOperations_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,to);
+ find mayInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEGenericType_class(problem,interpretation,to);
+ find mayInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEOperation_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeExceptions_reference_EOperation(problem,interpretation,from,to);
+ neg find mustInRelationeExceptions_reference_EOperation(problem,interpretation,from,to);
+}
+pattern refineRelation_eOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeOpposite_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeOpposite_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeReferenceType_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeReferenceType_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeKeys_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeKeys_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeType_reference_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationeType_reference_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_eRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeRawType_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeRawType_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_eTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfETypeParameter_class(problem,interpretation,to);
+ find mayInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_eClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_iD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAttribute_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationiD_attribute_EAttribute(problem,interpretation,from,to);
+ neg find mustInRelationiD_attribute_EAttribute(problem,interpretation,from,to);
+}
+pattern refineRelation_source_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationsource_attribute_EAnnotation(problem,interpretation,from,to);
+ neg find mustInRelationsource_attribute_EAnnotation(problem,interpretation,from,to);
+}
+pattern refineRelation_abstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationabstract_attribute_EClass(problem,interpretation,from,to);
+ neg find mustInRelationabstract_attribute_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_interface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationinterface_attribute_EClass(problem,interpretation,from,to);
+ neg find mustInRelationinterface_attribute_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_instanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClassifier_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to);
+ neg find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to);
+}
+pattern refineRelation_instanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClassifier_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to);
+ neg find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to);
+}
+pattern refineRelation_serializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEDataType_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationserializable_attribute_EDataType(problem,interpretation,from,to);
+ neg find mustInRelationserializable_attribute_EDataType(problem,interpretation,from,to);
+}
+pattern refineRelation_value_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to);
+ neg find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to);
+}
+pattern refineRelation_literal_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to);
+ neg find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to);
+}
+pattern refineRelation_name_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfENamedElement_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationname_attribute_ENamedElement(problem,interpretation,from,to);
+ neg find mustInRelationname_attribute_ENamedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_nsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEPackage_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationnsURI_attribute_EPackage(problem,interpretation,from,to);
+ neg find mustInRelationnsURI_attribute_EPackage(problem,interpretation,from,to);
+}
+pattern refineRelation_nsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEPackage_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to);
+ neg find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to);
+}
+pattern refineRelation_containment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationcontainment_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationcontainment_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_container_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationcontainer_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationcontainer_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_resolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_changeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_volatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_transient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_defaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_unsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_derived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_ordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationordered_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationordered_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_unique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationunique_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationunique_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_lowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_upperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_many_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationmany_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationmany_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_required_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_key_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+ neg find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+}
+pattern refineRelation_value_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+ neg find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "EAttribute class".
+ */
+private pattern mustInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EAttribute class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EAttribute class");
+}
+
+/**
+ * An element may be an instance of type "EAttribute class".
+ */
+private pattern mayInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAttribute_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAttribute_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEAttribute_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EAnnotation class".
+ */
+private pattern mustInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EAnnotation class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EAnnotation class");
+}
+
+/**
+ * An element may be an instance of type "EAnnotation class".
+ */
+private pattern mayInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAnnotation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAnnotation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEAnnotation_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EClass class".
+ */
+private pattern mustInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EClass class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEClass_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EClass class");
+}
+
+/**
+ * An element may be an instance of type "EClass class".
+ */
+private pattern mayInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClass_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClass_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEClass_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EClassifier class".
+ */
+private pattern mustInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EClassifier class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EClassifier class");
+}
+
+/**
+ * An element may be an instance of type "EClassifier class".
+ */
+private pattern mayInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClassifier_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClassifier_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEClassifier_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EDataType class".
+ */
+private pattern mustInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EDataType class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EDataType class");
+}
+
+/**
+ * An element may be an instance of type "EDataType class".
+ */
+private pattern mayInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEDataType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEDataType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEDataType_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EEnum class".
+ */
+private pattern mustInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EEnum class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EEnum class");
+}
+
+/**
+ * An element may be an instance of type "EEnum class".
+ */
+private pattern mayInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnum_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnum_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEEnum_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EEnumLiteral class".
+ */
+private pattern mustInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EEnumLiteral class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EEnumLiteral class");
+}
+
+/**
+ * An element may be an instance of type "EEnumLiteral class".
+ */
+private pattern mayInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class".
+ */
+private pattern mustInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class".
+ */
+private pattern mayInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEModelElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class".
+ */
+private pattern mustInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class".
+ */
+private pattern mayInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfENamedElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EObject class".
+ */
+private pattern mustInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EObject class");
+}
+
+/**
+ * An element may be an instance of type "EObject class".
+ */
+private pattern mayInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EOperation class".
+ */
+private pattern mustInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EOperation class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EOperation class");
+}
+
+/**
+ * An element may be an instance of type "EOperation class".
+ */
+private pattern mayInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEOperation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEOperation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEOperation_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class".
+ */
+private pattern mustInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class");
+}
+
+/**
+ * An element may be an instance of type "EPackage class".
+ */
+private pattern mayInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEPackage_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EParameter class".
+ */
+private pattern mustInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EParameter class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EParameter class");
+}
+
+/**
+ * An element may be an instance of type "EParameter class".
+ */
+private pattern mayInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEParameter_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EReference class".
+ */
+private pattern mustInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EReference class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEReference_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EReference class");
+}
+
+/**
+ * An element may be an instance of type "EReference class".
+ */
+private pattern mayInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEReference_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEReference_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEReference_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EStructuralFeature class".
+ */
+private pattern mustInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EStructuralFeature class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EStructuralFeature class");
+}
+
+/**
+ * An element may be an instance of type "EStructuralFeature class".
+ */
+private pattern mayInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ETypedElement class".
+ */
+private pattern mustInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ETypedElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ETypedElement class");
+}
+
+/**
+ * An element may be an instance of type "ETypedElement class".
+ */
+private pattern mayInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfETypedElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EStringToStringMapEntry class".
+ */
+private pattern mustInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EStringToStringMapEntry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EStringToStringMapEntry class");
+}
+
+/**
+ * An element may be an instance of type "EStringToStringMapEntry class".
+ */
+private pattern mayInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EGenericType class".
+ */
+private pattern mustInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EGenericType class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EGenericType class");
+}
+
+/**
+ * An element may be an instance of type "EGenericType class".
+ */
+private pattern mayInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEGenericType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEGenericType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEGenericType_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ETypeParameter class".
+ */
+private pattern mustInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ETypeParameter class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ETypeParameter class");
+}
+
+/**
+ * An element may be an instance of type "ETypeParameter class".
+ */
+private pattern mayInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypeParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypeParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfETypeParameter_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class DefinedPart".
+ */
+private pattern mustInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class DefinedPart".
+ */
+private pattern mayInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class UndefinedPart".
+ */
+private pattern mustInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class UndefinedPart".
+ */
+private pattern mayInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class DefinedPart".
+ */
+private pattern mustInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class DefinedPart".
+ */
+private pattern mayInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class UndefinedPart".
+ */
+private pattern mustInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class UndefinedPart".
+ */
+private pattern mayInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class DefinedPart".
+ */
+private pattern mustInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EPackage class DefinedPart".
+ */
+private pattern mayInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class UndefinedPart".
+ */
+private pattern mustInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EPackage class UndefinedPart".
+ */
+private pattern mayInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []eAttributeType reference EAttribute(source,target)
+ */
+private pattern mustInRelationeAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAttributeType reference EAttribute(source,target)
+ */
+private pattern mayInRelationeAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAttribute_class(problem,interpretation,source);
+ find mayInstanceOfEDataType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []details reference EAnnotation(source,target)
+ */
+private pattern mustInRelationdetails_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"details reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>details reference EAnnotation(source,target)
+ */
+private pattern mayInRelationdetails_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eModelElement reference EAnnotation(source,target)
+ */
+private pattern mustInRelationeModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eModelElement reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eModelElement reference EAnnotation(source,target)
+ */
+private pattern mayInRelationeModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEModelElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference EAnnotation(source,target)
+ */
+private pattern mustInRelationcontents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference EAnnotation(source,target)
+ */
+private pattern mayInRelationcontents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []references reference EAnnotation(source,target)
+ */
+private pattern mustInRelationreferences_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>references reference EAnnotation(source,target)
+ */
+private pattern mayInRelationreferences_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEObject_class(problem,interpretation,target);
+} or {
+ find mustInRelationreferences_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+} or {
+ find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOperations reference EClass(source,target)
+ */
+private pattern mustInRelationeOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperations reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOperations reference EClass(source,target)
+ */
+private pattern mayInRelationeOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllAttributes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllAttributes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllReferences reference EClass(source,target)
+ */
+private pattern mustInRelationeAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllReferences reference EClass(source,target)
+ */
+private pattern mayInRelationeAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllReferences_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eReferences reference EClass(source,target)
+ */
+private pattern mustInRelationeReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eReferences reference EClass(source,target)
+ */
+private pattern mayInRelationeReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeReferences_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAttributes reference EClass(source,target)
+ */
+private pattern mustInRelationeAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAttributes reference EClass(source,target)
+ */
+private pattern mayInRelationeAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAttributes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllContainments reference EClass(source,target)
+ */
+private pattern mustInRelationeAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllContainments reference EClass(source,target)
+ */
+private pattern mayInRelationeAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllContainments_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllOperations reference EClass(source,target)
+ */
+private pattern mustInRelationeAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllOperations reference EClass(source,target)
+ */
+private pattern mayInRelationeAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllOperations_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllStructuralFeatures reference EClass(source,target)
+ */
+private pattern mustInRelationeAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllStructuralFeatures reference EClass(source,target)
+ */
+private pattern mayInRelationeAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eIDAttribute reference EClass(source,target)
+ */
+private pattern mustInRelationeIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eIDAttribute reference EClass(source,target)
+ */
+private pattern mayInRelationeIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eStructuralFeatures reference EClass(source,target)
+ */
+private pattern mustInRelationeStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eStructuralFeatures reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eStructuralFeatures reference EClass(source,target)
+ */
+private pattern mayInRelationeStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []ePackage reference EClassifier(source,target)
+ */
+private pattern mustInRelationePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ePackage reference EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>ePackage reference EClassifier(source,target)
+ */
+private pattern mayInRelationePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameters reference EClassifier(source,target)
+ */
+private pattern mustInRelationeTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameters reference EClassifier(source,target)
+ */
+private pattern mayInRelationeTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eLiterals reference EEnum(source,target)
+ */
+private pattern mustInRelationeLiterals_reference_EEnum(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLiterals reference EEnum");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eLiterals reference EEnum(source,target)
+ */
+private pattern mayInRelationeLiterals_reference_EEnum(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnum_class(problem,interpretation,source);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eEnum reference EEnumLiteral(source,target)
+ */
+private pattern mustInRelationeEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eEnum reference EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eEnum reference EEnumLiteral(source,target)
+ */
+private pattern mayInRelationeEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ find mayInstanceOfEEnum_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAnnotations reference EModelElement(source,target)
+ */
+private pattern mustInRelationeAnnotations_reference_EModelElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAnnotations reference EModelElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAnnotations reference EModelElement(source,target)
+ */
+private pattern mayInRelationeAnnotations_reference_EModelElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEModelElement_class(problem,interpretation,source);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eContainingClass reference EOperation(source,target)
+ */
+private pattern mustInRelationeContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eContainingClass reference EOperation(source,target)
+ */
+private pattern mayInRelationeContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameters reference EOperation(source,target)
+ */
+private pattern mustInRelationeTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameters reference EOperation(source,target)
+ */
+private pattern mayInRelationeTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eParameters reference EOperation(source,target)
+ */
+private pattern mustInRelationeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eParameters reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eParameters reference EOperation(source,target)
+ */
+private pattern mayInRelationeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEParameter_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eExceptions reference EOperation(source,target)
+ */
+private pattern mustInRelationeExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eExceptions reference EOperation(source,target)
+ */
+private pattern mayInRelationeExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+} or {
+ find mustInRelationeExceptions_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericExceptions reference EOperation(source,target)
+ */
+private pattern mustInRelationeGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericExceptions reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericExceptions reference EOperation(source,target)
+ */
+private pattern mayInRelationeGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eClassifiers reference EPackage(source,target)
+ */
+private pattern mustInRelationeClassifiers_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifiers reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eClassifiers reference EPackage(source,target)
+ */
+private pattern mayInRelationeClassifiers_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSubpackages reference EPackage(source,target)
+ */
+private pattern mustInRelationeSubpackages_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSubpackages reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSubpackages reference EPackage(source,target)
+ */
+private pattern mayInRelationeSubpackages_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSuperPackage reference EPackage(source,target)
+ */
+private pattern mustInRelationeSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperPackage reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSuperPackage reference EPackage(source,target)
+ */
+private pattern mayInRelationeSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOperation reference EParameter(source,target)
+ */
+private pattern mustInRelationeOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperation reference EParameter");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOperation reference EParameter(source,target)
+ */
+private pattern mayInRelationeOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEParameter_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOpposite reference EReference(source,target)
+ */
+private pattern mustInRelationeOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOpposite reference EReference(source,target)
+ */
+private pattern mayInRelationeOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eReferenceType reference EReference(source,target)
+ */
+private pattern mustInRelationeReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eReferenceType reference EReference(source,target)
+ */
+private pattern mayInRelationeReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eKeys reference EReference(source,target)
+ */
+private pattern mustInRelationeKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eKeys reference EReference(source,target)
+ */
+private pattern mayInRelationeKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeKeys_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eContainingClass reference EStructuralFeature(source,target)
+ */
+private pattern mustInRelationeContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eContainingClass reference EStructuralFeature(source,target)
+ */
+private pattern mayInRelationeContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eType reference ETypedElement(source,target)
+ */
+private pattern mustInRelationeType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eType reference ETypedElement(source,target)
+ */
+private pattern mayInRelationeType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericType reference ETypedElement(source,target)
+ */
+private pattern mustInRelationeGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericType reference ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericType reference ETypedElement(source,target)
+ */
+private pattern mayInRelationeGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eUpperBound reference EGenericType(source,target)
+ */
+private pattern mustInRelationeUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eUpperBound reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eUpperBound reference EGenericType(source,target)
+ */
+private pattern mayInRelationeUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeArguments reference EGenericType(source,target)
+ */
+private pattern mustInRelationeTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeArguments reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeArguments reference EGenericType(source,target)
+ */
+private pattern mayInRelationeTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eRawType reference EGenericType(source,target)
+ */
+private pattern mustInRelationeRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eRawType reference EGenericType(source,target)
+ */
+private pattern mayInRelationeRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eLowerBound reference EGenericType(source,target)
+ */
+private pattern mustInRelationeLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLowerBound reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eLowerBound reference EGenericType(source,target)
+ */
+private pattern mayInRelationeLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameter reference EGenericType(source,target)
+ */
+private pattern mustInRelationeTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameter reference EGenericType(source,target)
+ */
+private pattern mayInRelationeTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eClassifier reference EGenericType(source,target)
+ */
+private pattern mustInRelationeClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eClassifier reference EGenericType(source,target)
+ */
+private pattern mayInRelationeClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eBounds reference ETypeParameter(source,target)
+ */
+private pattern mustInRelationeBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eBounds reference ETypeParameter");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eBounds reference ETypeParameter(source,target)
+ */
+private pattern mayInRelationeBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypeParameter_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []iD attribute EAttribute(source,target)
+ */
+private pattern mustInRelationiD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>iD attribute EAttribute(source,target)
+ */
+private pattern mayInRelationiD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAttribute_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source attribute EAnnotation(source,target)
+ */
+private pattern mustInRelationsource_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source attribute EAnnotation(source,target)
+ */
+private pattern mayInRelationsource_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []abstract attribute EClass(source,target)
+ */
+private pattern mustInRelationabstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>abstract attribute EClass(source,target)
+ */
+private pattern mayInRelationabstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationabstract_attribute_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationabstract_attribute_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []interface attribute EClass(source,target)
+ */
+private pattern mustInRelationinterface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface attribute EClass(source,target)
+ */
+private pattern mayInRelationinterface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_attribute_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinterface_attribute_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []instanceClassName attribute EClassifier(source,target)
+ */
+private pattern mustInRelationinstanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>instanceClassName attribute EClassifier(source,target)
+ */
+private pattern mayInRelationinstanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []instanceTypeName attribute EClassifier(source,target)
+ */
+private pattern mustInRelationinstanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>instanceTypeName attribute EClassifier(source,target)
+ */
+private pattern mayInRelationinstanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []serializable attribute EDataType(source,target)
+ */
+private pattern mustInRelationserializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>serializable attribute EDataType(source,target)
+ */
+private pattern mayInRelationserializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEDataType_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []value attribute EEnumLiteral(source,target)
+ */
+private pattern mustInRelationvalue_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>value attribute EEnumLiteral(source,target)
+ */
+private pattern mayInRelationvalue_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []literal attribute EEnumLiteral(source,target)
+ */
+private pattern mustInRelationliteral_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>literal attribute EEnumLiteral(source,target)
+ */
+private pattern mayInRelationliteral_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []name attribute ENamedElement(source,target)
+ */
+private pattern mustInRelationname_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>name attribute ENamedElement(source,target)
+ */
+private pattern mayInRelationname_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfENamedElement_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []nsURI attribute EPackage(source,target)
+ */
+private pattern mustInRelationnsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>nsURI attribute EPackage(source,target)
+ */
+private pattern mayInRelationnsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []nsPrefix attribute EPackage(source,target)
+ */
+private pattern mustInRelationnsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>nsPrefix attribute EPackage(source,target)
+ */
+private pattern mayInRelationnsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []containment attribute EReference(source,target)
+ */
+private pattern mustInRelationcontainment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>containment attribute EReference(source,target)
+ */
+private pattern mayInRelationcontainment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []container attribute EReference(source,target)
+ */
+private pattern mustInRelationcontainer_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>container attribute EReference(source,target)
+ */
+private pattern mayInRelationcontainer_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []resolveProxies attribute EReference(source,target)
+ */
+private pattern mustInRelationresolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>resolveProxies attribute EReference(source,target)
+ */
+private pattern mayInRelationresolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []changeable attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationchangeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>changeable attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationchangeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []volatile attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationvolatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>volatile attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationvolatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []transient attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationtransient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>transient attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationtransient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []defaultValueLiteral attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>defaultValueLiteral attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []unsettable attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationunsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>unsettable attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationunsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []derived attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationderived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>derived attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationderived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []ordered attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>ordered attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []unique attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationunique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>unique attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationunique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []lowerBound attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationlowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>lowerBound attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationlowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []upperBound attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationupperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>upperBound attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationupperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []many attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationmany_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>many attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationmany_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []required attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationrequired_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>required attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationrequired_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []key attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mustInRelationkey_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>key attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mayInRelationkey_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []value attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mustInRelationvalue_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>value attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mayInRelationvalue_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target); }or
+
+ { find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target); }or
+
+ { find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target); }or
+
+ { find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_eAttributeType_reference_EAttribute(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ find mustInstanceOfEAttribute_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_eReferenceType_reference_EReference(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ find mustInstanceOfEReference_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_eRawType_reference_EGenericType(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfETypeParameter_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfETypedElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEClass_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEAttribute_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEClassifier_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEGenericType_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEDataType_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEOperation_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEParameter_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEReference_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEEnum_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_EEnum_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEEnum_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnum_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class");
+ find mayInstanceOfEEnum_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAttribute_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEAttribute_class(problem,interpretation,newObject);
+ find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAttribute_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class");
+ find mayInstanceOfEAttribute_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EObject_class_by_contents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference EAnnotation");
+ find mustInstanceOfEAnnotation_class(problem,interpretation,container);
+ find mayInstanceOfEObject_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_EAnnotation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EObject_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class");
+ find mayInstanceOfEObject_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EReference_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEReference_class(problem,interpretation,newObject);
+ find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EReference_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class");
+ find mayInstanceOfEReference_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EPackage_class_UndefinedPart_by_eSubpackages_reference_EPackage_with_eSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eSubpackages reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eSuperPackage reference EPackage");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject);
+ find mayInRelationeSubpackages_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EPackage_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart");
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAnnotation_class_by_eAnnotations_reference_EModelElement_with_eModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eAnnotations reference EModelElement");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eModelElement reference EAnnotation");
+ find mustInstanceOfEModelElement_class(problem,interpretation,container);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,newObject);
+ find mayInRelationeAnnotations_reference_EModelElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAnnotation_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class");
+ find mayInstanceOfEAnnotation_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EParameter_class_by_eParameters_reference_EOperation_with_eOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eParameters reference EOperation");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eOperation reference EParameter");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfEParameter_class(problem,interpretation,newObject);
+ find mayInRelationeParameters_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EParameter_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class");
+ find mayInstanceOfEParameter_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EDataType_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEDataType_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EDataType_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class");
+ find mayInstanceOfEDataType_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EOperation_class_by_eOperations_reference_EClass_with_eContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eOperations reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EOperation");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEOperation_class(problem,interpretation,newObject);
+ find mayInRelationeOperations_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EOperation_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class");
+ find mayInstanceOfEOperation_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EStringToStringMapEntry_class_by_details_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"details reference EAnnotation");
+ find mustInstanceOfEAnnotation_class(problem,interpretation,container);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject);
+ find mayInRelationdetails_reference_EAnnotation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EStringToStringMapEntry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class");
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnumLiteral_class_by_eLiterals_reference_EEnum_with_eEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLiterals reference EEnum");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eEnum reference EEnumLiteral");
+ find mustInstanceOfEEnum_class(problem,interpretation,container);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject);
+ find mayInRelationeLiterals_reference_EEnum(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnumLiteral_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class");
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EClass_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEClass_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EClass_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class");
+ find mayInstanceOfEClass_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EClassifier");
+ find mustInstanceOfEClassifier_class(problem,interpretation,container);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayInRelationeTypeParameters_reference_EClassifier(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EOperation");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayInRelationeTypeParameters_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericSuperTypes reference EClass");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericExceptions reference EOperation");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericExceptions_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericType reference ETypedElement");
+ find mustInstanceOfETypedElement_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericType_reference_ETypedElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eUpperBound reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeUpperBound_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeArguments reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeTypeArguments_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLowerBound reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeLowerBound_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eBounds reference ETypeParameter");
+ find mustInstanceOfETypeParameter_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeBounds_reference_ETypeParameter(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_EEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_ETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_eAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAttribute_class(problem,interpretation,from);
+ find mustInstanceOfEDataType_class(problem,interpretation,to);
+ find mayInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to);
+ neg find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to);
+}
+pattern refineRelation_references_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,from);
+ find mustInstanceOfEObject_class(problem,interpretation,to);
+ find mayInRelationreferences_reference_EAnnotation(problem,interpretation,from,to);
+ neg find mustInRelationreferences_reference_EAnnotation(problem,interpretation,from,to);
+}
+pattern refineRelation_eSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeAllReferences_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllReferences_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeReferences_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeReferences_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeAttributes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAttributes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeAllContainments_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllContainments_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEOperation_class(problem,interpretation,to);
+ find mayInRelationeAllOperations_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllOperations_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,to);
+ find mayInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEGenericType_class(problem,interpretation,to);
+ find mayInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEOperation_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeExceptions_reference_EOperation(problem,interpretation,from,to);
+ neg find mustInRelationeExceptions_reference_EOperation(problem,interpretation,from,to);
+}
+pattern refineRelation_eOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeOpposite_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeOpposite_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeReferenceType_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeReferenceType_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeKeys_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeKeys_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeType_reference_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationeType_reference_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_eRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeRawType_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeRawType_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_eTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfETypeParameter_class(problem,interpretation,to);
+ find mayInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_eClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_iD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAttribute_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationiD_attribute_EAttribute(problem,interpretation,from,to);
+ neg find mustInRelationiD_attribute_EAttribute(problem,interpretation,from,to);
+}
+pattern refineRelation_source_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationsource_attribute_EAnnotation(problem,interpretation,from,to);
+ neg find mustInRelationsource_attribute_EAnnotation(problem,interpretation,from,to);
+}
+pattern refineRelation_abstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationabstract_attribute_EClass(problem,interpretation,from,to);
+ neg find mustInRelationabstract_attribute_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_interface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationinterface_attribute_EClass(problem,interpretation,from,to);
+ neg find mustInRelationinterface_attribute_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_instanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClassifier_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to);
+ neg find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to);
+}
+pattern refineRelation_instanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClassifier_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to);
+ neg find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to);
+}
+pattern refineRelation_serializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEDataType_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationserializable_attribute_EDataType(problem,interpretation,from,to);
+ neg find mustInRelationserializable_attribute_EDataType(problem,interpretation,from,to);
+}
+pattern refineRelation_value_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to);
+ neg find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to);
+}
+pattern refineRelation_literal_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to);
+ neg find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to);
+}
+pattern refineRelation_name_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfENamedElement_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationname_attribute_ENamedElement(problem,interpretation,from,to);
+ neg find mustInRelationname_attribute_ENamedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_nsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEPackage_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationnsURI_attribute_EPackage(problem,interpretation,from,to);
+ neg find mustInRelationnsURI_attribute_EPackage(problem,interpretation,from,to);
+}
+pattern refineRelation_nsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEPackage_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to);
+ neg find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to);
+}
+pattern refineRelation_containment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationcontainment_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationcontainment_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_container_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationcontainer_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationcontainer_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_resolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_changeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_volatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_transient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_defaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_unsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_derived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_ordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationordered_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationordered_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_unique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationunique_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationunique_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_lowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_upperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_many_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationmany_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationmany_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_required_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_key_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+ neg find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+}
+pattern refineRelation_value_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+ neg find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "EAttribute class".
+ */
+private pattern mustInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EAttribute class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EAttribute class");
+}
+
+/**
+ * An element may be an instance of type "EAttribute class".
+ */
+private pattern mayInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAttribute_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAttribute_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEAttribute_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EAnnotation class".
+ */
+private pattern mustInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EAnnotation class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EAnnotation class");
+}
+
+/**
+ * An element may be an instance of type "EAnnotation class".
+ */
+private pattern mayInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAnnotation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAnnotation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEAnnotation_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EClass class".
+ */
+private pattern mustInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EClass class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEClass_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EClass class");
+}
+
+/**
+ * An element may be an instance of type "EClass class".
+ */
+private pattern mayInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClass_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClass_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEClass_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EClassifier class".
+ */
+private pattern mustInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EClassifier class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EClassifier class");
+}
+
+/**
+ * An element may be an instance of type "EClassifier class".
+ */
+private pattern mayInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClassifier_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClassifier_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEClassifier_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EDataType class".
+ */
+private pattern mustInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EDataType class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EDataType class");
+}
+
+/**
+ * An element may be an instance of type "EDataType class".
+ */
+private pattern mayInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEDataType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEDataType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEDataType_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EEnum class".
+ */
+private pattern mustInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EEnum class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EEnum class");
+}
+
+/**
+ * An element may be an instance of type "EEnum class".
+ */
+private pattern mayInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnum_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnum_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEEnum_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EEnumLiteral class".
+ */
+private pattern mustInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EEnumLiteral class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EEnumLiteral class");
+}
+
+/**
+ * An element may be an instance of type "EEnumLiteral class".
+ */
+private pattern mayInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class".
+ */
+private pattern mustInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class".
+ */
+private pattern mayInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEModelElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class".
+ */
+private pattern mustInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class".
+ */
+private pattern mayInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfENamedElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EObject class".
+ */
+private pattern mustInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EObject class");
+}
+
+/**
+ * An element may be an instance of type "EObject class".
+ */
+private pattern mayInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EOperation class".
+ */
+private pattern mustInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EOperation class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EOperation class");
+}
+
+/**
+ * An element may be an instance of type "EOperation class".
+ */
+private pattern mayInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEOperation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEOperation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEOperation_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class".
+ */
+private pattern mustInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class");
+}
+
+/**
+ * An element may be an instance of type "EPackage class".
+ */
+private pattern mayInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEPackage_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EParameter class".
+ */
+private pattern mustInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EParameter class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EParameter class");
+}
+
+/**
+ * An element may be an instance of type "EParameter class".
+ */
+private pattern mayInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEParameter_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EReference class".
+ */
+private pattern mustInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EReference class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEReference_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EReference class");
+}
+
+/**
+ * An element may be an instance of type "EReference class".
+ */
+private pattern mayInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEReference_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEReference_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEReference_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EStructuralFeature class".
+ */
+private pattern mustInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EStructuralFeature class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EStructuralFeature class");
+}
+
+/**
+ * An element may be an instance of type "EStructuralFeature class".
+ */
+private pattern mayInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ETypedElement class".
+ */
+private pattern mustInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ETypedElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ETypedElement class");
+}
+
+/**
+ * An element may be an instance of type "ETypedElement class".
+ */
+private pattern mayInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfETypedElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EStringToStringMapEntry class".
+ */
+private pattern mustInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EStringToStringMapEntry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EStringToStringMapEntry class");
+}
+
+/**
+ * An element may be an instance of type "EStringToStringMapEntry class".
+ */
+private pattern mayInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EGenericType class".
+ */
+private pattern mustInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EGenericType class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EGenericType class");
+}
+
+/**
+ * An element may be an instance of type "EGenericType class".
+ */
+private pattern mayInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEGenericType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEGenericType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEGenericType_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ETypeParameter class".
+ */
+private pattern mustInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ETypeParameter class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ETypeParameter class");
+}
+
+/**
+ * An element may be an instance of type "ETypeParameter class".
+ */
+private pattern mayInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypeParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypeParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfETypeParameter_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class DefinedPart".
+ */
+private pattern mustInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class DefinedPart".
+ */
+private pattern mayInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class UndefinedPart".
+ */
+private pattern mustInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class UndefinedPart".
+ */
+private pattern mayInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class DefinedPart".
+ */
+private pattern mustInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class DefinedPart".
+ */
+private pattern mayInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class UndefinedPart".
+ */
+private pattern mustInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class UndefinedPart".
+ */
+private pattern mayInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class DefinedPart".
+ */
+private pattern mustInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EPackage class DefinedPart".
+ */
+private pattern mayInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class UndefinedPart".
+ */
+private pattern mustInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EPackage class UndefinedPart".
+ */
+private pattern mayInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []eAttributeType reference EAttribute(source,target)
+ */
+private pattern mustInRelationeAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAttributeType reference EAttribute(source,target)
+ */
+private pattern mayInRelationeAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAttribute_class(problem,interpretation,source);
+ find mayInstanceOfEDataType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []details reference EAnnotation(source,target)
+ */
+private pattern mustInRelationdetails_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"details reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>details reference EAnnotation(source,target)
+ */
+private pattern mayInRelationdetails_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eModelElement reference EAnnotation(source,target)
+ */
+private pattern mustInRelationeModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eModelElement reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eModelElement reference EAnnotation(source,target)
+ */
+private pattern mayInRelationeModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEModelElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference EAnnotation(source,target)
+ */
+private pattern mustInRelationcontents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference EAnnotation(source,target)
+ */
+private pattern mayInRelationcontents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []references reference EAnnotation(source,target)
+ */
+private pattern mustInRelationreferences_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>references reference EAnnotation(source,target)
+ */
+private pattern mayInRelationreferences_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEObject_class(problem,interpretation,target);
+} or {
+ find mustInRelationreferences_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+} or {
+ find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOperations reference EClass(source,target)
+ */
+private pattern mustInRelationeOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperations reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOperations reference EClass(source,target)
+ */
+private pattern mayInRelationeOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllAttributes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllAttributes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllReferences reference EClass(source,target)
+ */
+private pattern mustInRelationeAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllReferences reference EClass(source,target)
+ */
+private pattern mayInRelationeAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllReferences_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eReferences reference EClass(source,target)
+ */
+private pattern mustInRelationeReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eReferences reference EClass(source,target)
+ */
+private pattern mayInRelationeReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeReferences_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAttributes reference EClass(source,target)
+ */
+private pattern mustInRelationeAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAttributes reference EClass(source,target)
+ */
+private pattern mayInRelationeAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAttributes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllContainments reference EClass(source,target)
+ */
+private pattern mustInRelationeAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllContainments reference EClass(source,target)
+ */
+private pattern mayInRelationeAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllContainments_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllOperations reference EClass(source,target)
+ */
+private pattern mustInRelationeAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllOperations reference EClass(source,target)
+ */
+private pattern mayInRelationeAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllOperations_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllStructuralFeatures reference EClass(source,target)
+ */
+private pattern mustInRelationeAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllStructuralFeatures reference EClass(source,target)
+ */
+private pattern mayInRelationeAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eIDAttribute reference EClass(source,target)
+ */
+private pattern mustInRelationeIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eIDAttribute reference EClass(source,target)
+ */
+private pattern mayInRelationeIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eStructuralFeatures reference EClass(source,target)
+ */
+private pattern mustInRelationeStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eStructuralFeatures reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eStructuralFeatures reference EClass(source,target)
+ */
+private pattern mayInRelationeStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []ePackage reference EClassifier(source,target)
+ */
+private pattern mustInRelationePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ePackage reference EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>ePackage reference EClassifier(source,target)
+ */
+private pattern mayInRelationePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameters reference EClassifier(source,target)
+ */
+private pattern mustInRelationeTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameters reference EClassifier(source,target)
+ */
+private pattern mayInRelationeTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eLiterals reference EEnum(source,target)
+ */
+private pattern mustInRelationeLiterals_reference_EEnum(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLiterals reference EEnum");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eLiterals reference EEnum(source,target)
+ */
+private pattern mayInRelationeLiterals_reference_EEnum(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnum_class(problem,interpretation,source);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eEnum reference EEnumLiteral(source,target)
+ */
+private pattern mustInRelationeEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eEnum reference EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eEnum reference EEnumLiteral(source,target)
+ */
+private pattern mayInRelationeEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ find mayInstanceOfEEnum_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAnnotations reference EModelElement(source,target)
+ */
+private pattern mustInRelationeAnnotations_reference_EModelElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAnnotations reference EModelElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAnnotations reference EModelElement(source,target)
+ */
+private pattern mayInRelationeAnnotations_reference_EModelElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEModelElement_class(problem,interpretation,source);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eContainingClass reference EOperation(source,target)
+ */
+private pattern mustInRelationeContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eContainingClass reference EOperation(source,target)
+ */
+private pattern mayInRelationeContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameters reference EOperation(source,target)
+ */
+private pattern mustInRelationeTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameters reference EOperation(source,target)
+ */
+private pattern mayInRelationeTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eParameters reference EOperation(source,target)
+ */
+private pattern mustInRelationeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eParameters reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eParameters reference EOperation(source,target)
+ */
+private pattern mayInRelationeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEParameter_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eExceptions reference EOperation(source,target)
+ */
+private pattern mustInRelationeExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eExceptions reference EOperation(source,target)
+ */
+private pattern mayInRelationeExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+} or {
+ find mustInRelationeExceptions_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericExceptions reference EOperation(source,target)
+ */
+private pattern mustInRelationeGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericExceptions reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericExceptions reference EOperation(source,target)
+ */
+private pattern mayInRelationeGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eClassifiers reference EPackage(source,target)
+ */
+private pattern mustInRelationeClassifiers_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifiers reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eClassifiers reference EPackage(source,target)
+ */
+private pattern mayInRelationeClassifiers_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSubpackages reference EPackage(source,target)
+ */
+private pattern mustInRelationeSubpackages_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSubpackages reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSubpackages reference EPackage(source,target)
+ */
+private pattern mayInRelationeSubpackages_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSuperPackage reference EPackage(source,target)
+ */
+private pattern mustInRelationeSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperPackage reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSuperPackage reference EPackage(source,target)
+ */
+private pattern mayInRelationeSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOperation reference EParameter(source,target)
+ */
+private pattern mustInRelationeOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperation reference EParameter");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOperation reference EParameter(source,target)
+ */
+private pattern mayInRelationeOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEParameter_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOpposite reference EReference(source,target)
+ */
+private pattern mustInRelationeOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOpposite reference EReference(source,target)
+ */
+private pattern mayInRelationeOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eReferenceType reference EReference(source,target)
+ */
+private pattern mustInRelationeReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eReferenceType reference EReference(source,target)
+ */
+private pattern mayInRelationeReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eKeys reference EReference(source,target)
+ */
+private pattern mustInRelationeKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eKeys reference EReference(source,target)
+ */
+private pattern mayInRelationeKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeKeys_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eContainingClass reference EStructuralFeature(source,target)
+ */
+private pattern mustInRelationeContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eContainingClass reference EStructuralFeature(source,target)
+ */
+private pattern mayInRelationeContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eType reference ETypedElement(source,target)
+ */
+private pattern mustInRelationeType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eType reference ETypedElement(source,target)
+ */
+private pattern mayInRelationeType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericType reference ETypedElement(source,target)
+ */
+private pattern mustInRelationeGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericType reference ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericType reference ETypedElement(source,target)
+ */
+private pattern mayInRelationeGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eUpperBound reference EGenericType(source,target)
+ */
+private pattern mustInRelationeUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eUpperBound reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eUpperBound reference EGenericType(source,target)
+ */
+private pattern mayInRelationeUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeArguments reference EGenericType(source,target)
+ */
+private pattern mustInRelationeTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeArguments reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeArguments reference EGenericType(source,target)
+ */
+private pattern mayInRelationeTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eRawType reference EGenericType(source,target)
+ */
+private pattern mustInRelationeRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eRawType reference EGenericType(source,target)
+ */
+private pattern mayInRelationeRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eLowerBound reference EGenericType(source,target)
+ */
+private pattern mustInRelationeLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLowerBound reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eLowerBound reference EGenericType(source,target)
+ */
+private pattern mayInRelationeLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameter reference EGenericType(source,target)
+ */
+private pattern mustInRelationeTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameter reference EGenericType(source,target)
+ */
+private pattern mayInRelationeTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eClassifier reference EGenericType(source,target)
+ */
+private pattern mustInRelationeClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eClassifier reference EGenericType(source,target)
+ */
+private pattern mayInRelationeClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eBounds reference ETypeParameter(source,target)
+ */
+private pattern mustInRelationeBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eBounds reference ETypeParameter");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eBounds reference ETypeParameter(source,target)
+ */
+private pattern mayInRelationeBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypeParameter_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []iD attribute EAttribute(source,target)
+ */
+private pattern mustInRelationiD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>iD attribute EAttribute(source,target)
+ */
+private pattern mayInRelationiD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAttribute_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source attribute EAnnotation(source,target)
+ */
+private pattern mustInRelationsource_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source attribute EAnnotation(source,target)
+ */
+private pattern mayInRelationsource_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []abstract attribute EClass(source,target)
+ */
+private pattern mustInRelationabstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>abstract attribute EClass(source,target)
+ */
+private pattern mayInRelationabstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationabstract_attribute_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationabstract_attribute_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []interface attribute EClass(source,target)
+ */
+private pattern mustInRelationinterface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface attribute EClass(source,target)
+ */
+private pattern mayInRelationinterface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_attribute_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinterface_attribute_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []instanceClassName attribute EClassifier(source,target)
+ */
+private pattern mustInRelationinstanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>instanceClassName attribute EClassifier(source,target)
+ */
+private pattern mayInRelationinstanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []instanceTypeName attribute EClassifier(source,target)
+ */
+private pattern mustInRelationinstanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>instanceTypeName attribute EClassifier(source,target)
+ */
+private pattern mayInRelationinstanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []serializable attribute EDataType(source,target)
+ */
+private pattern mustInRelationserializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>serializable attribute EDataType(source,target)
+ */
+private pattern mayInRelationserializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEDataType_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []value attribute EEnumLiteral(source,target)
+ */
+private pattern mustInRelationvalue_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>value attribute EEnumLiteral(source,target)
+ */
+private pattern mayInRelationvalue_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []literal attribute EEnumLiteral(source,target)
+ */
+private pattern mustInRelationliteral_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>literal attribute EEnumLiteral(source,target)
+ */
+private pattern mayInRelationliteral_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []name attribute ENamedElement(source,target)
+ */
+private pattern mustInRelationname_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>name attribute ENamedElement(source,target)
+ */
+private pattern mayInRelationname_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfENamedElement_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []nsURI attribute EPackage(source,target)
+ */
+private pattern mustInRelationnsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>nsURI attribute EPackage(source,target)
+ */
+private pattern mayInRelationnsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []nsPrefix attribute EPackage(source,target)
+ */
+private pattern mustInRelationnsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>nsPrefix attribute EPackage(source,target)
+ */
+private pattern mayInRelationnsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []containment attribute EReference(source,target)
+ */
+private pattern mustInRelationcontainment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>containment attribute EReference(source,target)
+ */
+private pattern mayInRelationcontainment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []container attribute EReference(source,target)
+ */
+private pattern mustInRelationcontainer_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>container attribute EReference(source,target)
+ */
+private pattern mayInRelationcontainer_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []resolveProxies attribute EReference(source,target)
+ */
+private pattern mustInRelationresolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>resolveProxies attribute EReference(source,target)
+ */
+private pattern mayInRelationresolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []changeable attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationchangeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>changeable attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationchangeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []volatile attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationvolatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>volatile attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationvolatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []transient attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationtransient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>transient attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationtransient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []defaultValueLiteral attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>defaultValueLiteral attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []unsettable attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationunsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>unsettable attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationunsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []derived attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationderived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>derived attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationderived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []ordered attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>ordered attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []unique attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationunique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>unique attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationunique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []lowerBound attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationlowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>lowerBound attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationlowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []upperBound attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationupperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>upperBound attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationupperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []many attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationmany_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>many attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationmany_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []required attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationrequired_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>required attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationrequired_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []key attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mustInRelationkey_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>key attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mayInRelationkey_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []value attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mustInRelationvalue_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>value attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mayInRelationvalue_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target); }or
+
+ { find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target); }or
+
+ { find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target); }or
+
+ { find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_eAttributeType_reference_EAttribute(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ find mustInstanceOfEAttribute_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_eReferenceType_reference_EReference(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ find mustInstanceOfEReference_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_eRawType_reference_EGenericType(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEOperation_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEGenericType_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEAttribute_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEParameter_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEDataType_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEClassifier_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfETypeParameter_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEReference_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEEnum_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfETypedElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEClass_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_EStringToStringMapEntry_class_by_details_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"details reference EAnnotation");
+ find mustInstanceOfEAnnotation_class(problem,interpretation,container);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject);
+ find mayInRelationdetails_reference_EAnnotation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EStringToStringMapEntry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class");
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericSuperTypes reference EClass");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericExceptions reference EOperation");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericExceptions_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericType reference ETypedElement");
+ find mustInstanceOfETypedElement_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericType_reference_ETypedElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eUpperBound reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeUpperBound_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeArguments reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeTypeArguments_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLowerBound reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeLowerBound_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eBounds reference ETypeParameter");
+ find mustInstanceOfETypeParameter_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeBounds_reference_ETypeParameter(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnumLiteral_class_by_eLiterals_reference_EEnum_with_eEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLiterals reference EEnum");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eEnum reference EEnumLiteral");
+ find mustInstanceOfEEnum_class(problem,interpretation,container);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject);
+ find mayInRelationeLiterals_reference_EEnum(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnumLiteral_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class");
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EClassifier");
+ find mustInstanceOfEClassifier_class(problem,interpretation,container);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayInRelationeTypeParameters_reference_EClassifier(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EOperation");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayInRelationeTypeParameters_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAttribute_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEAttribute_class(problem,interpretation,newObject);
+ find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAttribute_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class");
+ find mayInstanceOfEAttribute_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EClass_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEClass_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EClass_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class");
+ find mayInstanceOfEClass_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EDataType_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEDataType_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EDataType_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class");
+ find mayInstanceOfEDataType_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EOperation_class_by_eOperations_reference_EClass_with_eContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eOperations reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EOperation");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEOperation_class(problem,interpretation,newObject);
+ find mayInRelationeOperations_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EOperation_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class");
+ find mayInstanceOfEOperation_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAnnotation_class_by_eAnnotations_reference_EModelElement_with_eModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eAnnotations reference EModelElement");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eModelElement reference EAnnotation");
+ find mustInstanceOfEModelElement_class(problem,interpretation,container);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,newObject);
+ find mayInRelationeAnnotations_reference_EModelElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAnnotation_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class");
+ find mayInstanceOfEAnnotation_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EParameter_class_by_eParameters_reference_EOperation_with_eOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eParameters reference EOperation");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eOperation reference EParameter");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfEParameter_class(problem,interpretation,newObject);
+ find mayInRelationeParameters_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EParameter_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class");
+ find mayInstanceOfEParameter_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EObject_class_by_contents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference EAnnotation");
+ find mustInstanceOfEAnnotation_class(problem,interpretation,container);
+ find mayInstanceOfEObject_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_EAnnotation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EObject_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class");
+ find mayInstanceOfEObject_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EReference_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEReference_class(problem,interpretation,newObject);
+ find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EReference_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class");
+ find mayInstanceOfEReference_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnum_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEEnum_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnum_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class");
+ find mayInstanceOfEEnum_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EPackage_class_UndefinedPart_by_eSubpackages_reference_EPackage_with_eSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eSubpackages reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eSuperPackage reference EPackage");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject);
+ find mayInRelationeSubpackages_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EPackage_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart");
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_EStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_ETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_eAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAttribute_class(problem,interpretation,from);
+ find mustInstanceOfEDataType_class(problem,interpretation,to);
+ find mayInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to);
+ neg find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to);
+}
+pattern refineRelation_references_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,from);
+ find mustInstanceOfEObject_class(problem,interpretation,to);
+ find mayInRelationreferences_reference_EAnnotation(problem,interpretation,from,to);
+ neg find mustInRelationreferences_reference_EAnnotation(problem,interpretation,from,to);
+}
+pattern refineRelation_eSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeAllReferences_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllReferences_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeReferences_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeReferences_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeAttributes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAttributes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeAllContainments_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllContainments_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEOperation_class(problem,interpretation,to);
+ find mayInRelationeAllOperations_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllOperations_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,to);
+ find mayInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEGenericType_class(problem,interpretation,to);
+ find mayInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEOperation_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeExceptions_reference_EOperation(problem,interpretation,from,to);
+ neg find mustInRelationeExceptions_reference_EOperation(problem,interpretation,from,to);
+}
+pattern refineRelation_eOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeOpposite_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeOpposite_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeReferenceType_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeReferenceType_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeKeys_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeKeys_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeType_reference_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationeType_reference_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_eRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeRawType_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeRawType_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_eTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfETypeParameter_class(problem,interpretation,to);
+ find mayInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_eClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_iD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAttribute_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationiD_attribute_EAttribute(problem,interpretation,from,to);
+ neg find mustInRelationiD_attribute_EAttribute(problem,interpretation,from,to);
+}
+pattern refineRelation_source_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationsource_attribute_EAnnotation(problem,interpretation,from,to);
+ neg find mustInRelationsource_attribute_EAnnotation(problem,interpretation,from,to);
+}
+pattern refineRelation_abstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationabstract_attribute_EClass(problem,interpretation,from,to);
+ neg find mustInRelationabstract_attribute_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_interface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationinterface_attribute_EClass(problem,interpretation,from,to);
+ neg find mustInRelationinterface_attribute_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_instanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClassifier_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to);
+ neg find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to);
+}
+pattern refineRelation_instanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClassifier_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to);
+ neg find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to);
+}
+pattern refineRelation_serializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEDataType_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationserializable_attribute_EDataType(problem,interpretation,from,to);
+ neg find mustInRelationserializable_attribute_EDataType(problem,interpretation,from,to);
+}
+pattern refineRelation_value_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to);
+ neg find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to);
+}
+pattern refineRelation_literal_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to);
+ neg find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to);
+}
+pattern refineRelation_name_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfENamedElement_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationname_attribute_ENamedElement(problem,interpretation,from,to);
+ neg find mustInRelationname_attribute_ENamedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_nsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEPackage_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationnsURI_attribute_EPackage(problem,interpretation,from,to);
+ neg find mustInRelationnsURI_attribute_EPackage(problem,interpretation,from,to);
+}
+pattern refineRelation_nsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEPackage_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to);
+ neg find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to);
+}
+pattern refineRelation_containment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationcontainment_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationcontainment_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_container_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationcontainer_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationcontainer_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_resolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_changeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_volatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_transient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_defaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_unsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_derived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_ordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationordered_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationordered_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_unique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationunique_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationunique_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_lowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_upperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_many_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationmany_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationmany_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_required_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_key_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+ neg find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+}
+pattern refineRelation_value_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+ neg find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "EAttribute class".
+ */
+private pattern mustInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EAttribute class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EAttribute class");
+}
+
+/**
+ * An element may be an instance of type "EAttribute class".
+ */
+private pattern mayInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAttribute_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAttribute_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEAttribute_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EAnnotation class".
+ */
+private pattern mustInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EAnnotation class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EAnnotation class");
+}
+
+/**
+ * An element may be an instance of type "EAnnotation class".
+ */
+private pattern mayInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAnnotation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAnnotation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEAnnotation_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EClass class".
+ */
+private pattern mustInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EClass class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEClass_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EClass class");
+}
+
+/**
+ * An element may be an instance of type "EClass class".
+ */
+private pattern mayInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClass_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClass_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEClass_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EClassifier class".
+ */
+private pattern mustInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EClassifier class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EClassifier class");
+}
+
+/**
+ * An element may be an instance of type "EClassifier class".
+ */
+private pattern mayInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClassifier_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClassifier_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEClassifier_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EDataType class".
+ */
+private pattern mustInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EDataType class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EDataType class");
+}
+
+/**
+ * An element may be an instance of type "EDataType class".
+ */
+private pattern mayInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEDataType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEDataType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEDataType_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EEnum class".
+ */
+private pattern mustInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EEnum class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EEnum class");
+}
+
+/**
+ * An element may be an instance of type "EEnum class".
+ */
+private pattern mayInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnum_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnum_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEEnum_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EEnumLiteral class".
+ */
+private pattern mustInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EEnumLiteral class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EEnumLiteral class");
+}
+
+/**
+ * An element may be an instance of type "EEnumLiteral class".
+ */
+private pattern mayInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class".
+ */
+private pattern mustInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class".
+ */
+private pattern mayInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEModelElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class".
+ */
+private pattern mustInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class".
+ */
+private pattern mayInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfENamedElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EObject class".
+ */
+private pattern mustInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EObject class");
+}
+
+/**
+ * An element may be an instance of type "EObject class".
+ */
+private pattern mayInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EOperation class".
+ */
+private pattern mustInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EOperation class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EOperation class");
+}
+
+/**
+ * An element may be an instance of type "EOperation class".
+ */
+private pattern mayInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEOperation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEOperation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEOperation_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class".
+ */
+private pattern mustInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class");
+}
+
+/**
+ * An element may be an instance of type "EPackage class".
+ */
+private pattern mayInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEPackage_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EParameter class".
+ */
+private pattern mustInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EParameter class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EParameter class");
+}
+
+/**
+ * An element may be an instance of type "EParameter class".
+ */
+private pattern mayInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEParameter_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EReference class".
+ */
+private pattern mustInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EReference class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEReference_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EReference class");
+}
+
+/**
+ * An element may be an instance of type "EReference class".
+ */
+private pattern mayInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEReference_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEReference_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEReference_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EStructuralFeature class".
+ */
+private pattern mustInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EStructuralFeature class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EStructuralFeature class");
+}
+
+/**
+ * An element may be an instance of type "EStructuralFeature class".
+ */
+private pattern mayInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ETypedElement class".
+ */
+private pattern mustInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ETypedElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ETypedElement class");
+}
+
+/**
+ * An element may be an instance of type "ETypedElement class".
+ */
+private pattern mayInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfETypedElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EStringToStringMapEntry class".
+ */
+private pattern mustInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EStringToStringMapEntry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EStringToStringMapEntry class");
+}
+
+/**
+ * An element may be an instance of type "EStringToStringMapEntry class".
+ */
+private pattern mayInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EGenericType class".
+ */
+private pattern mustInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EGenericType class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EGenericType class");
+}
+
+/**
+ * An element may be an instance of type "EGenericType class".
+ */
+private pattern mayInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEGenericType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEGenericType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEGenericType_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ETypeParameter class".
+ */
+private pattern mustInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ETypeParameter class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ETypeParameter class");
+}
+
+/**
+ * An element may be an instance of type "ETypeParameter class".
+ */
+private pattern mayInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypeParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypeParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfETypeParameter_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class DefinedPart".
+ */
+private pattern mustInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class DefinedPart".
+ */
+private pattern mayInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class UndefinedPart".
+ */
+private pattern mustInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class UndefinedPart".
+ */
+private pattern mayInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class DefinedPart".
+ */
+private pattern mustInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class DefinedPart".
+ */
+private pattern mayInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class UndefinedPart".
+ */
+private pattern mustInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class UndefinedPart".
+ */
+private pattern mayInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class DefinedPart".
+ */
+private pattern mustInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EPackage class DefinedPart".
+ */
+private pattern mayInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class UndefinedPart".
+ */
+private pattern mustInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EPackage class UndefinedPart".
+ */
+private pattern mayInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []eAttributeType reference EAttribute(source,target)
+ */
+private pattern mustInRelationeAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAttributeType reference EAttribute(source,target)
+ */
+private pattern mayInRelationeAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAttribute_class(problem,interpretation,source);
+ find mayInstanceOfEDataType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []details reference EAnnotation(source,target)
+ */
+private pattern mustInRelationdetails_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"details reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>details reference EAnnotation(source,target)
+ */
+private pattern mayInRelationdetails_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eModelElement reference EAnnotation(source,target)
+ */
+private pattern mustInRelationeModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eModelElement reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eModelElement reference EAnnotation(source,target)
+ */
+private pattern mayInRelationeModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEModelElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference EAnnotation(source,target)
+ */
+private pattern mustInRelationcontents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference EAnnotation(source,target)
+ */
+private pattern mayInRelationcontents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []references reference EAnnotation(source,target)
+ */
+private pattern mustInRelationreferences_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>references reference EAnnotation(source,target)
+ */
+private pattern mayInRelationreferences_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEObject_class(problem,interpretation,target);
+} or {
+ find mustInRelationreferences_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+} or {
+ find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOperations reference EClass(source,target)
+ */
+private pattern mustInRelationeOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperations reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOperations reference EClass(source,target)
+ */
+private pattern mayInRelationeOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllAttributes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllAttributes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllReferences reference EClass(source,target)
+ */
+private pattern mustInRelationeAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllReferences reference EClass(source,target)
+ */
+private pattern mayInRelationeAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllReferences_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eReferences reference EClass(source,target)
+ */
+private pattern mustInRelationeReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eReferences reference EClass(source,target)
+ */
+private pattern mayInRelationeReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeReferences_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAttributes reference EClass(source,target)
+ */
+private pattern mustInRelationeAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAttributes reference EClass(source,target)
+ */
+private pattern mayInRelationeAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAttributes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllContainments reference EClass(source,target)
+ */
+private pattern mustInRelationeAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllContainments reference EClass(source,target)
+ */
+private pattern mayInRelationeAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllContainments_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllOperations reference EClass(source,target)
+ */
+private pattern mustInRelationeAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllOperations reference EClass(source,target)
+ */
+private pattern mayInRelationeAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllOperations_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllStructuralFeatures reference EClass(source,target)
+ */
+private pattern mustInRelationeAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllStructuralFeatures reference EClass(source,target)
+ */
+private pattern mayInRelationeAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eIDAttribute reference EClass(source,target)
+ */
+private pattern mustInRelationeIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eIDAttribute reference EClass(source,target)
+ */
+private pattern mayInRelationeIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eStructuralFeatures reference EClass(source,target)
+ */
+private pattern mustInRelationeStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eStructuralFeatures reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eStructuralFeatures reference EClass(source,target)
+ */
+private pattern mayInRelationeStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []ePackage reference EClassifier(source,target)
+ */
+private pattern mustInRelationePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ePackage reference EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>ePackage reference EClassifier(source,target)
+ */
+private pattern mayInRelationePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameters reference EClassifier(source,target)
+ */
+private pattern mustInRelationeTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameters reference EClassifier(source,target)
+ */
+private pattern mayInRelationeTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eLiterals reference EEnum(source,target)
+ */
+private pattern mustInRelationeLiterals_reference_EEnum(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLiterals reference EEnum");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eLiterals reference EEnum(source,target)
+ */
+private pattern mayInRelationeLiterals_reference_EEnum(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnum_class(problem,interpretation,source);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eEnum reference EEnumLiteral(source,target)
+ */
+private pattern mustInRelationeEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eEnum reference EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eEnum reference EEnumLiteral(source,target)
+ */
+private pattern mayInRelationeEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ find mayInstanceOfEEnum_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAnnotations reference EModelElement(source,target)
+ */
+private pattern mustInRelationeAnnotations_reference_EModelElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAnnotations reference EModelElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAnnotations reference EModelElement(source,target)
+ */
+private pattern mayInRelationeAnnotations_reference_EModelElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEModelElement_class(problem,interpretation,source);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eContainingClass reference EOperation(source,target)
+ */
+private pattern mustInRelationeContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eContainingClass reference EOperation(source,target)
+ */
+private pattern mayInRelationeContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameters reference EOperation(source,target)
+ */
+private pattern mustInRelationeTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameters reference EOperation(source,target)
+ */
+private pattern mayInRelationeTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eParameters reference EOperation(source,target)
+ */
+private pattern mustInRelationeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eParameters reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eParameters reference EOperation(source,target)
+ */
+private pattern mayInRelationeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEParameter_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eExceptions reference EOperation(source,target)
+ */
+private pattern mustInRelationeExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eExceptions reference EOperation(source,target)
+ */
+private pattern mayInRelationeExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+} or {
+ find mustInRelationeExceptions_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericExceptions reference EOperation(source,target)
+ */
+private pattern mustInRelationeGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericExceptions reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericExceptions reference EOperation(source,target)
+ */
+private pattern mayInRelationeGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eClassifiers reference EPackage(source,target)
+ */
+private pattern mustInRelationeClassifiers_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifiers reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eClassifiers reference EPackage(source,target)
+ */
+private pattern mayInRelationeClassifiers_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSubpackages reference EPackage(source,target)
+ */
+private pattern mustInRelationeSubpackages_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSubpackages reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSubpackages reference EPackage(source,target)
+ */
+private pattern mayInRelationeSubpackages_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSuperPackage reference EPackage(source,target)
+ */
+private pattern mustInRelationeSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperPackage reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSuperPackage reference EPackage(source,target)
+ */
+private pattern mayInRelationeSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOperation reference EParameter(source,target)
+ */
+private pattern mustInRelationeOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperation reference EParameter");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOperation reference EParameter(source,target)
+ */
+private pattern mayInRelationeOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEParameter_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOpposite reference EReference(source,target)
+ */
+private pattern mustInRelationeOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOpposite reference EReference(source,target)
+ */
+private pattern mayInRelationeOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eReferenceType reference EReference(source,target)
+ */
+private pattern mustInRelationeReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eReferenceType reference EReference(source,target)
+ */
+private pattern mayInRelationeReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eKeys reference EReference(source,target)
+ */
+private pattern mustInRelationeKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eKeys reference EReference(source,target)
+ */
+private pattern mayInRelationeKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeKeys_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eContainingClass reference EStructuralFeature(source,target)
+ */
+private pattern mustInRelationeContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eContainingClass reference EStructuralFeature(source,target)
+ */
+private pattern mayInRelationeContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eType reference ETypedElement(source,target)
+ */
+private pattern mustInRelationeType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eType reference ETypedElement(source,target)
+ */
+private pattern mayInRelationeType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericType reference ETypedElement(source,target)
+ */
+private pattern mustInRelationeGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericType reference ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericType reference ETypedElement(source,target)
+ */
+private pattern mayInRelationeGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eUpperBound reference EGenericType(source,target)
+ */
+private pattern mustInRelationeUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eUpperBound reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eUpperBound reference EGenericType(source,target)
+ */
+private pattern mayInRelationeUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeArguments reference EGenericType(source,target)
+ */
+private pattern mustInRelationeTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeArguments reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeArguments reference EGenericType(source,target)
+ */
+private pattern mayInRelationeTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eRawType reference EGenericType(source,target)
+ */
+private pattern mustInRelationeRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eRawType reference EGenericType(source,target)
+ */
+private pattern mayInRelationeRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eLowerBound reference EGenericType(source,target)
+ */
+private pattern mustInRelationeLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLowerBound reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eLowerBound reference EGenericType(source,target)
+ */
+private pattern mayInRelationeLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameter reference EGenericType(source,target)
+ */
+private pattern mustInRelationeTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameter reference EGenericType(source,target)
+ */
+private pattern mayInRelationeTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eClassifier reference EGenericType(source,target)
+ */
+private pattern mustInRelationeClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eClassifier reference EGenericType(source,target)
+ */
+private pattern mayInRelationeClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eBounds reference ETypeParameter(source,target)
+ */
+private pattern mustInRelationeBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eBounds reference ETypeParameter");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eBounds reference ETypeParameter(source,target)
+ */
+private pattern mayInRelationeBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypeParameter_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []iD attribute EAttribute(source,target)
+ */
+private pattern mustInRelationiD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>iD attribute EAttribute(source,target)
+ */
+private pattern mayInRelationiD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAttribute_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source attribute EAnnotation(source,target)
+ */
+private pattern mustInRelationsource_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source attribute EAnnotation(source,target)
+ */
+private pattern mayInRelationsource_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []abstract attribute EClass(source,target)
+ */
+private pattern mustInRelationabstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>abstract attribute EClass(source,target)
+ */
+private pattern mayInRelationabstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationabstract_attribute_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationabstract_attribute_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []interface attribute EClass(source,target)
+ */
+private pattern mustInRelationinterface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface attribute EClass(source,target)
+ */
+private pattern mayInRelationinterface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_attribute_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinterface_attribute_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []instanceClassName attribute EClassifier(source,target)
+ */
+private pattern mustInRelationinstanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>instanceClassName attribute EClassifier(source,target)
+ */
+private pattern mayInRelationinstanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []instanceTypeName attribute EClassifier(source,target)
+ */
+private pattern mustInRelationinstanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>instanceTypeName attribute EClassifier(source,target)
+ */
+private pattern mayInRelationinstanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []serializable attribute EDataType(source,target)
+ */
+private pattern mustInRelationserializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>serializable attribute EDataType(source,target)
+ */
+private pattern mayInRelationserializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEDataType_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []value attribute EEnumLiteral(source,target)
+ */
+private pattern mustInRelationvalue_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>value attribute EEnumLiteral(source,target)
+ */
+private pattern mayInRelationvalue_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []literal attribute EEnumLiteral(source,target)
+ */
+private pattern mustInRelationliteral_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>literal attribute EEnumLiteral(source,target)
+ */
+private pattern mayInRelationliteral_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []name attribute ENamedElement(source,target)
+ */
+private pattern mustInRelationname_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>name attribute ENamedElement(source,target)
+ */
+private pattern mayInRelationname_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfENamedElement_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []nsURI attribute EPackage(source,target)
+ */
+private pattern mustInRelationnsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>nsURI attribute EPackage(source,target)
+ */
+private pattern mayInRelationnsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []nsPrefix attribute EPackage(source,target)
+ */
+private pattern mustInRelationnsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>nsPrefix attribute EPackage(source,target)
+ */
+private pattern mayInRelationnsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []containment attribute EReference(source,target)
+ */
+private pattern mustInRelationcontainment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>containment attribute EReference(source,target)
+ */
+private pattern mayInRelationcontainment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []container attribute EReference(source,target)
+ */
+private pattern mustInRelationcontainer_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>container attribute EReference(source,target)
+ */
+private pattern mayInRelationcontainer_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []resolveProxies attribute EReference(source,target)
+ */
+private pattern mustInRelationresolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>resolveProxies attribute EReference(source,target)
+ */
+private pattern mayInRelationresolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []changeable attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationchangeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>changeable attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationchangeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []volatile attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationvolatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>volatile attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationvolatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []transient attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationtransient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>transient attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationtransient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []defaultValueLiteral attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>defaultValueLiteral attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []unsettable attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationunsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>unsettable attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationunsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []derived attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationderived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>derived attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationderived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []ordered attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>ordered attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []unique attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationunique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>unique attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationunique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []lowerBound attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationlowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>lowerBound attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationlowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []upperBound attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationupperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>upperBound attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationupperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []many attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationmany_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>many attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationmany_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []required attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationrequired_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>required attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationrequired_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []key attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mustInRelationkey_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>key attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mayInRelationkey_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []value attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mustInRelationvalue_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>value attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mayInRelationvalue_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target); }or
+
+ { find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target); }or
+
+ { find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target); }or
+
+ { find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_eAttributeType_reference_EAttribute(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ find mustInstanceOfEAttribute_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_eReferenceType_reference_EReference(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ find mustInstanceOfEReference_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_eRawType_reference_EGenericType(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEOperation_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEGenericType_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEAttribute_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEParameter_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEDataType_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEClassifier_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfETypeParameter_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEReference_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEEnum_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfETypedElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEClass_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_EAnnotation_class_by_eAnnotations_reference_EModelElement_with_eModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eAnnotations reference EModelElement");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eModelElement reference EAnnotation");
+ find mustInstanceOfEModelElement_class(problem,interpretation,container);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,newObject);
+ find mayInRelationeAnnotations_reference_EModelElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAnnotation_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class");
+ find mayInstanceOfEAnnotation_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnum_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEEnum_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnum_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class");
+ find mayInstanceOfEEnum_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EParameter_class_by_eParameters_reference_EOperation_with_eOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eParameters reference EOperation");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eOperation reference EParameter");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfEParameter_class(problem,interpretation,newObject);
+ find mayInRelationeParameters_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EParameter_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class");
+ find mayInstanceOfEParameter_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EPackage_class_UndefinedPart_by_eSubpackages_reference_EPackage_with_eSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eSubpackages reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eSuperPackage reference EPackage");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject);
+ find mayInRelationeSubpackages_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EPackage_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart");
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EClass_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEClass_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EClass_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class");
+ find mayInstanceOfEClass_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EOperation_class_by_eOperations_reference_EClass_with_eContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eOperations reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EOperation");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEOperation_class(problem,interpretation,newObject);
+ find mayInRelationeOperations_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EOperation_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class");
+ find mayInstanceOfEOperation_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EReference_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEReference_class(problem,interpretation,newObject);
+ find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EReference_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class");
+ find mayInstanceOfEReference_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EObject_class_by_contents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference EAnnotation");
+ find mustInstanceOfEAnnotation_class(problem,interpretation,container);
+ find mayInstanceOfEObject_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_EAnnotation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EObject_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class");
+ find mayInstanceOfEObject_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnumLiteral_class_by_eLiterals_reference_EEnum_with_eEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLiterals reference EEnum");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eEnum reference EEnumLiteral");
+ find mustInstanceOfEEnum_class(problem,interpretation,container);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject);
+ find mayInRelationeLiterals_reference_EEnum(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnumLiteral_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class");
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAttribute_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEAttribute_class(problem,interpretation,newObject);
+ find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAttribute_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class");
+ find mayInstanceOfEAttribute_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EDataType_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEDataType_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EDataType_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class");
+ find mayInstanceOfEDataType_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericSuperTypes reference EClass");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericExceptions reference EOperation");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericExceptions_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericType reference ETypedElement");
+ find mustInstanceOfETypedElement_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericType_reference_ETypedElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eUpperBound reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeUpperBound_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeArguments reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeTypeArguments_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLowerBound reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeLowerBound_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eBounds reference ETypeParameter");
+ find mustInstanceOfETypeParameter_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeBounds_reference_ETypeParameter(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EStringToStringMapEntry_class_by_details_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"details reference EAnnotation");
+ find mustInstanceOfEAnnotation_class(problem,interpretation,container);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject);
+ find mayInRelationdetails_reference_EAnnotation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EStringToStringMapEntry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class");
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EClassifier");
+ find mustInstanceOfEClassifier_class(problem,interpretation,container);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayInRelationeTypeParameters_reference_EClassifier(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EOperation");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayInRelationeTypeParameters_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_EAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_ETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_eAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAttribute_class(problem,interpretation,from);
+ find mustInstanceOfEDataType_class(problem,interpretation,to);
+ find mayInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to);
+ neg find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to);
+}
+pattern refineRelation_references_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,from);
+ find mustInstanceOfEObject_class(problem,interpretation,to);
+ find mayInRelationreferences_reference_EAnnotation(problem,interpretation,from,to);
+ neg find mustInRelationreferences_reference_EAnnotation(problem,interpretation,from,to);
+}
+pattern refineRelation_eSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeAllReferences_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllReferences_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeReferences_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeReferences_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeAttributes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAttributes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeAllContainments_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllContainments_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEOperation_class(problem,interpretation,to);
+ find mayInRelationeAllOperations_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllOperations_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,to);
+ find mayInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEGenericType_class(problem,interpretation,to);
+ find mayInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEOperation_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeExceptions_reference_EOperation(problem,interpretation,from,to);
+ neg find mustInRelationeExceptions_reference_EOperation(problem,interpretation,from,to);
+}
+pattern refineRelation_eOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeOpposite_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeOpposite_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeReferenceType_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeReferenceType_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeKeys_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeKeys_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeType_reference_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationeType_reference_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_eRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeRawType_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeRawType_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_eTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfETypeParameter_class(problem,interpretation,to);
+ find mayInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_eClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_iD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAttribute_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationiD_attribute_EAttribute(problem,interpretation,from,to);
+ neg find mustInRelationiD_attribute_EAttribute(problem,interpretation,from,to);
+}
+pattern refineRelation_source_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationsource_attribute_EAnnotation(problem,interpretation,from,to);
+ neg find mustInRelationsource_attribute_EAnnotation(problem,interpretation,from,to);
+}
+pattern refineRelation_abstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationabstract_attribute_EClass(problem,interpretation,from,to);
+ neg find mustInRelationabstract_attribute_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_interface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationinterface_attribute_EClass(problem,interpretation,from,to);
+ neg find mustInRelationinterface_attribute_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_instanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClassifier_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to);
+ neg find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to);
+}
+pattern refineRelation_instanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClassifier_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to);
+ neg find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to);
+}
+pattern refineRelation_serializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEDataType_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationserializable_attribute_EDataType(problem,interpretation,from,to);
+ neg find mustInRelationserializable_attribute_EDataType(problem,interpretation,from,to);
+}
+pattern refineRelation_value_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to);
+ neg find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to);
+}
+pattern refineRelation_literal_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to);
+ neg find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to);
+}
+pattern refineRelation_name_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfENamedElement_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationname_attribute_ENamedElement(problem,interpretation,from,to);
+ neg find mustInRelationname_attribute_ENamedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_nsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEPackage_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationnsURI_attribute_EPackage(problem,interpretation,from,to);
+ neg find mustInRelationnsURI_attribute_EPackage(problem,interpretation,from,to);
+}
+pattern refineRelation_nsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEPackage_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to);
+ neg find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to);
+}
+pattern refineRelation_containment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationcontainment_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationcontainment_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_container_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationcontainer_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationcontainer_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_resolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_changeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_volatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_transient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_defaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_unsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_derived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_ordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationordered_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationordered_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_unique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationunique_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationunique_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_lowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_upperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_many_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationmany_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationmany_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_required_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_key_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+ neg find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+}
+pattern refineRelation_value_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+ neg find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "FunctionalElement class".
+ */
+private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalElement class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalElement class".
+ */
+private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalArchitectureModel class".
+ */
+private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalArchitectureModel class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalArchitectureModel class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalArchitectureModel class".
+ */
+private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Function class".
+ */
+private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Function class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Function class");
+}
+
+/**
+ * An element may be an instance of type "Function class".
+ */
+private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunction_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunction_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunction_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FAMTerminator class".
+ */
+private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FAMTerminator class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FAMTerminator class");
+}
+
+/**
+ * An element may be an instance of type "FAMTerminator class".
+ */
+private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "InformationLink class".
+ */
+private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"InformationLink class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"InformationLink class");
+}
+
+/**
+ * An element may be an instance of type "InformationLink class".
+ */
+private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewInformationLink_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find scopeDisallowsNewInformationLink_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfInformationLink_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalInterface class".
+ */
+private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalInterface class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalInterface class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalInterface class".
+ */
+private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalInput class".
+ */
+private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalInput class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalInput class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalInput class".
+ */
+private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalOutput class".
+ */
+private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalOutput class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalOutput class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalOutput class".
+ */
+private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalData class".
+ */
+private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalData class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalData class");
+}
+
+/**
+ * An element may be an instance of type "FunctionalData class".
+ */
+private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalData_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalData_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionType enum".
+ */
+private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionType enum");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionType enum");
+}
+
+/**
+ * An element may be an instance of type "FunctionType enum".
+ */
+private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart".
+ */
+private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalArchitectureModel class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalArchitectureModel class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart".
+ */
+private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart".
+ */
+private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FunctionalArchitectureModel class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FunctionalArchitectureModel class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart".
+ */
+private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target)
+ */
+private pattern mustInRelationinterface_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target)
+ */
+private pattern mayInRelationinterface_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []model reference FunctionalElement(source,target)
+ */
+private pattern mustInRelationmodel_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target)
+ */
+private pattern mayInRelationmodel_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target)
+ */
+private pattern mustInRelationparent_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target)
+ */
+private pattern mayInRelationparent_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,source);
+ find mayInstanceOfFunction_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target)
+ */
+private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target)
+ */
+private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []subElements reference Function(source,target)
+ */
+private pattern mustInRelationsubElements_reference_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>subElements reference Function(source,target)
+ */
+private pattern mayInRelationsubElements_reference_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunction_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationsubElements_reference_Function(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []data reference FAMTerminator(source,target)
+ */
+private pattern mustInRelationdata_reference_FAMTerminator(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target)
+ */
+private pattern mayInRelationdata_reference_FAMTerminator(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalData_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []from reference InformationLink(source,target)
+ */
+private pattern mustInRelationfrom_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>from reference InformationLink(source,target)
+ */
+private pattern mayInRelationfrom_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfInformationLink_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []to reference InformationLink(source,target)
+ */
+private pattern mustInRelationto_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>to reference InformationLink(source,target)
+ */
+private pattern mayInRelationto_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfInformationLink_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationto_reference_InformationLink(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target)
+ */
+private pattern mustInRelationdata_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target)
+ */
+private pattern mayInRelationdata_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalData_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target)
+ */
+private pattern mustInRelationelement_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target)
+ */
+private pattern mayInRelationelement_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target)
+ */
+private pattern mustInRelationIncomingLinks_reference_FunctionalInput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target)
+ */
+private pattern mayInRelationIncomingLinks_reference_FunctionalInput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,source);
+ find mayInstanceOfInformationLink_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+} or {
+ find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target)
+ */
+private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target)
+ */
+private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,source);
+ find mayInstanceOfInformationLink_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target)
+ */
+private pattern mustInRelationterminator_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target)
+ */
+private pattern mayInRelationterminator_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalData_class(problem,interpretation,source);
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []interface reference FunctionalData(source,target)
+ */
+private pattern mustInRelationinterface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target)
+ */
+private pattern mayInRelationinterface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunctionalData_class(problem,interpretation,source);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []type attribute Function(source,target)
+ */
+private pattern mustInRelationtype_attribute_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>type attribute Function(source,target)
+ */
+private pattern mayInRelationtype_attribute_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFunction_class(problem,interpretation,source);
+ find mayInstanceOfFunctionType_enum(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtype_attribute_Function(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or
+
+ { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or
+
+ { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or
+
+ { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or
+
+ { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement");
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink");
+ find mustInstanceOfInformationLink_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function");
+ find mustInstanceOfFunction_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalData_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunction_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFAMTerminator_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfInformationLink_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalInterface_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalInput_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalOutput_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData");
+ find mustInstanceOfFunctionalInterface_class(problem,interpretation,container);
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject);
+ find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalOutput_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class");
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator");
+ find mustInstanceOfFunctionalData_class(problem,interpretation,container);
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject);
+ find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FAMTerminator_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class");
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface");
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,container);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject);
+ find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalInterface_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class");
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalArchitectureModel_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart");
+ find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel");
+ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container);
+ find mayInstanceOfFunction_class(problem,interpretation,newObject);
+ find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement");
+ find mustInstanceOfFunction_class(problem,interpretation,container);
+ find mayInstanceOfFunction_class(problem,interpretation,newObject);
+ find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Function_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class");
+ find mayInstanceOfFunction_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink");
+ find mustInstanceOfFunctionalOutput_class(problem,interpretation,container);
+ find mayInstanceOfInformationLink_class(problem,interpretation,newObject);
+ find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_InformationLink_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class");
+ find mayInstanceOfInformationLink_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData");
+ find mustInstanceOfFunctionalInterface_class(problem,interpretation,container);
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject);
+ find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FunctionalInput_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class");
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfFunction_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+}
+pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalData_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFunctionalInput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element);
+ neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element);
+ neg find mustInstanceOfInformationLink_class(problem,interpretation,element);
+ neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_model_reference_FunctionalElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFunctionalElement_class(problem,interpretation,from);
+ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to);
+ find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to);
+ neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to);
+}
+pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput");
+ PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFunctionalInput_class(problem,interpretation,from);
+ find mustInstanceOfInformationLink_class(problem,interpretation,to);
+ find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to);
+ neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to);
+}
+pattern refineRelation_type_attribute_Function(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFunction_class(problem,interpretation,from);
+ find mustInstanceOfFunctionType_enum(problem,interpretation,to);
+ find mayInRelationtype_attribute_Function(problem,interpretation,from,to);
+ neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "EAttribute class".
+ */
+private pattern mustInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EAttribute class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EAttribute class");
+}
+
+/**
+ * An element may be an instance of type "EAttribute class".
+ */
+private pattern mayInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAttribute_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAttribute_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEAttribute_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EAnnotation class".
+ */
+private pattern mustInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EAnnotation class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EAnnotation class");
+}
+
+/**
+ * An element may be an instance of type "EAnnotation class".
+ */
+private pattern mayInstanceOfEAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAnnotation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEAnnotation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEAnnotation_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EClass class".
+ */
+private pattern mustInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EClass class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEClass_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EClass class");
+}
+
+/**
+ * An element may be an instance of type "EClass class".
+ */
+private pattern mayInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClass_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClass_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEClass_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EClassifier class".
+ */
+private pattern mustInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EClassifier class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EClassifier class");
+}
+
+/**
+ * An element may be an instance of type "EClassifier class".
+ */
+private pattern mayInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClassifier_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEClassifier_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEClassifier_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EDataType class".
+ */
+private pattern mustInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EDataType class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EDataType class");
+}
+
+/**
+ * An element may be an instance of type "EDataType class".
+ */
+private pattern mayInstanceOfEDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEDataType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEDataType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEDataType_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EEnum class".
+ */
+private pattern mustInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EEnum class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EEnum class");
+}
+
+/**
+ * An element may be an instance of type "EEnum class".
+ */
+private pattern mayInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnum_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnum_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEEnum_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EEnumLiteral class".
+ */
+private pattern mustInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EEnumLiteral class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EEnumLiteral class");
+}
+
+/**
+ * An element may be an instance of type "EEnumLiteral class".
+ */
+private pattern mayInstanceOfEEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEEnumLiteral_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class".
+ */
+private pattern mustInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class".
+ */
+private pattern mayInstanceOfEModelElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEModelElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class".
+ */
+private pattern mustInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class".
+ */
+private pattern mayInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfENamedElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EObject class".
+ */
+private pattern mustInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EObject class");
+}
+
+/**
+ * An element may be an instance of type "EObject class".
+ */
+private pattern mayInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EOperation class".
+ */
+private pattern mustInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EOperation class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EOperation class");
+}
+
+/**
+ * An element may be an instance of type "EOperation class".
+ */
+private pattern mayInstanceOfEOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEOperation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEOperation_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEOperation_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class".
+ */
+private pattern mustInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class");
+}
+
+/**
+ * An element may be an instance of type "EPackage class".
+ */
+private pattern mayInstanceOfEPackage_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEPackage_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EParameter class".
+ */
+private pattern mustInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EParameter class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EParameter class");
+}
+
+/**
+ * An element may be an instance of type "EParameter class".
+ */
+private pattern mayInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEParameter_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EReference class".
+ */
+private pattern mustInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EReference class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEReference_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EReference class");
+}
+
+/**
+ * An element may be an instance of type "EReference class".
+ */
+private pattern mayInstanceOfEReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEReference_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEReference_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEReference_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EStructuralFeature class".
+ */
+private pattern mustInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EStructuralFeature class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EStructuralFeature class");
+}
+
+/**
+ * An element may be an instance of type "EStructuralFeature class".
+ */
+private pattern mayInstanceOfEStructuralFeature_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStructuralFeature_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ETypedElement class".
+ */
+private pattern mustInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ETypedElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ETypedElement class");
+}
+
+/**
+ * An element may be an instance of type "ETypedElement class".
+ */
+private pattern mayInstanceOfETypedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypedElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfETypedElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EStringToStringMapEntry class".
+ */
+private pattern mustInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EStringToStringMapEntry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EStringToStringMapEntry class");
+}
+
+/**
+ * An element may be an instance of type "EStringToStringMapEntry class".
+ */
+private pattern mayInstanceOfEStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEStringToStringMapEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EGenericType class".
+ */
+private pattern mustInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EGenericType class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EGenericType class");
+}
+
+/**
+ * An element may be an instance of type "EGenericType class".
+ */
+private pattern mayInstanceOfEGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEGenericType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEGenericType_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEGenericType_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ETypeParameter class".
+ */
+private pattern mustInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ETypeParameter class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ETypeParameter class");
+}
+
+/**
+ * An element may be an instance of type "ETypeParameter class".
+ */
+private pattern mayInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypeParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewETypeParameter_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfETypeParameter_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class DefinedPart".
+ */
+private pattern mustInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class DefinedPart".
+ */
+private pattern mayInstanceOfEModelElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EModelElement class UndefinedPart".
+ */
+private pattern mustInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EModelElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EModelElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EModelElement class UndefinedPart".
+ */
+private pattern mayInstanceOfEModelElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class DefinedPart".
+ */
+private pattern mustInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class DefinedPart".
+ */
+private pattern mayInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "ENamedElement class UndefinedPart".
+ */
+private pattern mustInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"ENamedElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"ENamedElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "ENamedElement class UndefinedPart".
+ */
+private pattern mayInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class DefinedPart".
+ */
+private pattern mustInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EPackage class DefinedPart".
+ */
+private pattern mayInstanceOfEPackage_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "EPackage class UndefinedPart".
+ */
+private pattern mustInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"EPackage class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"EPackage class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "EPackage class UndefinedPart".
+ */
+private pattern mayInstanceOfEPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []eAttributeType reference EAttribute(source,target)
+ */
+private pattern mustInRelationeAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAttributeType reference EAttribute(source,target)
+ */
+private pattern mayInRelationeAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAttribute_class(problem,interpretation,source);
+ find mayInstanceOfEDataType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []details reference EAnnotation(source,target)
+ */
+private pattern mustInRelationdetails_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"details reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>details reference EAnnotation(source,target)
+ */
+private pattern mayInRelationdetails_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eModelElement reference EAnnotation(source,target)
+ */
+private pattern mustInRelationeModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eModelElement reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eModelElement reference EAnnotation(source,target)
+ */
+private pattern mayInRelationeModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEModelElement_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference EAnnotation(source,target)
+ */
+private pattern mustInRelationcontents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference EAnnotation(source,target)
+ */
+private pattern mayInRelationcontents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []references reference EAnnotation(source,target)
+ */
+private pattern mustInRelationreferences_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>references reference EAnnotation(source,target)
+ */
+private pattern mayInRelationreferences_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ find mayInstanceOfEObject_class(problem,interpretation,target);
+} or {
+ find mustInRelationreferences_reference_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+} or {
+ find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOperations reference EClass(source,target)
+ */
+private pattern mustInRelationeOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperations reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOperations reference EClass(source,target)
+ */
+private pattern mayInRelationeOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllAttributes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllAttributes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllReferences reference EClass(source,target)
+ */
+private pattern mustInRelationeAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllReferences reference EClass(source,target)
+ */
+private pattern mayInRelationeAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllReferences_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eReferences reference EClass(source,target)
+ */
+private pattern mustInRelationeReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eReferences reference EClass(source,target)
+ */
+private pattern mayInRelationeReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeReferences_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAttributes reference EClass(source,target)
+ */
+private pattern mustInRelationeAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAttributes reference EClass(source,target)
+ */
+private pattern mayInRelationeAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAttributes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllContainments reference EClass(source,target)
+ */
+private pattern mustInRelationeAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllContainments reference EClass(source,target)
+ */
+private pattern mayInRelationeAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllContainments_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllOperations reference EClass(source,target)
+ */
+private pattern mustInRelationeAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllOperations reference EClass(source,target)
+ */
+private pattern mayInRelationeAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllOperations_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllStructuralFeatures reference EClass(source,target)
+ */
+private pattern mustInRelationeAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllStructuralFeatures reference EClass(source,target)
+ */
+private pattern mayInRelationeAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eIDAttribute reference EClass(source,target)
+ */
+private pattern mustInRelationeIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eIDAttribute reference EClass(source,target)
+ */
+private pattern mayInRelationeIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eStructuralFeatures reference EClass(source,target)
+ */
+private pattern mustInRelationeStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eStructuralFeatures reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eStructuralFeatures reference EClass(source,target)
+ */
+private pattern mayInRelationeStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAllGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mustInRelationeAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAllGenericSuperTypes reference EClass(source,target)
+ */
+private pattern mayInRelationeAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+} or {
+ find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []ePackage reference EClassifier(source,target)
+ */
+private pattern mustInRelationePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ePackage reference EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>ePackage reference EClassifier(source,target)
+ */
+private pattern mayInRelationePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationePackage_reference_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameters reference EClassifier(source,target)
+ */
+private pattern mustInRelationeTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameters reference EClassifier(source,target)
+ */
+private pattern mayInRelationeTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eLiterals reference EEnum(source,target)
+ */
+private pattern mustInRelationeLiterals_reference_EEnum(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLiterals reference EEnum");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eLiterals reference EEnum(source,target)
+ */
+private pattern mayInRelationeLiterals_reference_EEnum(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnum_class(problem,interpretation,source);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eEnum reference EEnumLiteral(source,target)
+ */
+private pattern mustInRelationeEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eEnum reference EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eEnum reference EEnumLiteral(source,target)
+ */
+private pattern mayInRelationeEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ find mayInstanceOfEEnum_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeEnum_reference_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eAnnotations reference EModelElement(source,target)
+ */
+private pattern mustInRelationeAnnotations_reference_EModelElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAnnotations reference EModelElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eAnnotations reference EModelElement(source,target)
+ */
+private pattern mayInRelationeAnnotations_reference_EModelElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEModelElement_class(problem,interpretation,source);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeModelElement_reference_EAnnotation(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eContainingClass reference EOperation(source,target)
+ */
+private pattern mustInRelationeContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eContainingClass reference EOperation(source,target)
+ */
+private pattern mayInRelationeContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeContainingClass_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameters reference EOperation(source,target)
+ */
+private pattern mustInRelationeTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameters reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameters reference EOperation(source,target)
+ */
+private pattern mayInRelationeTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eParameters reference EOperation(source,target)
+ */
+private pattern mustInRelationeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eParameters reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eParameters reference EOperation(source,target)
+ */
+private pattern mayInRelationeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEParameter_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eExceptions reference EOperation(source,target)
+ */
+private pattern mustInRelationeExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eExceptions reference EOperation(source,target)
+ */
+private pattern mayInRelationeExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+} or {
+ find mustInRelationeExceptions_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericExceptions reference EOperation(source,target)
+ */
+private pattern mustInRelationeGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericExceptions reference EOperation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericExceptions reference EOperation(source,target)
+ */
+private pattern mayInRelationeGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEOperation_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eClassifiers reference EPackage(source,target)
+ */
+private pattern mustInRelationeClassifiers_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifiers reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eClassifiers reference EPackage(source,target)
+ */
+private pattern mayInRelationeClassifiers_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationePackage_reference_EClassifier(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSubpackages reference EPackage(source,target)
+ */
+private pattern mustInRelationeSubpackages_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSubpackages reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSubpackages reference EPackage(source,target)
+ */
+private pattern mayInRelationeSubpackages_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eSuperPackage reference EPackage(source,target)
+ */
+private pattern mustInRelationeSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperPackage reference EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eSuperPackage reference EPackage(source,target)
+ */
+private pattern mayInRelationeSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ find mayInstanceOfEPackage_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeSuperPackage_reference_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOperation reference EParameter(source,target)
+ */
+private pattern mustInRelationeOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOperation reference EParameter");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOperation reference EParameter(source,target)
+ */
+private pattern mayInRelationeOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEParameter_class(problem,interpretation,source);
+ find mayInstanceOfEOperation_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeOperation_reference_EParameter(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eOpposite reference EReference(source,target)
+ */
+private pattern mustInRelationeOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eOpposite reference EReference(source,target)
+ */
+private pattern mayInRelationeOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEReference_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeOpposite_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eReferenceType reference EReference(source,target)
+ */
+private pattern mustInRelationeReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eReferenceType reference EReference(source,target)
+ */
+private pattern mayInRelationeReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeReferenceType_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eKeys reference EReference(source,target)
+ */
+private pattern mustInRelationeKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eKeys reference EReference(source,target)
+ */
+private pattern mayInRelationeKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ find mayInstanceOfEAttribute_class(problem,interpretation,target);
+} or {
+ find mustInRelationeKeys_reference_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eContainingClass reference EStructuralFeature(source,target)
+ */
+private pattern mustInRelationeContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eContainingClass reference EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eContainingClass reference EStructuralFeature(source,target)
+ */
+private pattern mayInRelationeContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ find mayInstanceOfEClass_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeContainingClass_reference_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eType reference ETypedElement(source,target)
+ */
+private pattern mustInRelationeType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eType reference ETypedElement(source,target)
+ */
+private pattern mayInRelationeType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeType_reference_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eGenericType reference ETypedElement(source,target)
+ */
+private pattern mustInRelationeGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eGenericType reference ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eGenericType reference ETypedElement(source,target)
+ */
+private pattern mayInRelationeGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eUpperBound reference EGenericType(source,target)
+ */
+private pattern mustInRelationeUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eUpperBound reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eUpperBound reference EGenericType(source,target)
+ */
+private pattern mayInRelationeUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeArguments reference EGenericType(source,target)
+ */
+private pattern mustInRelationeTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeArguments reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeArguments reference EGenericType(source,target)
+ */
+private pattern mayInRelationeTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eRawType reference EGenericType(source,target)
+ */
+private pattern mustInRelationeRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eRawType reference EGenericType(source,target)
+ */
+private pattern mayInRelationeRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeRawType_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eLowerBound reference EGenericType(source,target)
+ */
+private pattern mustInRelationeLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eLowerBound reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eLowerBound reference EGenericType(source,target)
+ */
+private pattern mayInRelationeLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eTypeParameter reference EGenericType(source,target)
+ */
+private pattern mustInRelationeTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eTypeParameter reference EGenericType(source,target)
+ */
+private pattern mayInRelationeTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eClassifier reference EGenericType(source,target)
+ */
+private pattern mustInRelationeClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eClassifier reference EGenericType(source,target)
+ */
+private pattern mayInRelationeClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEGenericType_class(problem,interpretation,source);
+ find mayInstanceOfEClassifier_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []eBounds reference ETypeParameter(source,target)
+ */
+private pattern mustInRelationeBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eBounds reference ETypeParameter");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>eBounds reference ETypeParameter(source,target)
+ */
+private pattern mayInRelationeBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypeParameter_class(problem,interpretation,source);
+ find mayInstanceOfEGenericType_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []iD attribute EAttribute(source,target)
+ */
+private pattern mustInRelationiD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>iD attribute EAttribute(source,target)
+ */
+private pattern mayInRelationiD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAttribute_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationiD_attribute_EAttribute(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source attribute EAnnotation(source,target)
+ */
+private pattern mustInRelationsource_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source attribute EAnnotation(source,target)
+ */
+private pattern mayInRelationsource_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEAnnotation_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationsource_attribute_EAnnotation(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []abstract attribute EClass(source,target)
+ */
+private pattern mustInRelationabstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>abstract attribute EClass(source,target)
+ */
+private pattern mayInRelationabstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationabstract_attribute_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationabstract_attribute_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []interface attribute EClass(source,target)
+ */
+private pattern mustInRelationinterface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>interface attribute EClass(source,target)
+ */
+private pattern mayInRelationinterface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClass_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinterface_attribute_EClass(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinterface_attribute_EClass(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []instanceClassName attribute EClassifier(source,target)
+ */
+private pattern mustInRelationinstanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>instanceClassName attribute EClassifier(source,target)
+ */
+private pattern mayInRelationinstanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []instanceTypeName attribute EClassifier(source,target)
+ */
+private pattern mustInRelationinstanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>instanceTypeName attribute EClassifier(source,target)
+ */
+private pattern mayInRelationinstanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEClassifier_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []serializable attribute EDataType(source,target)
+ */
+private pattern mustInRelationserializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>serializable attribute EDataType(source,target)
+ */
+private pattern mayInRelationserializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEDataType_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationserializable_attribute_EDataType(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []value attribute EEnumLiteral(source,target)
+ */
+private pattern mustInRelationvalue_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>value attribute EEnumLiteral(source,target)
+ */
+private pattern mayInRelationvalue_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []literal attribute EEnumLiteral(source,target)
+ */
+private pattern mustInRelationliteral_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>literal attribute EEnumLiteral(source,target)
+ */
+private pattern mayInRelationliteral_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []name attribute ENamedElement(source,target)
+ */
+private pattern mustInRelationname_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>name attribute ENamedElement(source,target)
+ */
+private pattern mayInRelationname_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfENamedElement_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationname_attribute_ENamedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []nsURI attribute EPackage(source,target)
+ */
+private pattern mustInRelationnsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>nsURI attribute EPackage(source,target)
+ */
+private pattern mayInRelationnsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationnsURI_attribute_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []nsPrefix attribute EPackage(source,target)
+ */
+private pattern mustInRelationnsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>nsPrefix attribute EPackage(source,target)
+ */
+private pattern mayInRelationnsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEPackage_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []containment attribute EReference(source,target)
+ */
+private pattern mustInRelationcontainment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>containment attribute EReference(source,target)
+ */
+private pattern mayInRelationcontainment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationcontainment_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []container attribute EReference(source,target)
+ */
+private pattern mustInRelationcontainer_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>container attribute EReference(source,target)
+ */
+private pattern mayInRelationcontainer_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationcontainer_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []resolveProxies attribute EReference(source,target)
+ */
+private pattern mustInRelationresolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>resolveProxies attribute EReference(source,target)
+ */
+private pattern mayInRelationresolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEReference_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []changeable attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationchangeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>changeable attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationchangeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []volatile attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationvolatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>volatile attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationvolatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []transient attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationtransient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>transient attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationtransient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []defaultValueLiteral attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>defaultValueLiteral attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []unsettable attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationunsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>unsettable attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationunsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []derived attribute EStructuralFeature(source,target)
+ */
+private pattern mustInRelationderived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>derived attribute EStructuralFeature(source,target)
+ */
+private pattern mayInRelationderived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStructuralFeature_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []ordered attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>ordered attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationordered_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []unique attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationunique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>unique attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationunique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationunique_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []lowerBound attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationlowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>lowerBound attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationlowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []upperBound attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationupperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>upperBound attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationupperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ IntegerElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []many attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationmany_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>many attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationmany_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationmany_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []required attribute ETypedElement(source,target)
+ */
+private pattern mustInRelationrequired_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>required attribute ETypedElement(source,target)
+ */
+private pattern mayInRelationrequired_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfETypedElement_class(problem,interpretation,source);
+ BooleanElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []key attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mustInRelationkey_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>key attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mayInRelationkey_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []value attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mustInRelationvalue_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>value attribute EStringToStringMapEntry(source,target)
+ */
+private pattern mayInRelationvalue_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,source);
+ StringElement(target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationdetails_reference_EAnnotation(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_EAnnotation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeOperations_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeStructuralFeatures_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeParameters_reference_EClassifier(problem,interpretation,source,target); }or
+
+ { find mustInRelationeLiterals_reference_EEnum(problem,interpretation,source,target); }or
+
+ { find mustInRelationeAnnotations_reference_EModelElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeParameters_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeParameters_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericExceptions_reference_EOperation(problem,interpretation,source,target); }or
+
+ { find mustInRelationeClassifiers_reference_EPackage(problem,interpretation,source,target); }or
+
+ { find mustInRelationeSubpackages_reference_EPackage(problem,interpretation,source,target); }or
+
+ { find mustInRelationeGenericType_reference_ETypedElement(problem,interpretation,source,target); }or
+
+ { find mustInRelationeUpperBound_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeTypeArguments_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeLowerBound_reference_EGenericType(problem,interpretation,source,target); }or
+
+ { find mustInRelationeBounds_reference_ETypeParameter(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_eAttributeType_reference_EAttribute(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ find mustInstanceOfEAttribute_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_eReferenceType_reference_EReference(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ find mustInstanceOfEReference_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeReferenceType_reference_EReference(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_eRawType_reference_EGenericType(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationeRawType_reference_EGenericType(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEOperation_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEGenericType_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEAttribute_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEParameter_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEDataType_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEClassifier_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfETypeParameter_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEReference_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEEnum_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfETypedElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEClass_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfENamedElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_EStringToStringMapEntry_class_by_details_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"details reference EAnnotation");
+ find mustInstanceOfEAnnotation_class(problem,interpretation,container);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject);
+ find mayInRelationdetails_reference_EAnnotation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EStringToStringMapEntry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class");
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnum_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEEnum_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnum_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class");
+ find mayInstanceOfEEnum_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EParameter_class_by_eParameters_reference_EOperation_with_eOperation_reference_EParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eParameters reference EOperation");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eOperation reference EParameter");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfEParameter_class(problem,interpretation,newObject);
+ find mayInRelationeParameters_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EParameter_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class");
+ find mayInstanceOfEParameter_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericSuperTypes reference EClass");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericSuperTypes_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericExceptions reference EOperation");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericExceptions_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eGenericType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eGenericType reference ETypedElement");
+ find mustInstanceOfETypedElement_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeGenericType_reference_ETypedElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eUpperBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eUpperBound reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeUpperBound_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eTypeArguments_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeArguments reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeTypeArguments_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eLowerBound_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLowerBound reference EGenericType");
+ find mustInstanceOfEGenericType_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeLowerBound_reference_EGenericType(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class_by_eBounds_reference_ETypeParameter(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eBounds reference ETypeParameter");
+ find mustInstanceOfETypeParameter_class(problem,interpretation,container);
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayInRelationeBounds_reference_ETypeParameter(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EGenericType_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EGenericType class");
+ find mayInstanceOfEGenericType_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EPackage_class_UndefinedPart_by_eSubpackages_reference_EPackage_with_eSuperPackage_reference_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eSubpackages reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eSuperPackage reference EPackage");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject);
+ find mayInRelationeSubpackages_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EPackage_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart");
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EObject_class_by_contents_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference EAnnotation");
+ find mustInstanceOfEAnnotation_class(problem,interpretation,container);
+ find mayInstanceOfEObject_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_EAnnotation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EObject_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EObject class");
+ find mayInstanceOfEObject_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnumLiteral_class_by_eLiterals_reference_EEnum_with_eEnum_reference_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eLiterals reference EEnum");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eEnum reference EEnumLiteral");
+ find mustInstanceOfEEnum_class(problem,interpretation,container);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject);
+ find mayInRelationeLiterals_reference_EEnum(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EEnumLiteral_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnumLiteral class");
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EClassifier");
+ find mustInstanceOfEClassifier_class(problem,interpretation,container);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayInRelationeTypeParameters_reference_EClassifier(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class_by_eTypeParameters_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eTypeParameters reference EOperation");
+ find mustInstanceOfEOperation_class(problem,interpretation,container);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayInRelationeTypeParameters_reference_EOperation(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_ETypeParameter_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"ETypeParameter class");
+ find mayInstanceOfETypeParameter_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAttribute_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEAttribute_class(problem,interpretation,newObject);
+ find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAttribute_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAttribute class");
+ find mayInstanceOfEAttribute_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EOperation_class_by_eOperations_reference_EClass_with_eContainingClass_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eOperations reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EOperation");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEOperation_class(problem,interpretation,newObject);
+ find mayInRelationeOperations_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EOperation_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EOperation class");
+ find mayInstanceOfEOperation_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAnnotation_class_by_eAnnotations_reference_EModelElement_with_eModelElement_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eAnnotations reference EModelElement");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eModelElement reference EAnnotation");
+ find mustInstanceOfEModelElement_class(problem,interpretation,container);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,newObject);
+ find mayInRelationeAnnotations_reference_EModelElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EAnnotation_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class");
+ find mayInstanceOfEAnnotation_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EReference_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature");
+ find mustInstanceOfEClass_class(problem,interpretation,container);
+ find mayInstanceOfEReference_class(problem,interpretation,newObject);
+ find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EReference_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class");
+ find mayInstanceOfEReference_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EDataType_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEDataType_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EDataType_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EDataType class");
+ find mayInstanceOfEDataType_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EClass_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier");
+ find mustInstanceOfEPackage_class(problem,interpretation,container);
+ find mayInstanceOfEClass_class(problem,interpretation,newObject);
+ find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_EClass_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EClass class");
+ find mayInstanceOfEClass_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_EStringToStringMapEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EGenericType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEModelElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EEnumLiteral_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+}
+pattern refineTypeTo_ETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EOperation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfENamedElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEReference_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfEClassifier_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+ neg find mustInstanceOfEOperation_class(problem,interpretation,element);
+ neg find mustInstanceOfEAttribute_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EDataType_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnum_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+}
+pattern refineTypeTo_EClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEAnnotation_class(problem,interpretation,element);
+ neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEGenericType_class(problem,interpretation,element);
+ neg find mustInstanceOfEObject_class(problem,interpretation,element);
+ neg find mustInstanceOfEDataType_class(problem,interpretation,element);
+ neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element);
+ neg find mustInstanceOfETypeParameter_class(problem,interpretation,element);
+ neg find mustInstanceOfETypedElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEClass_class(problem,interpretation,element);
+ neg find mustInstanceOfEPackage_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_eAttributeType_reference_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAttribute_class(problem,interpretation,from);
+ find mustInstanceOfEDataType_class(problem,interpretation,to);
+ find mayInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to);
+ neg find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to);
+}
+pattern refineRelation_references_reference_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,from);
+ find mustInstanceOfEObject_class(problem,interpretation,to);
+ find mayInRelationreferences_reference_EAnnotation(problem,interpretation,from,to);
+ neg find mustInRelationreferences_reference_EAnnotation(problem,interpretation,from,to);
+}
+pattern refineRelation_eSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeAllReferences_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllReferences_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eReferences_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeReferences_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeReferences_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAttributes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeAttributes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAttributes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllContainments_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeAllContainments_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllContainments_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllOperations_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEOperation_class(problem,interpretation,to);
+ find mayInRelationeAllOperations_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllOperations_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllStructuralFeatures_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,to);
+ find mayInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eIDAttribute_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eAllGenericSuperTypes_reference_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ find mustInstanceOfEGenericType_class(problem,interpretation,to);
+ find mayInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to);
+ neg find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_eExceptions_reference_EOperation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEOperation_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeExceptions_reference_EOperation(problem,interpretation,from,to);
+ neg find mustInRelationeExceptions_reference_EOperation(problem,interpretation,from,to);
+}
+pattern refineRelation_eOpposite_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEReference_class(problem,interpretation,to);
+ find mayInRelationeOpposite_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeOpposite_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eReferenceType_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEClass_class(problem,interpretation,to);
+ find mayInRelationeReferenceType_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeReferenceType_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eKeys_reference_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ find mustInstanceOfEAttribute_class(problem,interpretation,to);
+ find mayInRelationeKeys_reference_EReference(problem,interpretation,from,to);
+ neg find mustInRelationeKeys_reference_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_eType_reference_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeType_reference_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationeType_reference_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_eRawType_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeRawType_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeRawType_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_eTypeParameter_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfETypeParameter_class(problem,interpretation,to);
+ find mayInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_eClassifier_reference_EGenericType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEGenericType_class(problem,interpretation,from);
+ find mustInstanceOfEClassifier_class(problem,interpretation,to);
+ find mayInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to);
+ neg find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to);
+}
+pattern refineRelation_iD_attribute_EAttribute(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAttribute_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationiD_attribute_EAttribute(problem,interpretation,from,to);
+ neg find mustInRelationiD_attribute_EAttribute(problem,interpretation,from,to);
+}
+pattern refineRelation_source_attribute_EAnnotation(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEAnnotation_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationsource_attribute_EAnnotation(problem,interpretation,from,to);
+ neg find mustInRelationsource_attribute_EAnnotation(problem,interpretation,from,to);
+}
+pattern refineRelation_abstract_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationabstract_attribute_EClass(problem,interpretation,from,to);
+ neg find mustInRelationabstract_attribute_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_interface_attribute_EClass(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClass_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationinterface_attribute_EClass(problem,interpretation,from,to);
+ neg find mustInRelationinterface_attribute_EClass(problem,interpretation,from,to);
+}
+pattern refineRelation_instanceClassName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClassifier_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to);
+ neg find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to);
+}
+pattern refineRelation_instanceTypeName_attribute_EClassifier(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEClassifier_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to);
+ neg find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to);
+}
+pattern refineRelation_serializable_attribute_EDataType(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEDataType_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationserializable_attribute_EDataType(problem,interpretation,from,to);
+ neg find mustInRelationserializable_attribute_EDataType(problem,interpretation,from,to);
+}
+pattern refineRelation_value_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to);
+ neg find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to);
+}
+pattern refineRelation_literal_attribute_EEnumLiteral(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEEnumLiteral_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to);
+ neg find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to);
+}
+pattern refineRelation_name_attribute_ENamedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfENamedElement_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationname_attribute_ENamedElement(problem,interpretation,from,to);
+ neg find mustInRelationname_attribute_ENamedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_nsURI_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEPackage_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationnsURI_attribute_EPackage(problem,interpretation,from,to);
+ neg find mustInRelationnsURI_attribute_EPackage(problem,interpretation,from,to);
+}
+pattern refineRelation_nsPrefix_attribute_EPackage(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEPackage_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to);
+ neg find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to);
+}
+pattern refineRelation_containment_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationcontainment_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationcontainment_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_container_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationcontainer_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationcontainer_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_resolveProxies_attribute_EReference(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEReference_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to);
+ neg find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to);
+}
+pattern refineRelation_changeable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_volatile_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_transient_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_defaultValueLiteral_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_unsettable_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_derived_attribute_EStructuralFeature(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStructuralFeature_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to);
+ neg find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to);
+}
+pattern refineRelation_ordered_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationordered_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationordered_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_unique_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationunique_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationunique_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_lowerBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_upperBound_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ IntegerElement(to);
+ find mayInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_many_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationmany_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationmany_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_required_attribute_ETypedElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfETypedElement_class(problem,interpretation,from);
+ BooleanElement(to);
+ find mayInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to);
+ neg find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to);
+}
+pattern refineRelation_key_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+ neg find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+}
+pattern refineRelation_value_attribute_EStringToStringMapEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from);
+ StringElement(to);
+ find mayInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+ neg find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to);
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem
index ab657f0b..169eadb3 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem
@@ -1995,7 +1995,7 @@
-
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/problem.als b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/problem.als
new file mode 100644
index 00000000..16ff4006
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/problem.als
@@ -0,0 +1,203 @@
+one sig util'language {
+ util'root : one type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))),
+ util'contains : (type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart)))))))))) lone->set (type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))))
+}
+abstract sig util'Object {
+}
+sig type'FunctionalElement'class in util'Object {
+ interface'reference'FunctionalElement : lone type'FunctionalInterface'class,
+ parent'reference'FunctionalElement : lone type'Function'class
+}
+sig type'FunctionalArchitectureModel'class in util'Object {
+ rootElements'reference'FunctionalArchitectureModel : set type'FunctionalElement'class
+}
+sig type'Function'class in type'FunctionalElement'class {
+ subElements'reference'Function : set type'FunctionalElement'class
+}
+sig type'FAMTerminator'class in util'Object {
+ data'reference'FAMTerminator : lone type'FunctionalData'class
+}
+sig type'InformationLink'class in util'Object {
+ from'reference'InformationLink : lone type'FunctionalOutput'class,
+ to'reference'InformationLink : one type'FunctionalInput'class
+}
+sig type'FunctionalInterface'class in util'Object {
+ data'reference'FunctionalInterface : set type'FunctionalData'class,
+ element'reference'FunctionalInterface : lone type'FunctionalElement'class
+}
+sig type'FunctionalInput'class in type'FunctionalData'class {
+ IncomingLinks'reference'FunctionalInput : set type'InformationLink'class
+}
+sig type'FunctionalOutput'class in type'FunctionalData'class {
+ outgoingLinks'reference'FunctionalOutput : set type'InformationLink'class
+}
+sig type'FunctionalData'class in util'Object {
+ terminator'reference'FunctionalData : lone type'FAMTerminator'class,
+ interface'reference'FunctionalData : lone type'FunctionalInterface'class
+}
+sig type'FunctionType'enum in util'Object {
+}
+sig type'FunctionalArchitectureModel'class'DefinedPart in type'FunctionalArchitectureModel'class {
+}
+sig type'FunctionalArchitectureModel'class'UndefinedPart in type'FunctionalArchitectureModel'class {
+}
+one sig element'o'1 in type'FunctionalArchitectureModel'class'DefinedPart {
+}
+one sig element'Root'literal'FunctionType,
+element'Intermediate'literal'FunctionType,
+element'Leaf'literal'FunctionType in type'FunctionType'enum {
+}
+pred pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'terminatorAndInformation [parameter'T: type'FAMTerminator'class, parameter'I: type'InformationLink'class] {
+ (some variable'Out: type'FunctionalOutput'class { parameter'I in variable'Out.outgoingLinks'reference'FunctionalOutput && parameter'T in variable'Out.terminator'reference'FunctionalData }) || (some variable'In: type'FunctionalInput'class { variable'In in parameter'I.to'reference'InformationLink && (variable'In in type'FunctionalInput'class && parameter'T in variable'In.terminator'reference'FunctionalData) })
+}
+pred pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'type [parameter'This: type'Function'class, parameter'Target: type'FunctionType'enum] {
+ (some variable'Model: type'FunctionalArchitectureModel'class { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'rootElements [ variable'Model , parameter'This ] && parameter'Target = element'Root'literal'FunctionType }) || ((all variable'Child: type'Function'class, variable'Model: type'FunctionalArchitectureModel'class { parameter'This in type'Function'class && (! (pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'parent [ variable'Child , parameter'This ]) && (! (pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'rootElements [ variable'Model , parameter'This ]) && parameter'Target = element'Leaf'literal'FunctionType)) }) || (some variable'Par: type'Function'class, variable'Child: type'Function'class { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'parent [ parameter'This , variable'Par ] && (pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'parent [ variable'Child , parameter'This ] && parameter'Target = element'Intermediate'literal'FunctionType) }))
+}
+pred pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'rootElements [parameter'Model: type'FunctionalArchitectureModel'class, parameter'Root: type'Function'class] {
+ parameter'Root in type'Function'class && parameter'Root in parameter'Model.rootElements'reference'FunctionalArchitectureModel
+}
+pred pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'parent [parameter'Func: type'Function'class, parameter'Par: type'Function'class] {
+ parameter'Func in type'Function'class && (parameter'Par in parameter'Func.parent'reference'FunctionalElement && parameter'Par in type'Function'class)
+}
+pred pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'model [parameter'This: type'FunctionalElement'class, parameter'Target: type'FunctionalArchitectureModel'class] {
+ parameter'This in type'FunctionalElement'class && parameter'Target in type'FunctionalArchitectureModel'class
+}
+fact typedefinition'FunctionType'enum {
+ type'FunctionType'enum = element'Root'literal'FunctionType + (element'Intermediate'literal'FunctionType + element'Leaf'literal'FunctionType)
+}
+fact typedefinition'FunctionalArchitectureModel'class'DefinedPart {
+ type'FunctionalArchitectureModel'class'DefinedPart = element'o'1
+}
+fact typeElementsUnique'FunctionType'enum {
+ element'Root'literal'FunctionType != element'Intermediate'literal'FunctionType && (element'Root'literal'FunctionType != element'Leaf'literal'FunctionType && (element'Root'literal'FunctionType != element'o'1 && (element'Intermediate'literal'FunctionType != element'Leaf'literal'FunctionType && (element'Intermediate'literal'FunctionType != element'o'1 && element'Leaf'literal'FunctionType != element'o'1))))
+}
+fact typeElementsUnique'FunctionalArchitectureModel'class'DefinedPart {
+ element'Root'literal'FunctionType != element'Intermediate'literal'FunctionType && (element'Root'literal'FunctionType != element'Leaf'literal'FunctionType && (element'Root'literal'FunctionType != element'o'1 && (element'Intermediate'literal'FunctionType != element'Leaf'literal'FunctionType && (element'Intermediate'literal'FunctionType != element'o'1 && element'Leaf'literal'FunctionType != element'o'1))))
+}
+fact abstract'FunctionalElement'class {
+ type'FunctionalElement'class = type'Function'class
+}
+fact abstract'FunctionalArchitectureModel'class {
+ type'FunctionalArchitectureModel'class = type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart
+}
+fact abstract'FunctionalData'class {
+ type'FunctionalData'class = type'FunctionalInput'class + type'FunctionalOutput'class
+}
+fact ObjectTypeDefinition {
+ util'Object = type'FunctionalElement'class + (type'FunctionalArchitectureModel'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalData'class + type'FunctionType'enum)))))
+}
+fact common'types'FunctionalArchitectureModel'class'FunctionalElement'class {
+ type'FunctionalArchitectureModel'class & type'FunctionalElement'class = none
+}
+fact common'types'FAMTerminator'class'FunctionalElement'class {
+ type'FAMTerminator'class & type'FunctionalElement'class = none
+}
+fact common'types'FAMTerminator'class'FunctionalArchitectureModel'class {
+ type'FAMTerminator'class & type'FunctionalArchitectureModel'class = none
+}
+fact common'types'InformationLink'class'FunctionalElement'class {
+ type'InformationLink'class & type'FunctionalElement'class = none
+}
+fact common'types'InformationLink'class'FunctionalArchitectureModel'class {
+ type'InformationLink'class & type'FunctionalArchitectureModel'class = none
+}
+fact common'types'InformationLink'class'FAMTerminator'class {
+ type'InformationLink'class & type'FAMTerminator'class = none
+}
+fact common'types'FunctionalInterface'class'FunctionalElement'class {
+ type'FunctionalInterface'class & type'FunctionalElement'class = none
+}
+fact common'types'FunctionalInterface'class'FunctionalArchitectureModel'class {
+ type'FunctionalInterface'class & type'FunctionalArchitectureModel'class = none
+}
+fact common'types'FunctionalInterface'class'FAMTerminator'class {
+ type'FunctionalInterface'class & type'FAMTerminator'class = none
+}
+fact common'types'FunctionalInterface'class'InformationLink'class {
+ type'FunctionalInterface'class & type'InformationLink'class = none
+}
+fact common'types'FunctionalData'class'FunctionalElement'class {
+ type'FunctionalData'class & type'FunctionalElement'class = none
+}
+fact common'types'FunctionalData'class'FunctionalArchitectureModel'class {
+ type'FunctionalData'class & type'FunctionalArchitectureModel'class = none
+}
+fact common'types'FunctionalData'class'FAMTerminator'class {
+ type'FunctionalData'class & type'FAMTerminator'class = none
+}
+fact common'types'FunctionalData'class'InformationLink'class {
+ type'FunctionalData'class & type'InformationLink'class = none
+}
+fact common'types'FunctionalData'class'FunctionalInterface'class {
+ type'FunctionalData'class & type'FunctionalInterface'class = none
+}
+fact common'types'FunctionType'enum'FunctionalElement'class {
+ type'FunctionType'enum & type'FunctionalElement'class = none
+}
+fact common'types'FunctionType'enum'FunctionalArchitectureModel'class {
+ type'FunctionType'enum & type'FunctionalArchitectureModel'class = none
+}
+fact common'types'FunctionType'enum'FAMTerminator'class {
+ type'FunctionType'enum & type'FAMTerminator'class = none
+}
+fact common'types'FunctionType'enum'InformationLink'class {
+ type'FunctionType'enum & type'InformationLink'class = none
+}
+fact common'types'FunctionType'enum'FunctionalInterface'class {
+ type'FunctionType'enum & type'FunctionalInterface'class = none
+}
+fact common'types'FunctionType'enum'FunctionalData'class {
+ type'FunctionType'enum & type'FunctionalData'class = none
+}
+fact common'types'FunctionalArchitectureModel'class'UndefinedPart'FunctionalArchitectureModel'class'DefinedPart {
+ type'FunctionalArchitectureModel'class'UndefinedPart & type'FunctionalArchitectureModel'class'DefinedPart = none
+}
+fact common'types'FunctionalOutput'class'FunctionalInput'class {
+ type'FunctionalOutput'class & type'FunctionalInput'class = none
+}
+fact util'containmentDefinition {
+ util'language.util'contains = interface'reference'FunctionalElement + (rootElements'reference'FunctionalArchitectureModel + (subElements'reference'Function + (data'reference'FunctionalInterface + (outgoingLinks'reference'FunctionalOutput + terminator'reference'FunctionalData))))
+}
+fact util'noParentForRoot {
+ no parent: type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))) { parent->(util'language.util'root) in util'language.util'contains }
+}
+fact util'atLeastOneParent {
+ all child: type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))) { child = util'language.util'root || (some parent: type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))) { parent->child in util'language.util'contains }) }
+}
+fact util'noCircularContainment {
+ no circle: type'FunctionalArchitectureModel'class + (type'FunctionalData'class + (type'Function'class + (type'FAMTerminator'class + (type'InformationLink'class + (type'FunctionalInterface'class + (type'FunctionalElement'class + (type'FunctionalInput'class + (type'FunctionalOutput'class + (type'FunctionalArchitectureModel'class'DefinedPart + type'FunctionalArchitectureModel'class'UndefinedPart))))))))) { circle->circle in ^ (util'language.util'contains) }
+}
+fact lowerMultiplicity'model'FunctionalElement {
+ all src: type'FunctionalElement'class { some trg'1: type'FunctionalArchitectureModel'class { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'model [ src , trg'1 ] } }
+}
+fact upperMultiplicity'model'FunctionalElement {
+ all src: type'FunctionalElement'class, trg'1: type'FunctionalArchitectureModel'class, trg'2: type'FunctionalArchitectureModel'class { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'model [ src , trg'1 ] && pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'model [ src , trg'2 ] => ! (trg'1 != trg'2) }
+}
+fact oppositeReference'interface'FunctionalElement {
+ interface'reference'FunctionalElement = ~ element'reference'FunctionalInterface
+}
+fact oppositeReference'parent'FunctionalElement {
+ parent'reference'FunctionalElement = ~ subElements'reference'Function
+}
+fact oppositeReference'data'FAMTerminator {
+ data'reference'FAMTerminator = ~ terminator'reference'FunctionalData
+}
+fact oppositeReference'from'InformationLink {
+ from'reference'InformationLink = ~ outgoingLinks'reference'FunctionalOutput
+}
+fact oppositeReference'to'InformationLink {
+ to'reference'InformationLink = ~ IncomingLinks'reference'FunctionalInput
+}
+fact oppositeReference'data'FunctionalInterface {
+ data'reference'FunctionalInterface = ~ interface'reference'FunctionalData
+}
+fact lowerMultiplicity'type'Function {
+ all src: type'Function'class { some trg'1: type'FunctionType'enum { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'type [ src , trg'1 ] } }
+}
+fact upperMultiplicity'type'Function {
+ all src: type'Function'class, trg'1: type'FunctionType'enum, trg'2: type'FunctionType'enum { pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'type [ src , trg'1 ] && pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'type [ src , trg'2 ] => ! (trg'1 != trg'2) }
+}
+fact errorpattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'terminatorAndInformation {
+ all p0: type'FAMTerminator'class, p1: type'InformationLink'class { ! (pattern'ca'mcgill'ecse'dslreasoner'standalone'test'fam'queries'terminatorAndInformation [ p0 , p1 ]) }
+}
+run { } for exactly 5 util'Object , 31 Int , exactly 0 String
\ No newline at end of file
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt
index 69222b92..8c87a095 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt
@@ -1 +1 @@
-Model generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, 3 models are generated!Models: [1.xmi][2.xmi][3.xmi]Visualisations: [1.gml][2.gml][3.gml]Visualisations: [1.png][2.png][3.png]Model generation finishedModel generation startedProblem is consistent, 3 models are generated!Models: [1.xmi][2.xmi][3.xmi]Visualisations: [1.gml][2.gml][3.gml]Visualisations: [1.png][2.png][3.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finished
\ No newline at end of file
+Model generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, 3 models are generated!Models: [1.xmi][2.xmi][3.xmi]Visualisations: [1.gml][2.gml][3.gml]Visualisations: [1.png][2.png][3.png]Model generation finishedModel generation startedProblem is consistent, 3 models are generated!Models: [1.xmi][2.xmi][3.xmi]Visualisations: [1.gml][2.gml][3.gml]Visualisations: [1.png][2.png][3.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedModel generation startedModel generation startedModel generation startedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 3 models are generated!Models: [1.xmi][2.xmi][3.xmi]Visualisations: [1.gml][2.gml][3.gml]Visualisations: [1.png][2.png][3.png]Model generation finishedModel generation startedProblem is consistent, 3 models are generated!Models: [1.xmi][2.xmi][3.xmi]Visualisations: [1.gml][2.gml][3.gml]Visualisations: [1.png][2.png][3.png]Model generation finishedModel generation startedProblem is consistent, 3 models are generated!Models: [1.xmi][2.xmi][3.xmi]Visualisations: [1.gml][2.gml][3.gml]Visualisations: [1.png][2.png][3.png]Model generation finishedModel generation startedModel generation startedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedModel generation startedProblem is consistent, 3 models are generated!Models: [1.xmi][2.xmi][3.xmi]Visualisations: [1.gml][2.gml][3.gml]Visualisations: [1.png][2.png][3.png]Model generation finished
\ No newline at end of file
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml
index c55209f7..9eac10b7 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml
@@ -7639,3 +7639,6782 @@ graph
]
]
]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Root literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 297.0
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Intermediate literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Leaf literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 361.90000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalArchitectureModel class DefinedPart
+ FunctionalArchitectureModel class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalElement class
+ Function class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 3
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "model reference FunctionalElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "rootElements reference FunctionalArchitectureModel"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "type attribute Function"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Root literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 297.0
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Intermediate literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Leaf literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 361.90000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalArchitectureModel class DefinedPart
+ FunctionalArchitectureModel class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalElement class
+ Function class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 3
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "model reference FunctionalElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "rootElements reference FunctionalArchitectureModel"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "type attribute Function"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source attribute EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 124
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EEnum class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 124
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EEnum class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EEnumLiteral class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ ETypeParameter class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eTypeParameters reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eLiterals reference EEnum"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eEnum reference EEnumLiteral"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "literal attribute EEnumLiteral"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 124
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EEnum class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ ETypeParameter class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eTypeParameters reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ ETypeParameter class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 13
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eTypeParameters reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 12
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "abstract attribute EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "interface attribute EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Root literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 297.0
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Intermediate literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Leaf literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 361.90000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalArchitectureModel class DefinedPart
+ FunctionalArchitectureModel class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalElement class
+ Function class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 3
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "model reference FunctionalElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "rootElements reference FunctionalArchitectureModel"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "type attribute Function"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EOperation class
+ ETypedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 238.70000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EStringToStringMapEntry class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "details reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperTypes reference EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eOperations reference EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAllSuperTypes reference EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eContainingClass reference EOperation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "unique attribute ETypedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 4
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "upperBound attribute ETypedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png
index c1d6f49f..0ea0ef1b 100644
Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png differ
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi
index d9529633..cb79481b 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi
@@ -1,9 +1,10 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml
index f6242732..77ffa87d 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml
@@ -4760,3 +4760,6877 @@ graph
]
]
]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Root literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 297.0
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Intermediate literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Leaf literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 361.90000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalArchitectureModel class DefinedPart
+ FunctionalArchitectureModel class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalElement class
+ Function class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 3
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "model reference FunctionalElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "rootElements reference FunctionalArchitectureModel"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "type attribute Function"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Root literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 297.0
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Intermediate literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Leaf literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 361.90000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalArchitectureModel class DefinedPart
+ FunctionalArchitectureModel class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalElement class
+ Function class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 3
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "model reference FunctionalElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "rootElements reference FunctionalArchitectureModel"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "type attribute Function"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source attribute EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 124
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EEnum class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 124
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EEnum class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EEnumLiteral class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ ETypeParameter class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eTypeParameters reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eLiterals reference EEnum"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eEnum reference EEnumLiteral"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source attribute EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "literal attribute EEnumLiteral"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 124
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EEnum class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ ETypeParameter class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eTypeParameters reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ ETypeParameter class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 13
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eTypeParameters reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 12
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "abstract attribute EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "interface attribute EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Root literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 297.0
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Intermediate literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 226.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "Leaf literal FunctionType"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionType enum
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 361.90000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalArchitectureModel class DefinedPart
+ FunctionalArchitectureModel class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FunctionalElement class
+ Function class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 3
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "model reference FunctionalElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "rootElements reference FunctionalArchitectureModel"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "type attribute Function"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EOperation class
+ ETypedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 238.70000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EStringToStringMapEntry class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "details reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperTypes reference EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eOperations reference EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAllSuperTypes reference EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eContainingClass reference EOperation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "unique attribute ETypedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 4
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "upperBound attribute ETypedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png
index e01ca46b..b5fea093 100644
Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png differ
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi
index c6287127..4a9086fe 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi
@@ -1,9 +1,10 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml
index 05f41ccb..55dc70ba 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml
@@ -2067,3 +2067,5616 @@ graph
]
]
]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source attribute EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 124
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EEnum class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 124
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EEnum class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EEnumLiteral class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ ETypeParameter class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eTypeParameters reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eLiterals reference EEnum"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eEnum reference EEnumLiteral"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source attribute EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "literal attribute EEnumLiteral"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 124
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EEnum class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ ETypeParameter class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eTypeParameters reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source attribute EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ ETypeParameter class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 13
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eTypeParameters reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 12
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "abstract attribute EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "interface attribute EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ EPackage class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class
+ ENamedElement class
+ EOperation class
+ ETypedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 238.70000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EStringToStringMapEntry class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "details reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperTypes reference EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eOperations reference EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAllSuperTypes reference EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 11
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eContainingClass reference EOperation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSubpackages reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eSuperPackage reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 1
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "unique attribute ETypedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 4
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "upperBound attribute ETypedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png
index afaa28c2..bfe18c4e 100644
Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png differ
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi
index ef8e8e65..45634c72 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi
@@ -1,9 +1,10 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml
index d61b14d0..a44b2785 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml
@@ -1182,3 +1182,1139 @@ graph
]
]
]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source attribute EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png
index 72ccb4b6..a47da297 100644
Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png differ
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi
index 1a10e5b6..8bff1dc6 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi
@@ -1,9 +1,8 @@
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml
index f071f63e..e5647b66 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml
@@ -1201,3 +1201,1158 @@ graph
]
]
]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 254.10000000000002
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EModelElement class DefinedPart
+ ENamedElement class DefinedPart
+ EPackage class DefinedPart
+ EModelElement class
+ ENamedElement class
+ EPackage class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 24.200000000000003
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "-1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "0"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 15.400000000000002
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""A""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 33.0
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""B""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 94.60000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsPrefix""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 68.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""nsUri""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 121.00000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text ""packageName""
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 12
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 13
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClass class
+ EClassifier class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 14
+ graphics
+ [
+ w 269.5
+ h 110
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EClassifier class
+ EDataType class
+ EModelElement class
+ ENamedElement class
+ EModelElement class UndefinedPart
+ ENamedElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 15
+ graphics
+ [
+ w 269.5
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ EAnnotation class
+ EModelElement class
+ EModelElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 16
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 17
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 18
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 19
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 15
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eModelElement reference EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 0
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "ePackage reference EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 12
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 15
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eAnnotations reference EModelElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 11
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 13
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 14
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "eClassifiers reference EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 12
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source attribute EAnnotation"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "abstract attribute EClass"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceClassName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "instanceTypeName attribute EClassifier"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 2
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "serializable attribute EDataType"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 10
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 11
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 13
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 14
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "name attribute ENamedElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 9
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsURI attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 8
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "nsPrefix attribute EPackage"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png
index bb835587..7b6e8da5 100644
Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png differ
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi
index 1a10e5b6..8bff1dc6 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi
@@ -1,9 +1,8 @@
-
-
-
-
-
-
+
+
+
+
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv
index 0c19baf2..6422beb9 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv
@@ -30,3 +30,19 @@ Task;Run;Result;Domain to logic transformation time;Logic to solver transformati
1;1;ModelResultImpl;443;2849;2573;4906642931;151;171;75;124;7;0;8
Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;_Solution3FoundAt;_Solution4FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
2;1;ModelResultImpl;19;4315;9042;20459725100;239;247;252;257;261;217;19;6;0;11
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;513;2237;2193;6152392500;162;177;77;150;6;0;5
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;11;1602;1604;2992330200;66;77;38;16;1;0;3
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;_Solution3FoundAt;_Solution4FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+2;1;ModelResultImpl;128;4855;10109;16068923000;382;391;398;403;409;349;37;8;0;16
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+2;1;ModelResultImpl;18;3632;9743;7955260600;299;307;313;261;17;7;0;8
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+2;1;ModelResultImpl;471;5606;10554;10190416000;482;497;509;400;189;16;0;21
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+2;1;ModelResultImpl;28;4850;10801;9664839300;622;635;651;560;23;18;0;20
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;6;1884;1462;3186743800;40;48;20;16;1;0;1
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+2;1;ModelResultImpl;9;4021;9222;7668037900;233;239;243;201;10;8;0;6
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/errors.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/errors.txt
index 2086fece..5caab94d 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/errors.txt
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/errors.txt
@@ -18,4 +18,58 @@ Error occured (IllegalArgumentException): Class FunctionalArchitectureModel is n
hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339)
hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Error loading group hu.bme.mit.inf.dslreasoner.domains.alloyexamples.FileSystem
+ org.eclipse.viatra.query.runtime.registry.ExtensionBasedQuerySpecificationLoader$QueryGroupProvider.get(ExtensionBasedQuerySpecificationLoader.java:204)
+ org.eclipse.viatra.query.runtime.registry.ExtensionBasedQuerySpecificationLoader$GroupBasedQuerySpecificationProvider.get(ExtensionBasedQuerySpecificationLoader.java:282)
+ org.eclipse.viatra.query.runtime.registry.ExtensionBasedQuerySpecificationLoader$GroupBasedQuerySpecificationProvider.get(ExtensionBasedQuerySpecificationLoader.java:1)
+ org.eclipse.viatra.query.runtime.registry.data.RegistryEntryImpl.get(RegistryEntryImpl.java:66)
+ org.eclipse.viatra.query.runtime.registry.data.RegistryEntryImpl.get(RegistryEntryImpl.java:1)
+ org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.findQuerySpecification(QueryBasedFeatureSettingDelegateFactory.java:152)
+ org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.createSettingDelegate(QueryBasedFeatureSettingDelegateFactory.java:113)
+ org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:854)
+ ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl.(FileSystemImpl.java:55)
+ ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemFactoryImpl.createFileSystem(filesystemFactoryImpl.java:74)
+ ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemFactoryImpl.create(filesystemFactoryImpl.java:59)
+ hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:75)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Error loading group hu.bme.mit.inf.dslreasoner.domains.alloyexamples.FileSystem
+ org.eclipse.viatra.query.runtime.registry.ExtensionBasedQuerySpecificationLoader$QueryGroupProvider.get(ExtensionBasedQuerySpecificationLoader.java:204)
+ org.eclipse.viatra.query.runtime.registry.ExtensionBasedQuerySpecificationLoader$GroupBasedQuerySpecificationProvider.get(ExtensionBasedQuerySpecificationLoader.java:282)
+ org.eclipse.viatra.query.runtime.registry.ExtensionBasedQuerySpecificationLoader$GroupBasedQuerySpecificationProvider.get(ExtensionBasedQuerySpecificationLoader.java:1)
+ org.eclipse.viatra.query.runtime.registry.data.RegistryEntryImpl.get(RegistryEntryImpl.java:66)
+ org.eclipse.viatra.query.runtime.registry.data.RegistryEntryImpl.get(RegistryEntryImpl.java:1)
+ org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.findQuerySpecification(QueryBasedFeatureSettingDelegateFactory.java:152)
+ org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.createSettingDelegate(QueryBasedFeatureSettingDelegateFactory.java:113)
+ org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:854)
+ ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl.(FileSystemImpl.java:55)
+ ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemFactoryImpl.createFileSystem(filesystemFactoryImpl.java:74)
+ ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemFactoryImpl.create(filesystemFactoryImpl.java:59)
+ hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:75)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
+ org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (NullPointerException):
+ hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.lambda$8(QueryLoader.java:108)
+ org.eclipse.xtext.xbase.lib.internal.BooleanFunctionDelegate.apply(BooleanFunctionDelegate.java:41)
+ com.google.common.collect.Iterators$6.computeNext(Iterators.java:617)
+ com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)
+ com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140)
+ com.google.common.collect.Iterators.addAll(Iterators.java:366)
+ com.google.common.collect.Iterables.addAll(Iterables.java:332)
+ com.google.common.collect.Sets.newLinkedHashSet(Sets.java:383)
+ org.eclipse.xtext.xbase.lib.IterableExtensions.toSet(IterableExtensions.java:592)
+ hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader._getPatterns(QueryLoader.java:84)
+ hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.getPatterns(QueryLoader.java:213)
+ hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.loadQueries(QueryLoader.java:54)
+ hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:167)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111)
+ hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73)
org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)
\ No newline at end of file
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated
index 6d8fc404..f90ed439 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated
@@ -1470,3 +1470,23535 @@ pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference
find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "FileSystem class".
+ */
+private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FileSystem class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FileSystem class");
+}
+
+/**
+ * An element may be an instance of type "FileSystem class".
+ */
+private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFileSystem_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FSObject class".
+ */
+private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FSObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FSObject class");
+}
+
+/**
+ * An element may be an instance of type "FSObject class".
+ */
+private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFSObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Dir class".
+ */
+private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Dir class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Dir class");
+}
+
+/**
+ * An element may be an instance of type "Dir class".
+ */
+private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfDir_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "File class".
+ */
+private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"File class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"File class");
+}
+
+/**
+ * An element may be an instance of type "File class".
+ */
+private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFile_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class".
+ */
+private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class");
+}
+
+/**
+ * An element may be an instance of type "Model class".
+ */
+private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class DefinedPart".
+ */
+private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class DefinedPart".
+ */
+private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class UndefinedPart".
+ */
+private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class UndefinedPart".
+ */
+private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []root reference FileSystem(source,target)
+ */
+private pattern mustInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>root reference FileSystem(source,target)
+ */
+private pattern mayInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFileSystem_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []live reference FileSystem(source,target)
+ */
+private pattern mustInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>live reference FileSystem(source,target)
+ */
+private pattern mayInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFileSystem_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+} or {
+ find mustInRelationlive_reference_FileSystem(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []parent reference FSObject(source,target)
+ */
+private pattern mustInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>parent reference FSObject(source,target)
+ */
+private pattern mayInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFSObject_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationparent_reference_FSObject(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference Dir(source,target)
+ */
+private pattern mustInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference Dir(source,target)
+ */
+private pattern mayInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfDir_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_Dir(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []filesystems reference Model(source,target)
+ */
+private pattern mustInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>filesystems reference Model(source,target)
+ */
+private pattern mayInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFileSystem_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target)
+ */
+private pattern mustInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target)
+ */
+private pattern mayInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or
+
+ { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or
+
+ { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFile_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_Model_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart");
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_root_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class_by_filesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+}
+pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_live_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFileSystem_class(problem,interpretation,from);
+ find mustInstanceOfFSObject_class(problem,interpretation,to);
+ find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+ neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "FileSystem class".
+ */
+private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FileSystem class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FileSystem class");
+}
+
+/**
+ * An element may be an instance of type "FileSystem class".
+ */
+private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFileSystem_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FSObject class".
+ */
+private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FSObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FSObject class");
+}
+
+/**
+ * An element may be an instance of type "FSObject class".
+ */
+private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFSObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Dir class".
+ */
+private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Dir class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Dir class");
+}
+
+/**
+ * An element may be an instance of type "Dir class".
+ */
+private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfDir_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "File class".
+ */
+private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"File class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"File class");
+}
+
+/**
+ * An element may be an instance of type "File class".
+ */
+private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFile_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class".
+ */
+private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class");
+}
+
+/**
+ * An element may be an instance of type "Model class".
+ */
+private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class DefinedPart".
+ */
+private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class DefinedPart".
+ */
+private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class UndefinedPart".
+ */
+private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class UndefinedPart".
+ */
+private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []root reference FileSystem(source,target)
+ */
+private pattern mustInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>root reference FileSystem(source,target)
+ */
+private pattern mayInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFileSystem_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []live reference FileSystem(source,target)
+ */
+private pattern mustInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>live reference FileSystem(source,target)
+ */
+private pattern mayInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFileSystem_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+} or {
+ find mustInRelationlive_reference_FileSystem(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []parent reference FSObject(source,target)
+ */
+private pattern mustInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>parent reference FSObject(source,target)
+ */
+private pattern mayInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFSObject_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationparent_reference_FSObject(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference Dir(source,target)
+ */
+private pattern mustInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference Dir(source,target)
+ */
+private pattern mayInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfDir_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_Dir(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []filesystems reference Model(source,target)
+ */
+private pattern mustInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>filesystems reference Model(source,target)
+ */
+private pattern mayInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFileSystem_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target)
+ */
+private pattern mustInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target)
+ */
+private pattern mayInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or
+
+ { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or
+
+ { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFile_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_Model_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart");
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_root_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class_by_filesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+}
+pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_live_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFileSystem_class(problem,interpretation,from);
+ find mustInstanceOfFSObject_class(problem,interpretation,to);
+ find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+ neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "Pseudostate class".
+ */
+private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Pseudostate class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Pseudostate class");
+}
+
+/**
+ * An element may be an instance of type "Pseudostate class".
+ */
+private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfPseudostate_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Vertex class".
+ */
+private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Vertex class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Vertex class");
+}
+
+/**
+ * An element may be an instance of type "Vertex class".
+ */
+private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfVertex_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Region class".
+ */
+private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Region class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Region class");
+}
+
+/**
+ * An element may be an instance of type "Region class".
+ */
+private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegion_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Transition class".
+ */
+private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Transition class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Transition class");
+}
+
+/**
+ * An element may be an instance of type "Transition class".
+ */
+private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfTransition_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class".
+ */
+private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class");
+}
+
+/**
+ * An element may be an instance of type "Statechart class".
+ */
+private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Entry class".
+ */
+private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Entry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Entry class");
+}
+
+/**
+ * An element may be an instance of type "Entry class".
+ */
+private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Synchronization class".
+ */
+private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Synchronization class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Synchronization class");
+}
+
+/**
+ * An element may be an instance of type "Synchronization class".
+ */
+private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfSynchronization_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "State class".
+ */
+private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"State class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"State class");
+}
+
+/**
+ * An element may be an instance of type "State class".
+ */
+private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "RegularState class".
+ */
+private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"RegularState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"RegularState class");
+}
+
+/**
+ * An element may be an instance of type "RegularState class".
+ */
+private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegularState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class".
+ */
+private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class".
+ */
+private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Choice class".
+ */
+private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Choice class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Choice class");
+}
+
+/**
+ * An element may be an instance of type "Choice class".
+ */
+private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfChoice_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Exit class".
+ */
+private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Exit class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Exit class");
+}
+
+/**
+ * An element may be an instance of type "Exit class".
+ */
+private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfExit_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FinalState class".
+ */
+private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FinalState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FinalState class");
+}
+
+/**
+ * An element may be an instance of type "FinalState class".
+ */
+private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFinalState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+} or {
+ find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []vertices reference Region(source,target)
+ */
+private pattern mustInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>vertices reference Region(source,target)
+ */
+private pattern mayInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfRegion_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationvertices_reference_Region(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []target reference Transition(source,target)
+ */
+private pattern mustInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>target reference Transition(source,target)
+ */
+private pattern mayInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtarget_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source reference Transition(source,target)
+ */
+private pattern mustInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source reference Transition(source,target)
+ */
+private pattern mayInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationsource_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []regions reference CompositeElement(source,target)
+ */
+private pattern mustInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target)
+ */
+private pattern mayInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfCompositeElement_class(problem,interpretation,source);
+ find mayInstanceOfRegion_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_e1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ neg find mayEquivalent(problem, interpretation, var_e1, var_e2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfVertex_class(problem,interpretation,var_src);
+ find mayInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_src);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_trg);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_t2);
+ var_t1 != var_t2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ var_t1 != var_t2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_state);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ neg find mayEquivalent(problem, interpretation, var_src1, var_src2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_child);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ neg find mayEquivalent(problem, interpretation, var_region1, var_region2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_region1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_region2);
+ var_region1 != var_region2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ var_region1 != var_region2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ neg find mayEquivalent(problem, interpretation, var_s1, var_s2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or
+
+ { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or
+
+ { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ find mustInstanceOfTransition_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfPseudostate_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfVertex_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFinalState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfExit_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegularState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_Entry_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Entry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_State_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_State_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Statechart_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart");
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition");
+ find mustInstanceOfVertex_class(problem,interpretation,container);
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class_by_regions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement");
+ find mustInstanceOfCompositeElement_class(problem,interpretation,container);
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+}
+pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfVertex_class(problem,interpretation,from);
+ find mustInstanceOfTransition_class(problem,interpretation,to);
+ find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+ neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "Pseudostate class".
+ */
+private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Pseudostate class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Pseudostate class");
+}
+
+/**
+ * An element may be an instance of type "Pseudostate class".
+ */
+private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfPseudostate_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Vertex class".
+ */
+private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Vertex class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Vertex class");
+}
+
+/**
+ * An element may be an instance of type "Vertex class".
+ */
+private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfVertex_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Region class".
+ */
+private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Region class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Region class");
+}
+
+/**
+ * An element may be an instance of type "Region class".
+ */
+private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegion_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Transition class".
+ */
+private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Transition class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Transition class");
+}
+
+/**
+ * An element may be an instance of type "Transition class".
+ */
+private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfTransition_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class".
+ */
+private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class");
+}
+
+/**
+ * An element may be an instance of type "Statechart class".
+ */
+private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Entry class".
+ */
+private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Entry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Entry class");
+}
+
+/**
+ * An element may be an instance of type "Entry class".
+ */
+private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Synchronization class".
+ */
+private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Synchronization class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Synchronization class");
+}
+
+/**
+ * An element may be an instance of type "Synchronization class".
+ */
+private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfSynchronization_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "State class".
+ */
+private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"State class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"State class");
+}
+
+/**
+ * An element may be an instance of type "State class".
+ */
+private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "RegularState class".
+ */
+private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"RegularState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"RegularState class");
+}
+
+/**
+ * An element may be an instance of type "RegularState class".
+ */
+private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegularState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class".
+ */
+private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class".
+ */
+private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Choice class".
+ */
+private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Choice class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Choice class");
+}
+
+/**
+ * An element may be an instance of type "Choice class".
+ */
+private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfChoice_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Exit class".
+ */
+private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Exit class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Exit class");
+}
+
+/**
+ * An element may be an instance of type "Exit class".
+ */
+private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfExit_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FinalState class".
+ */
+private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FinalState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FinalState class");
+}
+
+/**
+ * An element may be an instance of type "FinalState class".
+ */
+private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFinalState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+} or {
+ find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []vertices reference Region(source,target)
+ */
+private pattern mustInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>vertices reference Region(source,target)
+ */
+private pattern mayInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfRegion_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationvertices_reference_Region(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []target reference Transition(source,target)
+ */
+private pattern mustInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>target reference Transition(source,target)
+ */
+private pattern mayInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtarget_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source reference Transition(source,target)
+ */
+private pattern mustInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source reference Transition(source,target)
+ */
+private pattern mayInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationsource_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []regions reference CompositeElement(source,target)
+ */
+private pattern mustInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target)
+ */
+private pattern mayInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfCompositeElement_class(problem,interpretation,source);
+ find mayInstanceOfRegion_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_e1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ neg find mayEquivalent(problem, interpretation, var_e1, var_e2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfVertex_class(problem,interpretation,var_src);
+ find mayInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_src);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_trg);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_t2);
+ var_t1 != var_t2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ var_t1 != var_t2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_state);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ neg find mayEquivalent(problem, interpretation, var_src1, var_src2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_child);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ neg find mayEquivalent(problem, interpretation, var_region1, var_region2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_region1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_region2);
+ var_region1 != var_region2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ var_region1 != var_region2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ neg find mayEquivalent(problem, interpretation, var_s1, var_s2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or
+
+ { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or
+
+ { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ find mustInstanceOfTransition_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfPseudostate_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfVertex_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFinalState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfExit_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegularState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_State_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_State_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Entry_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Entry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Statechart_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart");
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition");
+ find mustInstanceOfVertex_class(problem,interpretation,container);
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class_by_regions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement");
+ find mustInstanceOfCompositeElement_class(problem,interpretation,container);
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfVertex_class(problem,interpretation,from);
+ find mustInstanceOfTransition_class(problem,interpretation,to);
+ find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+ neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "Pseudostate class".
+ */
+private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Pseudostate class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Pseudostate class");
+}
+
+/**
+ * An element may be an instance of type "Pseudostate class".
+ */
+private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfPseudostate_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Vertex class".
+ */
+private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Vertex class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Vertex class");
+}
+
+/**
+ * An element may be an instance of type "Vertex class".
+ */
+private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfVertex_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Region class".
+ */
+private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Region class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Region class");
+}
+
+/**
+ * An element may be an instance of type "Region class".
+ */
+private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegion_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Transition class".
+ */
+private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Transition class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Transition class");
+}
+
+/**
+ * An element may be an instance of type "Transition class".
+ */
+private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfTransition_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class".
+ */
+private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class");
+}
+
+/**
+ * An element may be an instance of type "Statechart class".
+ */
+private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Entry class".
+ */
+private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Entry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Entry class");
+}
+
+/**
+ * An element may be an instance of type "Entry class".
+ */
+private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Synchronization class".
+ */
+private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Synchronization class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Synchronization class");
+}
+
+/**
+ * An element may be an instance of type "Synchronization class".
+ */
+private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfSynchronization_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "State class".
+ */
+private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"State class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"State class");
+}
+
+/**
+ * An element may be an instance of type "State class".
+ */
+private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "RegularState class".
+ */
+private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"RegularState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"RegularState class");
+}
+
+/**
+ * An element may be an instance of type "RegularState class".
+ */
+private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegularState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class".
+ */
+private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class".
+ */
+private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Choice class".
+ */
+private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Choice class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Choice class");
+}
+
+/**
+ * An element may be an instance of type "Choice class".
+ */
+private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfChoice_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Exit class".
+ */
+private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Exit class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Exit class");
+}
+
+/**
+ * An element may be an instance of type "Exit class".
+ */
+private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfExit_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FinalState class".
+ */
+private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FinalState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FinalState class");
+}
+
+/**
+ * An element may be an instance of type "FinalState class".
+ */
+private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFinalState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+} or {
+ find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []vertices reference Region(source,target)
+ */
+private pattern mustInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>vertices reference Region(source,target)
+ */
+private pattern mayInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfRegion_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationvertices_reference_Region(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []target reference Transition(source,target)
+ */
+private pattern mustInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>target reference Transition(source,target)
+ */
+private pattern mayInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtarget_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source reference Transition(source,target)
+ */
+private pattern mustInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source reference Transition(source,target)
+ */
+private pattern mayInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationsource_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []regions reference CompositeElement(source,target)
+ */
+private pattern mustInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target)
+ */
+private pattern mayInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfCompositeElement_class(problem,interpretation,source);
+ find mayInstanceOfRegion_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_e1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ neg find mayEquivalent(problem, interpretation, var_e1, var_e2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfVertex_class(problem,interpretation,var_src);
+ find mayInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_src);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_trg);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_t2);
+ var_t1 != var_t2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ var_t1 != var_t2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_state);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ neg find mayEquivalent(problem, interpretation, var_src1, var_src2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_child);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ neg find mayEquivalent(problem, interpretation, var_region1, var_region2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_region1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_region2);
+ var_region1 != var_region2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ var_region1 != var_region2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ neg find mayEquivalent(problem, interpretation, var_s1, var_s2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or
+
+ { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or
+
+ { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ find mustInstanceOfTransition_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfPseudostate_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfVertex_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFinalState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfExit_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegularState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_Entry_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Entry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition");
+ find mustInstanceOfVertex_class(problem,interpretation,container);
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Statechart_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart");
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class_by_regions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement");
+ find mustInstanceOfCompositeElement_class(problem,interpretation,container);
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_State_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_State_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfState_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfVertex_class(problem,interpretation,from);
+ find mustInstanceOfTransition_class(problem,interpretation,to);
+ find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+ neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "Pseudostate class".
+ */
+private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Pseudostate class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Pseudostate class");
+}
+
+/**
+ * An element may be an instance of type "Pseudostate class".
+ */
+private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfPseudostate_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Vertex class".
+ */
+private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Vertex class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Vertex class");
+}
+
+/**
+ * An element may be an instance of type "Vertex class".
+ */
+private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfVertex_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Region class".
+ */
+private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Region class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Region class");
+}
+
+/**
+ * An element may be an instance of type "Region class".
+ */
+private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegion_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Transition class".
+ */
+private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Transition class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Transition class");
+}
+
+/**
+ * An element may be an instance of type "Transition class".
+ */
+private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfTransition_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class".
+ */
+private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class");
+}
+
+/**
+ * An element may be an instance of type "Statechart class".
+ */
+private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Entry class".
+ */
+private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Entry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Entry class");
+}
+
+/**
+ * An element may be an instance of type "Entry class".
+ */
+private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Synchronization class".
+ */
+private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Synchronization class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Synchronization class");
+}
+
+/**
+ * An element may be an instance of type "Synchronization class".
+ */
+private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfSynchronization_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "State class".
+ */
+private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"State class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"State class");
+}
+
+/**
+ * An element may be an instance of type "State class".
+ */
+private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "RegularState class".
+ */
+private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"RegularState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"RegularState class");
+}
+
+/**
+ * An element may be an instance of type "RegularState class".
+ */
+private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegularState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class".
+ */
+private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class".
+ */
+private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Choice class".
+ */
+private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Choice class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Choice class");
+}
+
+/**
+ * An element may be an instance of type "Choice class".
+ */
+private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfChoice_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Exit class".
+ */
+private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Exit class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Exit class");
+}
+
+/**
+ * An element may be an instance of type "Exit class".
+ */
+private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfExit_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FinalState class".
+ */
+private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FinalState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FinalState class");
+}
+
+/**
+ * An element may be an instance of type "FinalState class".
+ */
+private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFinalState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+} or {
+ find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []vertices reference Region(source,target)
+ */
+private pattern mustInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>vertices reference Region(source,target)
+ */
+private pattern mayInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfRegion_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationvertices_reference_Region(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []target reference Transition(source,target)
+ */
+private pattern mustInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>target reference Transition(source,target)
+ */
+private pattern mayInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtarget_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source reference Transition(source,target)
+ */
+private pattern mustInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source reference Transition(source,target)
+ */
+private pattern mayInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationsource_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []regions reference CompositeElement(source,target)
+ */
+private pattern mustInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target)
+ */
+private pattern mayInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfCompositeElement_class(problem,interpretation,source);
+ find mayInstanceOfRegion_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_e1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ neg find mayEquivalent(problem, interpretation, var_e1, var_e2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfVertex_class(problem,interpretation,var_src);
+ find mayInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_src);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_trg);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_t2);
+ var_t1 != var_t2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ var_t1 != var_t2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_state);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ neg find mayEquivalent(problem, interpretation, var_src1, var_src2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_child);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ neg find mayEquivalent(problem, interpretation, var_region1, var_region2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_region1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_region2);
+ var_region1 != var_region2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ var_region1 != var_region2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ neg find mayEquivalent(problem, interpretation, var_s1, var_s2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or
+
+ { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or
+
+ { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ find mustInstanceOfTransition_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfPseudostate_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfVertex_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFinalState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfExit_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegularState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition");
+ find mustInstanceOfVertex_class(problem,interpretation,container);
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_State_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_State_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class_by_regions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement");
+ find mustInstanceOfCompositeElement_class(problem,interpretation,container);
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Entry_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Entry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Statechart_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart");
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfVertex_class(problem,interpretation,from);
+ find mustInstanceOfTransition_class(problem,interpretation,to);
+ find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+ neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "Pseudostate class".
+ */
+private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Pseudostate class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Pseudostate class");
+}
+
+/**
+ * An element may be an instance of type "Pseudostate class".
+ */
+private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfPseudostate_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Vertex class".
+ */
+private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Vertex class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Vertex class");
+}
+
+/**
+ * An element may be an instance of type "Vertex class".
+ */
+private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfVertex_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Region class".
+ */
+private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Region class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Region class");
+}
+
+/**
+ * An element may be an instance of type "Region class".
+ */
+private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegion_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Transition class".
+ */
+private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Transition class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Transition class");
+}
+
+/**
+ * An element may be an instance of type "Transition class".
+ */
+private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfTransition_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class".
+ */
+private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class");
+}
+
+/**
+ * An element may be an instance of type "Statechart class".
+ */
+private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Entry class".
+ */
+private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Entry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Entry class");
+}
+
+/**
+ * An element may be an instance of type "Entry class".
+ */
+private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Synchronization class".
+ */
+private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Synchronization class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Synchronization class");
+}
+
+/**
+ * An element may be an instance of type "Synchronization class".
+ */
+private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfSynchronization_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "State class".
+ */
+private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"State class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"State class");
+}
+
+/**
+ * An element may be an instance of type "State class".
+ */
+private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "RegularState class".
+ */
+private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"RegularState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"RegularState class");
+}
+
+/**
+ * An element may be an instance of type "RegularState class".
+ */
+private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegularState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class".
+ */
+private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class".
+ */
+private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Choice class".
+ */
+private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Choice class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Choice class");
+}
+
+/**
+ * An element may be an instance of type "Choice class".
+ */
+private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfChoice_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Exit class".
+ */
+private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Exit class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Exit class");
+}
+
+/**
+ * An element may be an instance of type "Exit class".
+ */
+private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfExit_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FinalState class".
+ */
+private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FinalState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FinalState class");
+}
+
+/**
+ * An element may be an instance of type "FinalState class".
+ */
+private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFinalState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+} or {
+ find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []vertices reference Region(source,target)
+ */
+private pattern mustInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>vertices reference Region(source,target)
+ */
+private pattern mayInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfRegion_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationvertices_reference_Region(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []target reference Transition(source,target)
+ */
+private pattern mustInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>target reference Transition(source,target)
+ */
+private pattern mayInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtarget_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source reference Transition(source,target)
+ */
+private pattern mustInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source reference Transition(source,target)
+ */
+private pattern mayInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationsource_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []regions reference CompositeElement(source,target)
+ */
+private pattern mustInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target)
+ */
+private pattern mayInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfCompositeElement_class(problem,interpretation,source);
+ find mayInstanceOfRegion_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_e1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ neg find mayEquivalent(problem, interpretation, var_e1, var_e2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfVertex_class(problem,interpretation,var_src);
+ find mayInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_src);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_trg);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_t2);
+ var_t1 != var_t2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ var_t1 != var_t2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_state);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ neg find mayEquivalent(problem, interpretation, var_src1, var_src2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_child);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ neg find mayEquivalent(problem, interpretation, var_region1, var_region2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_region1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_region2);
+ var_region1 != var_region2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ var_region1 != var_region2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ neg find mayEquivalent(problem, interpretation, var_s1, var_s2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or
+
+ { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or
+
+ { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ find mustInstanceOfTransition_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfPseudostate_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegularState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfVertex_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfExit_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFinalState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_State_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_State_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class_by_regions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement");
+ find mustInstanceOfCompositeElement_class(problem,interpretation,container);
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Entry_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Entry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition");
+ find mustInstanceOfVertex_class(problem,interpretation,container);
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Statechart_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart");
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfVertex_class(problem,interpretation,from);
+ find mustInstanceOfTransition_class(problem,interpretation,to);
+ find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+ neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "Pseudostate class".
+ */
+private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Pseudostate class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Pseudostate class");
+}
+
+/**
+ * An element may be an instance of type "Pseudostate class".
+ */
+private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewPseudostate_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfPseudostate_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Vertex class".
+ */
+private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Vertex class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Vertex class");
+}
+
+/**
+ * An element may be an instance of type "Vertex class".
+ */
+private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewVertex_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfVertex_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Region class".
+ */
+private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Region class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Region class");
+}
+
+/**
+ * An element may be an instance of type "Region class".
+ */
+private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegion_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegion_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Transition class".
+ */
+private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Transition class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Transition class");
+}
+
+/**
+ * An element may be an instance of type "Transition class".
+ */
+private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find scopeDisallowsNewTransition_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfTransition_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class".
+ */
+private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class");
+}
+
+/**
+ * An element may be an instance of type "Statechart class".
+ */
+private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Entry class".
+ */
+private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Entry class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Entry class");
+}
+
+/**
+ * An element may be an instance of type "Entry class".
+ */
+private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find scopeDisallowsNewEntry_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfEntry_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Synchronization class".
+ */
+private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Synchronization class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Synchronization class");
+}
+
+/**
+ * An element may be an instance of type "Synchronization class".
+ */
+private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewSynchronization_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfSynchronization_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "State class".
+ */
+private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"State class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"State class");
+}
+
+/**
+ * An element may be an instance of type "State class".
+ */
+private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "RegularState class".
+ */
+private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"RegularState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"RegularState class");
+}
+
+/**
+ * An element may be an instance of type "RegularState class".
+ */
+private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewRegularState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfRegularState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class".
+ */
+private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class".
+ */
+private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Choice class".
+ */
+private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Choice class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Choice class");
+}
+
+/**
+ * An element may be an instance of type "Choice class".
+ */
+private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewChoice_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfChoice_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Exit class".
+ */
+private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Exit class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Exit class");
+}
+
+/**
+ * An element may be an instance of type "Exit class".
+ */
+private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find scopeDisallowsNewExit_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfExit_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FinalState class".
+ */
+private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FinalState class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FinalState class");
+}
+
+/**
+ * An element may be an instance of type "FinalState class".
+ */
+private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFinalState_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFinalState_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class DefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Statechart class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Statechart class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Statechart class UndefinedPart".
+ */
+private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class DefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"CompositeElement class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"CompositeElement class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "CompositeElement class UndefinedPart".
+ */
+private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationincomingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+} or {
+ find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mustInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target)
+ */
+private pattern mayInRelationoutgoingTransitions_reference_Vertex(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfVertex_class(problem,interpretation,source);
+ find mayInstanceOfTransition_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []vertices reference Region(source,target)
+ */
+private pattern mustInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>vertices reference Region(source,target)
+ */
+private pattern mayInRelationvertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfRegion_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationvertices_reference_Region(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []target reference Transition(source,target)
+ */
+private pattern mustInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>target reference Transition(source,target)
+ */
+private pattern mayInRelationtarget_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+} or {
+ find mustInRelationtarget_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []source reference Transition(source,target)
+ */
+private pattern mustInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>source reference Transition(source,target)
+ */
+private pattern mayInRelationsource_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfTransition_class(problem,interpretation,source);
+ find mayInstanceOfVertex_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationsource_reference_Transition(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []regions reference CompositeElement(source,target)
+ */
+private pattern mustInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target)
+ */
+private pattern mayInRelationregions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfCompositeElement_class(problem,interpretation,source);
+ find mayInstanceOfRegion_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries entryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_e1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1, var_e1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e1);
+ // r1 is exported
+ // e1 is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_e1;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r1);
+ // r1 is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r1,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleEntryInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ neg find mayEquivalent(problem, interpretation, var_e1, var_e2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ // r is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_entryInRegion(problem,interpretation,var_r,var_e2);
+ var_e1 != var_e2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries transition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfVertex_class(problem,interpretation,var_src);
+ find mayInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_src);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_trg);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_src, var_trg)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfVertex_class(problem,interpretation,var_src);
+ find mustInstanceOfVertex_class(problem,interpretation,var_trg);
+ // t is exported
+ // src is exported
+ // trg is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_src;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_trg;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries incomingToEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t,_var__0,var_e);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noOutgoingTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ // e is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_e,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries multipleTransitionFromEntry
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t1);
+ find mayInstanceOfEntry_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_t2);
+ var_t1 != var_t2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ // e is exported
+ // t1 is exported
+ // t2 is exported
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t1;
+ find mustInstanceOfEntry_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual1);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_t2;
+ var_t1 != var_t2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromExit
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mayInstanceOfExit_class(problem,interpretation,var_e);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ // t is exported
+ // e is exported
+ find mustInstanceOfExit_class(problem,interpretation,var_e);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_e,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries outgoingFromFinal
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t);
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mayInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mayInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_t);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,var_t);
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ // t is exported
+ // f is exported
+ find mustInstanceOfFinalState_class(problem,interpretation,var_f);
+ find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,var_f,var_virtual0);
+ find mustInstanceOfTransition_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_t;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries noStateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ // region is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(problem,interpretation,var_region,_var__0);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries StateInRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mayInstanceOfRegion_class(problem,interpretation,var_region);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_state);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_StateInRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region, var_state)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInstanceOfState_class(problem,interpretation,var_state);
+ // region is exported
+ // state is exported
+ find mustInstanceOfRegion_class(problem,interpretation,var_region);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_region,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_state;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_c,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries choiceHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,var_c);
+ // c is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoOutgoing
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,_var__1);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchHasNoIncoming
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,_var__1,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedIncomingInSameRegion
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_v1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_r);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v2);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_v2,var_s);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t1,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,var_t2,var_s,var_v2);
+ var_t1 != var_t2;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_v1;
+ find mustInstanceOfRegion_class(problem,interpretation,var_r);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_r,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries notSynchronizingStates
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(problem,interpretation,var_s);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(problem,interpretation,var_s);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleOutgoingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ neg find mayEquivalent(problem, interpretation, var_trg1, var_trg2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleOutgoingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_trg1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v,var_trg2);
+ var_trg1 != var_trg2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleIncomingTrainsition
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ neg find mayEquivalent(problem, interpretation, var_src1, var_src2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleIncomingTrainsition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_v);
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_src1,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_src2,var_v);
+ var_src1 != var_src2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionsAreNotSiblings
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ neg find mayEquivalent(problem, interpretation, var_r1, var_r2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_v1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ find mayEquivalent(problem, interpretation, var_virtual3, var_v2);
+ var_r1 != var_r2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v1,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_v2,var_s);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v2);
+ // s is exported
+ // v1 is exported
+ // v2 is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v1);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__1,var_s,var_v2);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r1);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r1,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_v1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_r2);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_r2,var_virtual2);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual2);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual2,var_virtual3);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual3);
+ var_virtual3 == var_v2;
+ var_r1 != var_r2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries child
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_child);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInstanceOfVertex_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_parent);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mustInRelationvertices_reference_Region(problem,interpretation,var_virtual0,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_child;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries SynchronizedRegionDoesNotHaveMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mayInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_v,var_s);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ find mustInstanceOfVertex_class(problem,interpretation,var_v);
+ // s is exported
+ // v is exported
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_transition(problem,interpretation,_var__0,var_s,var_v);
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_child(problem,interpretation,var_c,var_v);
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(problem,interpretation,var_c);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries hasMultipleRegions
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ neg find mayEquivalent(problem, interpretation, var_region1, var_region2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_region1);
+ find mayInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mayInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_region2);
+ var_region1 != var_region2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_hasMultipleRegions(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_composite)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ // composite is exported
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual0);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_region1;
+ find mustInstanceOfCompositeElement_class(problem,interpretation,var_composite);
+ find mustInRelationregions_reference_CompositeElement(problem,interpretation,var_composite,var_virtual1);
+ find mustInstanceOfRegion_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_region2;
+ var_region1 != var_region2;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries synchThree
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t2);
+ neg find mayEquivalent(problem, interpretation, var_t2, var_t3);
+ neg find mayEquivalent(problem, interpretation, var_t1, var_t3);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mayInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ find mayEquivalent(problem, interpretation, var_virtual1, var_s);
+ find mayInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mayInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mayInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ find mayEquivalent(problem, interpretation, var_virtual2, var_s);
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationtarget_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s);
+ // s is exported
+ find mustInstanceOfTransition_class(problem,interpretation,var_t1);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t1,var_virtual0);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t2);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t2,var_virtual1);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual1);
+ var_virtual1 == var_s;
+ find mustInstanceOfTransition_class(problem,interpretation,var_t3);
+ find mustInRelationsource_reference_Transition(problem,interpretation,var_t3,var_virtual2);
+ find mustInstanceOfVertex_class(problem,interpretation,var_virtual2);
+ var_virtual2 == var_s;
+ var_t1 != var_t2;
+ var_t2 != var_t3;
+ var_t1 != var_t3;
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test yakindu queries twoSynch
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ neg find mayEquivalent(problem, interpretation, var_s1, var_s2);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mayInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ // s1 is exported
+ // s2 is exported
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s1);
+ find mustInstanceOfSynchronization_class(problem,interpretation,var_s2);
+ var_s1 != var_s2;
+}
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or
+
+ { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or
+
+ { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition");
+ find mustInstanceOfTransition_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r1)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noEntryInRegion(problem,interpretation,var_r1);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_r)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleEntryInRegion(problem,interpretation,var_r);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_incomingToEntry(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noOutgoingTransitionFromEntry(problem,interpretation,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_e, var_t1, var_t2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_multipleTransitionFromEntry(problem,interpretation,var_e,var_t1,var_t2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_e)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromExit(problem,interpretation,var_t,var_e);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_t, var_f)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_outgoingFromFinal(problem,interpretation,var_t,var_f);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_region)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_noStateInRegion(problem,interpretation,var_region);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoOutgoing(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_c)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_choiceHasNoIncoming(problem,interpretation,var_c);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoOutgoing(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchHasNoIncoming(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedIncomingInSameRegion(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_notSynchronizingStates(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v1, var_v2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionsAreNotSiblings(problem,interpretation,var_s,var_v1,var_v2);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s, var_v)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_SynchronizedRegionDoesNotHaveMultipleRegions(problem,interpretation,var_s,var_v);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_synchThree(problem,interpretation,var_s);
+}
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_s1, var_s2)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_yakindu_queries_twoSynch(problem,interpretation,var_s1,var_s2);
+}
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfPseudostate_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfEntry_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfTransition_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfChoice_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegularState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfRegion_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfVertex_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfExit_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFinalState_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfSynchronization_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_Choice_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Choice_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class");
+ find mayInstanceOfChoice_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Statechart_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart");
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FinalState_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class");
+ find mayInstanceOfFinalState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class_by_regions_reference_CompositeElement(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement");
+ find mustInstanceOfCompositeElement_class(problem,interpretation,container);
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Region_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class");
+ find mayInstanceOfRegion_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Entry_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Entry_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class");
+ find mayInstanceOfEntry_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Exit_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class");
+ find mayInstanceOfExit_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_State_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_State_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class");
+ find mayInstanceOfState_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition");
+ find mustInstanceOfVertex_class(problem,interpretation,container);
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Transition_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class");
+ find mayInstanceOfTransition_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class_by_vertices_reference_Region(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region");
+ find mustInstanceOfRegion_class(problem,interpretation,container);
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Synchronization_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class");
+ find mayInstanceOfSynchronization_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+}
+pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfFinalState_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfState_class(problem,interpretation,element);
+ neg find mustInstanceOfStatechart_class(problem,interpretation,element);
+ neg find mustInstanceOfPseudostate_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfVertex_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfSynchronization_class(problem,interpretation,element);
+ neg find mustInstanceOfChoice_class(problem,interpretation,element);
+ neg find mustInstanceOfCompositeElement_class(problem,interpretation,element);
+ neg find mustInstanceOfRegion_class(problem,interpretation,element);
+ neg find mustInstanceOfEntry_class(problem,interpretation,element);
+ neg find mustInstanceOfExit_class(problem,interpretation,element);
+ neg find mustInstanceOfTransition_class(problem,interpretation,element);
+ neg find mustInstanceOfRegularState_class(problem,interpretation,element);
+ neg find mustInstanceOfSynchronization_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex");
+ PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfVertex_class(problem,interpretation,from);
+ find mustInstanceOfTransition_class(problem,interpretation,to);
+ find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+ neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "FileSystem class".
+ */
+private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FileSystem class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FileSystem class");
+}
+
+/**
+ * An element may be an instance of type "FileSystem class".
+ */
+private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFileSystem_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FSObject class".
+ */
+private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FSObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FSObject class");
+}
+
+/**
+ * An element may be an instance of type "FSObject class".
+ */
+private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFSObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Dir class".
+ */
+private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Dir class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Dir class");
+}
+
+/**
+ * An element may be an instance of type "Dir class".
+ */
+private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfDir_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "File class".
+ */
+private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"File class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"File class");
+}
+
+/**
+ * An element may be an instance of type "File class".
+ */
+private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFile_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class".
+ */
+private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class");
+}
+
+/**
+ * An element may be an instance of type "Model class".
+ */
+private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class DefinedPart".
+ */
+private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class DefinedPart".
+ */
+private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class UndefinedPart".
+ */
+private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class UndefinedPart".
+ */
+private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []root reference FileSystem(source,target)
+ */
+private pattern mustInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>root reference FileSystem(source,target)
+ */
+private pattern mayInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFileSystem_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []live reference FileSystem(source,target)
+ */
+ private pattern mustInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+ {
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target);
+ }
+/**
+ * Matcher for detecting tuples t where []live reference FileSystem(source,target)
+ */
+ private pattern mayInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+ {
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target);
+ }
+/**
+ * Matcher for detecting tuples t where []parent reference FSObject(source,target)
+ */
+private pattern mustInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>parent reference FSObject(source,target)
+ */
+private pattern mayInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFSObject_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationparent_reference_FSObject(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference Dir(source,target)
+ */
+private pattern mustInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference Dir(source,target)
+ */
+private pattern mayInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfDir_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_Dir(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []filesystems reference Model(source,target)
+ */
+private pattern mustInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>filesystems reference Model(source,target)
+ */
+private pattern mayInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFileSystem_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target)
+ */
+private pattern mustInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target)
+ */
+private pattern mayInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries patternContent
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_o1);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_o2;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_o1);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_o2);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_o1);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_o2;
+}
+private pattern twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+private pattern twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+private pattern twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries live
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_l;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_root;
+ find twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mayInstanceOfDir_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_l);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mayInstanceOfDir_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_root);
+ find twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_l;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_root;
+ find twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries contentInNotLive
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_child);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_child);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or
+
+ { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or
+
+ { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child);
+}
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child);
+}
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFile_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_FileSystem_class_by_filesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Model_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart");
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_root_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_live_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFileSystem_class(problem,interpretation,from);
+ find mustInstanceOfFSObject_class(problem,interpretation,to);
+ find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+ neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "FileSystem class".
+ */
+private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FileSystem class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FileSystem class");
+}
+
+/**
+ * An element may be an instance of type "FileSystem class".
+ */
+private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFileSystem_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FSObject class".
+ */
+private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FSObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FSObject class");
+}
+
+/**
+ * An element may be an instance of type "FSObject class".
+ */
+private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFSObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Dir class".
+ */
+private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Dir class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Dir class");
+}
+
+/**
+ * An element may be an instance of type "Dir class".
+ */
+private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfDir_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "File class".
+ */
+private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"File class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"File class");
+}
+
+/**
+ * An element may be an instance of type "File class".
+ */
+private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFile_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class".
+ */
+private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class");
+}
+
+/**
+ * An element may be an instance of type "Model class".
+ */
+private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class DefinedPart".
+ */
+private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class DefinedPart".
+ */
+private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class UndefinedPart".
+ */
+private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class UndefinedPart".
+ */
+private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []root reference FileSystem(source,target)
+ */
+private pattern mustInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>root reference FileSystem(source,target)
+ */
+private pattern mayInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFileSystem_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []live reference FileSystem(source,target)
+ */
+ private pattern mustInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+ {
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target);
+ }
+/**
+ * Matcher for detecting tuples t where []live reference FileSystem(source,target)
+ */
+ private pattern mayInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+ {
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target);
+ }
+/**
+ * Matcher for detecting tuples t where []parent reference FSObject(source,target)
+ */
+private pattern mustInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>parent reference FSObject(source,target)
+ */
+private pattern mayInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFSObject_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationparent_reference_FSObject(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference Dir(source,target)
+ */
+private pattern mustInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference Dir(source,target)
+ */
+private pattern mayInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfDir_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_Dir(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []filesystems reference Model(source,target)
+ */
+private pattern mustInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>filesystems reference Model(source,target)
+ */
+private pattern mayInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFileSystem_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target)
+ */
+private pattern mustInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target)
+ */
+private pattern mayInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries patternContent
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_o1);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_o2;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_o1);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_o2);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_o1);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_o2;
+}
+private pattern twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+private pattern twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+private pattern twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries live
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_l;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_root;
+ find twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mayInstanceOfDir_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_l);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mayInstanceOfDir_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_root);
+ find twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_l;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_root;
+ find twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries contentInNotLive
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_child);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_child);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or
+
+ { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or
+
+ { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child);
+}
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child);
+}
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFile_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_Model_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart");
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class_by_filesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_root_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+}
+pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_live_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFileSystem_class(problem,interpretation,from);
+ find mustInstanceOfFSObject_class(problem,interpretation,to);
+ find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+ neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "FileSystem class".
+ */
+private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FileSystem class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FileSystem class");
+}
+
+/**
+ * An element may be an instance of type "FileSystem class".
+ */
+private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFileSystem_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FSObject class".
+ */
+private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FSObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FSObject class");
+}
+
+/**
+ * An element may be an instance of type "FSObject class".
+ */
+private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFSObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Dir class".
+ */
+private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Dir class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Dir class");
+}
+
+/**
+ * An element may be an instance of type "Dir class".
+ */
+private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfDir_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "File class".
+ */
+private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"File class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"File class");
+}
+
+/**
+ * An element may be an instance of type "File class".
+ */
+private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFile_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class".
+ */
+private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class");
+}
+
+/**
+ * An element may be an instance of type "Model class".
+ */
+private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class DefinedPart".
+ */
+private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class DefinedPart".
+ */
+private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class UndefinedPart".
+ */
+private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class UndefinedPart".
+ */
+private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []root reference FileSystem(source,target)
+ */
+private pattern mustInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>root reference FileSystem(source,target)
+ */
+private pattern mayInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFileSystem_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []live reference FileSystem(source,target)
+ */
+ private pattern mustInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+ {
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target);
+ }
+/**
+ * Matcher for detecting tuples t where []live reference FileSystem(source,target)
+ */
+ private pattern mayInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+ {
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target);
+ }
+/**
+ * Matcher for detecting tuples t where []parent reference FSObject(source,target)
+ */
+private pattern mustInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>parent reference FSObject(source,target)
+ */
+private pattern mayInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFSObject_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationparent_reference_FSObject(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference Dir(source,target)
+ */
+private pattern mustInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference Dir(source,target)
+ */
+private pattern mayInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfDir_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_Dir(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []filesystems reference Model(source,target)
+ */
+private pattern mustInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>filesystems reference Model(source,target)
+ */
+private pattern mayInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFileSystem_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target)
+ */
+private pattern mustInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target)
+ */
+private pattern mayInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries patternContent
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_o1);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_o2;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_o1);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_o2);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_o1);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_o2;
+}
+private pattern twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+private pattern twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+private pattern twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries live
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_l;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_root;
+ find twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mayInstanceOfDir_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_l);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mayInstanceOfDir_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_root);
+ find twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_l;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_root;
+ find twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries contentInNotLive
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_child);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_child);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or
+
+ { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or
+
+ { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child);
+}
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child);
+}
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFile_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_Dir_class_by_root_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Model_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart");
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class_by_filesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+}
+pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+}
+pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_live_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFileSystem_class(problem,interpretation,from);
+ find mustInstanceOfFSObject_class(problem,interpretation,to);
+ find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+ neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+}
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem"
+import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language"
+
+//////////
+// 0. Util
+//////////
+private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) {
+ PartialInterpretation.problem(interpretation,problem);
+}
+
+/////////////////////////
+// 0.1 Existence
+/////////////////////////
+private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find interpretation(problem,interpretation);
+ LogicProblem.elements(problem,element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+}
+
+private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ find mustExist(problem,interpretation,element);
+} or {
+ find interpretation(problem,interpretation);
+ neg find elementCloseWorld(element);
+ PartialInterpretation.openWorldElements(interpretation,element);
+}
+
+private pattern elementCloseWorld(element:DefinedElement) {
+ PartialInterpretation.openWorldElements(i,element);
+ PartialInterpretation.maxNewElements(i,0);
+} or {
+ Scope.targetTypeInterpretation(scope,interpretation);
+ PartialTypeInterpratation.elements(interpretation,element);
+ Scope.maxNewElements(scope,0);
+}
+
+////////////////////////
+// 0.2 Equivalence
+////////////////////////
+pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) {
+ find mayExist(problem,interpretation,a);
+ find mayExist(problem,interpretation,b);
+ a == b;
+}
+
+////////////////////////
+// 0.3 Required Patterns by TypeIndexer
+////////////////////////
+private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+}
+
+private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) {
+ find interpretation(problem,interpretation);
+ LogicProblem.types(problem,type);
+ TypeDefinition.elements(type,element);
+} or {
+ find interpretation(problem,interpretation);
+ find typeInterpretation(problem,interpretation,type,typeInterpretation);
+ PartialComplexTypeInterpretation.elements(typeInterpretation,element);
+}
+
+private pattern isPrimitive(element: PrimitiveElement) {
+ PrimitiveElement(element);
+}
+
+//////////
+// 1. Problem-Specific Base Indexers
+//////////
+// 1.1 Type Indexers
+//////////
+// 1.1.1 primitive Type Indexers
+//////////
+
+//////////
+// 1.1.2 domain-specific Type Indexers
+//////////
+/**
+ * An element must be an instance of type "FileSystem class".
+ */
+private pattern mustInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FileSystem class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FileSystem class");
+}
+
+/**
+ * An element may be an instance of type "FileSystem class".
+ */
+private pattern mayInstanceOfFileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFileSystem_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFileSystem_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "FSObject class".
+ */
+private pattern mustInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"FSObject class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"FSObject class");
+}
+
+/**
+ * An element may be an instance of type "FSObject class".
+ */
+private pattern mayInstanceOfFSObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFSObject_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFSObject_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Dir class".
+ */
+private pattern mustInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Dir class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewDir_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Dir class");
+}
+
+/**
+ * An element may be an instance of type "Dir class".
+ */
+private pattern mayInstanceOfDir_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewDir_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfDir_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "File class".
+ */
+private pattern mustInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"File class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewFile_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"File class");
+}
+
+/**
+ * An element may be an instance of type "File class".
+ */
+private pattern mayInstanceOfFile_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find scopeDisallowsNewFile_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfFile_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class".
+ */
+private pattern mustInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class");
+}
+
+/**
+ * An element may be an instance of type "Model class".
+ */
+private pattern mayInstanceOfModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class DefinedPart".
+ */
+private pattern mustInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class DefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class DefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class DefinedPart".
+ */
+private pattern mayInstanceOfModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,element); }
+/**
+ * An element must be an instance of type "Model class UndefinedPart".
+ */
+private pattern mustInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) {
+ Type.name(type,"Model class UndefinedPart");
+ find directInstanceOf(problem,interpretation,element,type);
+}
+private pattern scopeDisallowsNewModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.scopes(interpretation,scope);
+ Scope.targetTypeInterpretation(scope,typeInterpretation);
+ Scope.maxNewElements(scope,0);
+ PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type);
+ Type.name(type,"Model class UndefinedPart");
+}
+
+/**
+ * An element may be an instance of type "Model class UndefinedPart".
+ */
+private pattern mayInstanceOfModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.openWorldElements(interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+ neg find scopeDisallowsNewModel_class_UndefinedPart(problem, interpretation);
+ neg find isPrimitive(element);
+} or
+{ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element); }
+
+//////////
+// 1.2 Relation Declaration Indexers
+//////////
+/**
+ * Matcher for detecting tuples t where []root reference FileSystem(source,target)
+ */
+private pattern mustInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>root reference FileSystem(source,target)
+ */
+private pattern mayInRelationroot_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFileSystem_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []live reference FileSystem(source,target)
+ */
+ private pattern mustInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+ {
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target);
+ }
+/**
+ * Matcher for detecting tuples t where []live reference FileSystem(source,target)
+ */
+ private pattern mayInRelationlive_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+ {
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,source,target);
+ }
+/**
+ * Matcher for detecting tuples t where []parent reference FSObject(source,target)
+ */
+private pattern mustInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FSObject");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>parent reference FSObject(source,target)
+ */
+private pattern mayInRelationparent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfFSObject_class(problem,interpretation,source);
+ find mayInstanceOfDir_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The eOpposite of the reference is containment, then a referene cannot be created if
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,source,_);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationparent_reference_FSObject(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []contents reference Dir(source,target)
+ */
+private pattern mustInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"contents reference Dir");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>contents reference Dir(source,target)
+ */
+private pattern mayInRelationcontents_reference_Dir(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfDir_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference to the target,
+ // the upper bound of the opposite reference multiplicity should be considered.
+ numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FSObject(problem,interpretation,target,_);
+ check(numberOfExistingOppositeReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationcontents_reference_Dir(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []filesystems reference Model(source,target)
+ */
+private pattern mustInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>filesystems reference Model(source,target)
+ */
+private pattern mayInRelationfilesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFileSystem_class(problem,interpretation,target);
+ // There are "numberOfExistingReferences" currently existing instances of the reference from the source,
+ // the upper bound of the multiplicity should be considered.
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,source,_);
+ check(numberOfExistingReferences < 1);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target);
+}
+/**
+ * Matcher for detecting tuples t where []otherFSObjects reference Model(source,target)
+ */
+private pattern mustInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"otherFSObjects reference Model");
+ PartialRelationInterpretation.relationlinks(relationIterpretation,link);
+ BinaryElementRelationLink.param1(link,source);
+ BinaryElementRelationLink.param2(link,target);
+}
+/**
+ * Matcher for detecting tuples t where <>otherFSObjects reference Model(source,target)
+ */
+private pattern mayInRelationotherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ // The two endpoint of the link have to exist
+ find mayExist(problem, interpretation, source);
+ find mayExist(problem, interpretation, target);
+ // Type consistency
+ find mayInstanceOfModel_class(problem,interpretation,source);
+ find mayInstanceOfFSObject_class(problem,interpretation,target);
+ // The reference is containment, then a new reference cannot be create if:
+ // 1. Multiple parents
+ neg find mustContains4(problem,interpretation,_,target);
+ // 2. Circle in the containment hierarchy
+ neg find mustTransitiveContains(source,target);
+} or {
+ find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target);
+}
+
+//////////
+// 1.3 Relation Definition Indexers
+//////////
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries patternContent
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_o1);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_o2;
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_o1);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_o2);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_o1, var_o2)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o1);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_o2);
+ // o1 is exported
+ // o2 is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_o1);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_o1,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_o2;
+}
+private pattern twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+private pattern twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+private pattern twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(var_o1, var_o2) {
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent(_,_,var_o1, var_o2);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries live
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_l;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_root;
+ find twoParam_mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mayInstanceOfDir_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_l);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mayInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mayInstanceOfDir_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_root);
+ find twoParam_mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_this, var_l)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_l;
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_l);
+ // this is exported
+ // l is exported
+ find mustInstanceOfFileSystem_class(problem,interpretation,var_this);
+ find mustInRelationroot_reference_FileSystem(problem,interpretation,var_this,var_virtual0);
+ find mustInstanceOfDir_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_root;
+ find twoParam_currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_patternContent+(var_root,var_l);
+}
+// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test filesystem queries contentInNotLive
+private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_child);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mayInstanceOfDir_class(problem,interpretation,var_parent);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mayInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ find mayEquivalent(problem, interpretation, var_virtual0, var_child);
+ neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_parent);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_child);
+ // parent is exported
+ // child is exported
+ find mustInstanceOfDir_class(problem,interpretation,var_parent);
+ find mustInRelationcontents_reference_Dir(problem,interpretation,var_parent,var_virtual0);
+ find mustInstanceOfFSObject_class(problem,interpretation,var_virtual0);
+ var_virtual0 == var_child;
+ neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_live(problem,interpretation,_var__0,var_child);
+}
+
+//////////
+// 1.4 Containment Indexer
+//////////
+private pattern mustContains2(source: DefinedElement, target: DefinedElement) {
+ find mustContains4(_,_,source,target);
+}
+
+private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation,
+ source: DefinedElement, target: DefinedElement)
+ { find mustInRelationroot_reference_FileSystem(problem,interpretation,source,target); }or
+
+ { find mustInRelationcontents_reference_Dir(problem,interpretation,source,target); }or
+
+ { find mustInRelationfilesystems_reference_Model(problem,interpretation,source,target); }or
+
+ { find mustInRelationotherFSObjects_reference_Model(problem,interpretation,source,target); }
+
+private pattern mustTransitiveContains(source,target) {
+ find mustContains2+(source,target);
+}
+
+//////////
+// 2. Invalidation Indexers
+//////////
+// 2.1 Invalidated by WF Queries
+//////////
+pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child);
+}
+
+//////////
+// 3. Unfinishedness Indexers
+//////////
+// 3.1 Unfinishedness Measured by Multiplicity
+//////////
+pattern unfinishedLowerMultiplicity_root_reference_FileSystem(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationroot_reference_FileSystem(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+pattern unfinishedLowerMultiplicity_filesystems_reference_Model(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,object);
+ numberOfExistingReferences == count find mustInRelationfilesystems_reference_Model(problem,interpretation,object,_);
+ check(numberOfExistingReferences < 1);
+ missingMultiplicity == eval(1-numberOfExistingReferences);
+}
+
+//////////
+// 3.2 Unfinishedness Measured by WF Queries
+//////////
+pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem:LogicProblem, interpretation:PartialInterpretation,
+ var_parent, var_child)
+{
+ find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_filesystem_queries_contentInNotLive(problem,interpretation,var_parent,var_child);
+}
+
+//////////
+// 4. Refinement Indexers
+//////////
+// 4.1 Object constructors
+//////////
+private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation)
+{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFile_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFSObject_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfFileSystem_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfDir_class(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_DefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}or{
+ find interpretation(problem,interpretation);
+ find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,root);
+ find mustExist(problem, interpretation, root);
+}
+pattern createObject_Dir_class_by_root_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"root reference FileSystem");
+ find mustInstanceOfFileSystem_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationroot_reference_FileSystem(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Dir_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Dir class");
+ find mayInstanceOfDir_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class_by_filesystems_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"filesystems reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayInRelationfilesystems_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_FileSystem_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FileSystem class");
+ find mayInstanceOfFileSystem_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_Model_class_UndefinedPart(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Model class UndefinedPart");
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_contents_reference_Dir_with_parent_reference_FSObject(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"contents reference Dir");
+ PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FSObject");
+ find mustInstanceOfDir_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationcontents_reference_Dir(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class_by_otherFSObjects_reference_Model(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation,
+ container:DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"otherFSObjects reference Model");
+ find mustInstanceOfModel_class(problem,interpretation,container);
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayInRelationotherFSObjects_reference_Model(problem,interpretation,container,newObject);
+ find mustExist(problem, interpretation, container);
+ neg find mustExist(problem, interpretation, newObject);
+}
+pattern createObject_File_class(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ typeInterpretation:PartialComplexTypeInterpretation)
+{
+ find interpretation(problem,interpretation);
+ neg find hasElementInContainment(problem,interpretation);
+ PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation);
+ PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"File class");
+ find mayInstanceOfFile_class(problem,interpretation,newObject);
+ find mayExist(problem, interpretation, newObject);
+ neg find mustExist(problem, interpretation, newObject);
+}
+
+//////////
+// 4.2 Type refinement
+//////////
+pattern refineTypeTo_Dir_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+}
+pattern refineTypeTo_FileSystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_Model_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class_UndefinedPart(problem,interpretation,element);
+ neg find mustInstanceOfFSObject_class(problem,interpretation,element);
+}
+pattern refineTypeTo_File_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) {
+ find interpretation(problem,interpretation);
+ PartialInterpretation.newElements(interpretation,element);
+ find mayInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfDir_class(problem,interpretation,element);
+ neg find mustInstanceOfFileSystem_class(problem,interpretation,element);
+ neg find mustInstanceOfFile_class(problem,interpretation,element);
+ neg find mustInstanceOfModel_class(problem,interpretation,element);
+}
+
+//////////
+// 4.3 Relation refinement
+//////////
+pattern refineRelation_live_reference_FileSystem(
+ problem:LogicProblem, interpretation:PartialInterpretation,
+ relationIterpretation:PartialRelationInterpretation,
+ from: DefinedElement, to: DefinedElement)
+{
+ find interpretation(problem,interpretation);
+ PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation);
+ PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"live reference FileSystem");
+ find mustExist(problem, interpretation, from);
+ find mustExist(problem, interpretation, to);
+ find mustInstanceOfFileSystem_class(problem,interpretation,from);
+ find mustInstanceOfFSObject_class(problem,interpretation,to);
+ find mayInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+ neg find mustInRelationlive_reference_FileSystem(problem,interpretation,from,to);
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generation.logicproblem b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generation.logicproblem
index b744bf95..991c88fd 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generation.logicproblem
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generation.logicproblem
@@ -1,33 +1,23 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -35,24 +25,24 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -66,24 +56,24 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -97,75 +87,220 @@
-
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
+
-
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
+
-
+
-
-
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/init.partialmodel b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/init.partialmodel
index ead2b44e..6c0e5571 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/init.partialmodel
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/init.partialmodel
@@ -37,53 +37,25 @@
-
+
-
+
-
+
-
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -94,13 +66,4 @@
-
-
-
-
-
-
-
-
-
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/log.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/log.txt
index 4d22da6b..162931cc 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/log.txt
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/log.txt
@@ -1 +1 @@
-Model generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finished
\ No newline at end of file
+Model generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Model generation startedProblem is consistent, 2 models are generated!Model generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is inconsistent, no model is created!Model generation finishedModel generation startedProblem is inconsistent, no model is created!Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finished
\ No newline at end of file
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.gml
index 4c5b2e7d..e73f85db 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.gml
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.gml
@@ -477,3 +477,4307 @@ graph
]
]
]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 277.20000000000005
+ h 82
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Statechart class DefinedPart
+ CompositeElement class DefinedPart
+ Statechart class
+ CompositeElement class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 107.80000000000001
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Region class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 292.6
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Vertex class
+ State class
+ RegularState class
+ CompositeElement class
+ CompositeElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 146.3
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Pseudostate class
+ Vertex class
+ Entry class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Transition class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 4
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "incomingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "outgoingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 4
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "target reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 5
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "regions reference CompositeElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 277.20000000000005
+ h 82
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Statechart class DefinedPart
+ CompositeElement class DefinedPart
+ Statechart class
+ CompositeElement class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 107.80000000000001
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Region class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 146.3
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Pseudostate class
+ Vertex class
+ Entry class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Transition class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 292.6
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Vertex class
+ State class
+ RegularState class
+ CompositeElement class
+ CompositeElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Transition class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "incomingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 5
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "incomingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 4
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "outgoingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 7
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "outgoingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "target reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "target reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 4
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "regions reference CompositeElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 277.20000000000005
+ h 82
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Statechart class DefinedPart
+ CompositeElement class DefinedPart
+ Statechart class
+ CompositeElement class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 107.80000000000001
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Region class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 154.0
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Vertex class
+ RegularState class
+ FinalState class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 146.3
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Pseudostate class
+ Vertex class
+ Entry class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 292.6
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Vertex class
+ State class
+ RegularState class
+ CompositeElement class
+ CompositeElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Transition class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "incomingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 7
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "outgoingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "target reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 5
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "regions reference CompositeElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 277.20000000000005
+ h 82
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Statechart class DefinedPart
+ CompositeElement class DefinedPart
+ Statechart class
+ CompositeElement class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 107.80000000000001
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Region class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 146.3
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Pseudostate class
+ Vertex class
+ Exit class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 146.3
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Pseudostate class
+ Vertex class
+ Entry class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 292.6
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Vertex class
+ State class
+ RegularState class
+ CompositeElement class
+ CompositeElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Transition class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "incomingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 7
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "outgoingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 6
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "target reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 5
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "regions reference CompositeElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Model class DefinedPart
+ Model class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ File class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FileSystem class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "root reference FileSystem"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "filesystems reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Model class DefinedPart
+ Model class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ File class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FileSystem class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 4
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "root reference FileSystem"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "filesystems reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Model class DefinedPart
+ Model class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ File class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ File class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FileSystem class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "root reference FileSystem"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "filesystems reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Model class DefinedPart
+ Model class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FileSystem class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ File class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "root reference FileSystem"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 6
+ target 4
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "parent reference FSObject"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 4
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "contents reference Dir"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "filesystems reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.png
index d9b7c988..605b244d 100644
Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.png differ
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.xmi
index f6b5a41e..ffc48f68 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.xmi
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.xmi
@@ -1,9 +1,9 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.gml
index f07ae0db..57d704cf 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.gml
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.gml
@@ -477,3 +477,3695 @@ graph
]
]
]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 277.20000000000005
+ h 82
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Statechart class DefinedPart
+ CompositeElement class DefinedPart
+ Statechart class
+ CompositeElement class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 107.80000000000001
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Region class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 146.3
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Pseudostate class
+ Vertex class
+ Entry class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Transition class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 292.6
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Vertex class
+ State class
+ RegularState class
+ CompositeElement class
+ CompositeElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 146.3
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Pseudostate class
+ Vertex class
+ Exit class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 5
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "incomingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 4
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "outgoingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 7
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "target reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 4
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "regions reference CompositeElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 277.20000000000005
+ h 82
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Statechart class DefinedPart
+ CompositeElement class DefinedPart
+ Statechart class
+ CompositeElement class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 107.80000000000001
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Region class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 154.0
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Vertex class
+ RegularState class
+ FinalState class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 146.3
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Pseudostate class
+ Vertex class
+ Entry class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 292.6
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Vertex class
+ State class
+ RegularState class
+ CompositeElement class
+ CompositeElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Transition class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 4
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "incomingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 7
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "outgoingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 4
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "target reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 5
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "regions reference CompositeElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 277.20000000000005
+ h 82
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Statechart class DefinedPart
+ CompositeElement class DefinedPart
+ Statechart class
+ CompositeElement class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 107.80000000000001
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Region class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 146.3
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Pseudostate class
+ Vertex class
+ Exit class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 146.3
+ h 68
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Pseudostate class
+ Vertex class
+ Entry class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 292.6
+ h 96
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Vertex class
+ State class
+ RegularState class
+ CompositeElement class
+ CompositeElement class UndefinedPart
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Transition class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 11
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 4
+ target 7
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "incomingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 5
+ target 7
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "outgoingTransitions reference Vertex"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "vertices reference Region"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 4
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "target reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 7
+ target 5
+ graphics
+ [
+ fill "#000000"
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "source reference Transition"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "regions reference CompositeElement"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Model class DefinedPart
+ Model class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FileSystem class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 4
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "root reference FileSystem"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "filesystems reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Model class DefinedPart
+ Model class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ File class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FileSystem class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ File class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 4
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "root reference FileSystem"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "filesystems reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Model class DefinedPart
+ Model class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ File class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FileSystem class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 4
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "root reference FileSystem"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "filesystems reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
+graph
+[
+ node
+ [
+ id 0
+ graphics
+ [
+ w 192.50000000000003
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "o 1"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ Model class DefinedPart
+ Model class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 1
+ graphics
+ [
+ w 41.800000000000004
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "true"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 2
+ graphics
+ [
+ w 50.6
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "false"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 3
+ graphics
+ [
+ w 138.60000000000002
+ h 40
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FileSystem class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 4
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ Dir class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 5
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ File class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 6
+ graphics
+ [
+ w 123.20000000000002
+ h 54
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "null"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ FSObject class
+ File class
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 7
+ graphics
+ [
+ w 112.2
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Integers"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 8
+ graphics
+ [
+ w 85.80000000000001
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Reals"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 9
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Strings"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+
+ node
+ [
+ id 10
+ graphics
+ [
+ w 103.4
+ h 26
+ type "rectangle"
+ fill "#FFFFFF"
+ fill2 "#FFFFFF"
+ outline "#000000"
+ ]
+ LabelGraphics
+ [
+ text "New Objects"
+ outline "#000000"
+ fill "#FFFFFF"
+ fontSize 16
+ fontName "Monospace"
+ autoSizePolicy "node_width"
+ anchor "t"
+ borderDistance 0.0
+ ]
+ LabelGraphics
+ [
+ text "
+ "
+ fontSize 14
+ fontName "Consolas"
+ alignment "left"
+ anchor "tl"
+ borderDistance 6
+ ]
+ ]
+ edge
+ [
+ source 3
+ target 4
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "root reference FileSystem"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 3
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "filesystems reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 5
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+ edge
+ [
+ source 0
+ target 6
+ graphics
+ [
+ fill "#000000"
+ width 3
+ targetArrow "standard"
+ ]
+ LabelGraphics
+ [
+ text "otherFSObjects reference Model"
+ fontSize 14
+ fontName "Consolas"
+ configuration "AutoFlippingLabel"
+ model "six_pos"
+ position "thead"
+ ]
+ ]
+]
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.png
index 38dadff8..1fddfd99 100644
Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.png differ
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.xmi
index bc0e55cc..6b9900e2 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.xmi
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.xmi
@@ -1,9 +1,8 @@
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/statistics.csv b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/statistics.csv
index ee8829e5..d1c8d98d 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/statistics.csv
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/statistics.csv
@@ -1,2 +1,22 @@
Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
1;1;ModelResultImpl;335;2777;2544;7194393100;105;140;61;186;9;0;3
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;120;2483;7934;1838851300;477;3162;36;100;0;2
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;InconsistencyResultImpl;20;2258;2771;12900;42;12;1;0;0
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;InconsistencyResultImpl;14;2066;3146;29000;439;14;13;0;0
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;15;1857;2520;3998461000;169;207;102;9;4;0;3
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;70;2695;2815;3409332300;111;133;61;18;3;0;5
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;16;2246;2987;3347793300;168;362;201;7;6;0;3
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;6;839;711;3017372100;45;206;107;9;7;0;1
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;5;879;674;2970538700;33;111;55;7;2;0;1
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;5;882;742;2902370500;64;203;110;9;6;0;1
+Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime
+1;1;ModelResultImpl;10;1041;730;3174826600;23;31;19;12;0;0;1
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml
index efdbb9b2..a09e1cf4 100644
--- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml
@@ -1,26 +1,146 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/ecorePatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/ecorePatterns.vql
new file mode 100644
index 00000000..9af35b50
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/ecorePatterns.vql
@@ -0,0 +1,29 @@
+package ca.mcgill.ecse.dslreasoner.standalone.test.ecore.queries
+
+import epackage "http://www.eclipse.org/emf/2002/Ecore"
+
+pattern directSupertype(a: EClass, b:EClass) {
+ EClass.eSuperTypes(a,b);
+}
+
+@Constraint(key={a}, severity="error", message="error")
+pattern loopInInheritence(a: EClass) {
+ find directSupertype+(a,a);
+}
+
+pattern opposite(a:EReference, b: EReference) {
+ EReference.eOpposite(a,b);
+}
+@Constraint(key={a}, severity="error", message="error")
+pattern oppositeDifferentClass(a:EReference) {
+ EReference.eOpposite(a,b);
+ EReference.eContainingClass(a,aContaining);
+ EReference.eType(b,bTarget);
+ aContaining != bTarget;
+}
+
+@Constraint(key={a}, severity="error", message="error")
+pattern nonSymmetricOpposite(a:EReference, b:EReference) {
+ find opposite(a,b);
+ neg find opposite(b,a);
+}
\ No newline at end of file
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql
new file mode 100644
index 00000000..02d34dcd
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql
@@ -0,0 +1,103 @@
+package ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries
+
+import "FamMetamodel"
+
+@Constraint(message="terminatorAndInformation", severity="error", key={T})
+pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = {
+ FunctionalOutput.outgoingLinks(Out,I);
+ FunctionalOutput.terminator(Out,T);
+} or {
+ InformationLink.to(I,In);
+ FunctionalInput.terminator(In,T);
+}
+
+@QueryBasedFeature
+pattern type(This : Function, Target : FunctionType) = {
+ find rootElements(_Model, This);
+ Target == FunctionType::Root;
+} or {
+ neg find parent(_Child, This);
+ neg find rootElements(_Model, This);
+ Target == FunctionType::Leaf;
+} or {
+ find parent(This, _Par);
+ find parent(_Child, This);
+ Target == FunctionType::Intermediate;
+}
+
+pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = {
+ FunctionalArchitectureModel.rootElements(Model, Root);
+}
+
+pattern parent(Func : Function, Par : Function) = {
+ Function.parent(Func, Par);
+}
+
+@QueryBasedFeature
+pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) {
+ FunctionalElement(This);
+ FunctionalArchitectureModel(Target);
+}
+
+/*
+@Constraint(message="noRoot", severity="error", key={fam})
+pattern noRoot(fam: FunctionalArchitectureModel) {
+ FunctionalArchitectureModel(fam);
+ neg find hasRoot(_);
+}
+@Constraint(message="noIntermediate", severity="error", key={fam})
+pattern noInt(fam: FunctionalArchitectureModel) {
+ FunctionalArchitectureModel(fam);
+ neg find hasInt(_);
+}
+@Constraint(message="noLeaf", severity="error", key={fam})
+pattern noLeaf(fam: FunctionalArchitectureModel) {
+ FunctionalArchitectureModel(fam);
+ neg find hasLeaf(_);
+}
+*/
+
+/*
+@QueryBasedFeature
+pattern model(This : FunctionalElement, Target : FunctionalArchitectureModel) = {
+ find parent+(This, Parent);
+ find rootElements(Target, Parent);
+} or {
+ find rootElements(Target, This);
+}
+
+pattern interfaceData(FI : FunctionalInterface, FD : FunctionalData) = {
+ FunctionalInterface.data(FI, FD);
+}
+
+@QueryBasedFeature
+pattern inputs(This : FunctionalInterface, Target : FunctionalInput) = {
+ find interfaceData(This, Target);
+}
+
+@QueryBasedFeature
+pattern outputs(This : FunctionalInterface, Target : FunctionalOutput) = {
+ find interfaceData(This, Target);
+}
+
+@QueryBasedFeature
+pattern outgoingLinks(This : FunctionalElement, Target : InformationLink) = {
+ FunctionalElement.interface.outputs(This, Output);
+ InformationLink.from(Target, Output);
+}
+
+@QueryBasedFeature
+pattern incomingLinks(This : FunctionalElement, Target : InformationLink) = {
+ FunctionalElement.interface.inputs(This, Input);
+ InformationLink.to(Target, Input);
+}
+
+@QueryBasedFeature
+pattern connects(This : FunctionalElement, Target : FunctionalElement) = {
+ FunctionalElement.outgoingLinks(This,Link);
+ FunctionalElement.incomingLinks(Target,Link);
+}*/
+
+/*pattern frequency(a: Function, b : EInt) {
+ Function.minimumFrequency(a,b);
+}*/
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystemPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystemPatterns.vql
new file mode 100644
index 00000000..269a4242
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystemPatterns.vql
@@ -0,0 +1,24 @@
+package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries
+
+import epackage "FileSystemMetamodel"
+
+pattern patternContent(o1: FSObject, o2: FSObject) {
+ Dir.contents(o1,o2);
+}
+
+@QueryBasedFeature
+pattern live(this: FileSystem, l: FSObject) {
+ FileSystem.root(this,l);
+} or {
+ FileSystem.root(this,root);
+ find patternContent+(root,l);
+}
+
+@Constraint(key={child}, severity="error", message="error")
+pattern contentInNotLive(parent : Dir, child: FSObject) {
+ Dir.contents(parent,child);
+ neg find live(_,parent);
+} or {
+ Dir.contents(parent,child);
+ neg find live(_,child);
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduMutatedPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduMutatedPatterns.vql
new file mode 100644
index 00000000..2e498670
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduMutatedPatterns.vql
@@ -0,0 +1,270 @@
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries
+
+import epackage "YakinduMetamodel"
+
+/////////
+// Entry
+/////////
+
+pattern entryInRegion_M0(r1 : Region, e1 : Entry) {
+ Region.vertices(r1, e1);
+}
+pattern entryInRegion_M1(r1 : Region, e1) {
+ Region.vertices(r1, e1);
+}
+pattern entryInRegion_M2(r1 : Region, e1: Entry) {
+ // For positive constraint
+ Region(r1);Entry(e1);
+}
+
+
+//@Constraint(severity="error", message="error", key = {r1})
+pattern noEntryInRegion_M0(r1 : Region) {
+ neg find entryInRegion_M0(r1, _);
+}
+pattern noEntryInRegion_M1(r1 : Region) {
+ neg find entryInRegion_M1(r1, _);
+}
+pattern noEntryInRegion_M2(r1 : Region) {
+ neg find entryInRegion_M2(r1, _);
+}
+pattern noEntryInRegion_M3(r1 : Region) {
+ find entryInRegion_M0(r1, _);
+}
+pattern noEntryInRegion_M4(r1 : Region) {
+ find entryInRegion_M1(r1, _);
+}
+pattern noEntryInRegion_M5(r1 : Region) {
+ find entryInRegion_M2(r1, _);
+}
+
+//@Constraint(severity="error", message="error", key = {r})
+pattern multipleEntryInRegion_M0(r : Region) {
+ find entryInRegion_M0(r, e1);
+ find entryInRegion_M0(r, e2);
+ e1 != e2;
+}
+pattern multipleEntryInRegion_M1(r : Region) {
+ find entryInRegion_M1(r, e1);
+ find entryInRegion_M0(r, e2);
+ e1 != e2;
+}
+pattern multipleEntryInRegion_M2(r : Region) {
+ find entryInRegion_M2(r, e1);
+ find entryInRegion_M0(r, e2);
+ e1 != e2;
+}
+pattern multipleEntryInRegion_M3(r : Region) {
+ find entryInRegion_M0(r, e1);
+ find entryInRegion_M1(r, e2);
+ e1 != e2;
+}
+pattern multipleEntryInRegion_M4(r : Region) {
+ find entryInRegion_M2(r, e1);
+ find entryInRegion_M2(r, e2);
+ e1 != e2;
+}
+pattern multipleEntryInRegion_M5(r : Region) {
+ find entryInRegion_M0(r, e1);
+ find entryInRegion_M0(r, e2);
+}
+
+
+pattern transition_M0(t : Transition, src : Vertex, trg : Vertex) {
+ Transition.source(t, src);
+ Transition.target(t, trg);
+}
+pattern transition_M1(t : Transition, src : Vertex, trg : Vertex) {
+ Transition.source(t, src);
+ Vertex(trg);
+}
+pattern transition_M2(t : Transition, src : Vertex, trg : Vertex) {
+ Vertex(src);
+ Transition.target(t, trg);
+}
+pattern transition_M3(t : Transition, src : Vertex, trg : Vertex) {
+ Transition.source(t_x, src);
+ Transition.target(t, trg);
+}
+pattern transition_M4(t : Transition, src : Vertex, trg : Vertex) {
+ Transition.source(t, src);
+ Transition.target(t_x, trg);
+}
+
+//@Constraint(severity="error", message="error", key = {e})
+pattern incomingToEntry_M0(t : Transition, e : Entry) {
+ find transition_M0(t, _, e);
+}
+pattern incomingToEntry_1(t : Transition, e) {
+ find transition_M0(t, _, e);
+}
+pattern incomingToEntry_2(t : Transition, e : Entry) {
+ find transition_M1(t, _, e);
+}
+pattern incomingToEntry_3(t : Transition, e : Entry) {
+ find transition_M2(t, _, e);
+}
+pattern incomingToEntry_4(t : Transition, e : Entry) {
+ find transition_M3(t, _, e);
+}
+pattern incomingToEntry_5(t : Transition, e : Entry) {
+ find transition_M4(t, _, e);
+}
+
+pattern noOutgoingTransitionFromEntry_M0(e : Entry) {
+ neg find transition_M0(_, e, _);
+}
+
+pattern noOutgoingTransitionFromEntry_M1(e) {
+ Vertex(e);
+ neg find transition_M0(_, e, _);
+}
+pattern noOutgoingTransitionFromEntry_M2(e : Entry) {
+ neg find transition_M1(_, e, _);
+}
+pattern noOutgoingTransitionFromEntry_M3(e : Entry) {
+ neg find transition_M2(_, e, _);
+}
+pattern noOutgoingTransitionFromEntry_M4(e : Entry) {
+ neg find transition_M3(_, e, _);
+}
+pattern noOutgoingTransitionFromEntry_M5(e : Entry) {
+ neg find transition_M4(_, e, _);
+}
+
+
+//@Constraint(severity="error", message="error", key = {e})
+pattern multipleTransitionFromEntry_M0(e : Entry, t1 : Transition, t2: Transition) {
+ Entry.outgoingTransitions(e,t1);
+ Entry.outgoingTransitions(e,t2);
+ t1!=t2;
+}
+pattern multipleTransitionFromEntry_M1(e, t1 : Transition, t2: Transition) {
+ Entry.outgoingTransitions(e,t1);
+ Entry.outgoingTransitions(e,t2);
+ t1!=t2;
+}
+pattern multipleTransitionFromEntry_M2(e : Entry, t1 : Transition, t2: Transition) {
+ Transition(t1);
+ Entry.outgoingTransitions(e,t2);
+ t1!=t2;
+}
+pattern multipleTransitionFromEntry_M3(e : Entry, t1 : Transition, t2: Transition) {
+ Entry.outgoingTransitions(e,t1);
+ Transition(t2);
+ t1!=t2;
+}
+pattern multipleTransitionFromEntry_M4(e : Entry, t1 : Transition, t2: Transition) {
+ Entry.outgoingTransitions(e,t1);
+ Entry.outgoingTransitions(e,t2);
+}
+
+/////////
+// Exit
+/////////
+
+//@Constraint(severity="error", message="error", key = {e})
+pattern outgoingFromExit_M0(t : Transition, e : Exit) {
+ Exit.outgoingTransitions(e,t);
+}
+pattern outgoingFromExit_M1(t : Transition, e) {
+ Vertex.outgoingTransitions(e,t);
+}
+pattern outgoingFromExit_M2(t : Transition, e : Exit) {
+ Transition(t);
+ Exit(e);
+}
+
+/////////
+// Final
+/////////
+
+//@Constraint(severity="error", message="error", key = {f})
+pattern outgoingFromFinal_M0(t : Transition, f : FinalState) {
+ FinalState.outgoingTransitions(f,t);
+}
+pattern outgoingFromFinal_M1(t : Transition, f) {
+ Vertex.outgoingTransitions(f,t);
+}
+pattern outgoingFromFinal_M2(t : Transition, f : FinalState) {
+ Transition(t);
+ FinalState(f);
+}
+
+/////////
+// State vs Region
+/////////
+
+//@Constraint(severity="error", message="error", key = {region})
+pattern noStateInRegion_M0(region: Region) {
+ neg find StateInRegion_M0(region,_);
+}
+pattern noStateInRegion_M1(region: Region) {
+ neg find StateInRegion_M1(region,_);
+}
+pattern noStateInRegion_M2(region: Region) {
+ neg find StateInRegion_M2(region,_);
+}
+pattern noStateInRegion_M3(region: Region) {
+ find StateInRegion_M0(region,_);
+}
+
+pattern StateInRegion_M0(region: Region, state: State) {
+ Region.vertices(region,state);
+}
+pattern StateInRegion_M1(region: Region, state) {
+ Region.vertices(region,state);
+}
+pattern StateInRegion_M2(region: Region, state:State) {
+ Region(region);State(state);
+}
+
+/////////
+// Choice
+/////////
+
+@Constraint(severity="error", message="error", key = {c})
+pattern choiceHasNoOutgoing_M0(c : Choice) {
+ neg find transition_M0(_, c, _);
+}
+pattern choiceHasNoOutgoing_M1(c:Vertex) {
+ neg find transition_M0(_, c, _);
+}
+pattern choiceHasNoOutgoing_M2(c : Choice) {
+ neg find transition_M1(_, c, _);
+}
+pattern choiceHasNoOutgoing_M3(c : Choice) {
+ neg find transition_M2(_, c, _);
+}
+pattern choiceHasNoOutgoing_M4(c : Choice) {
+ neg find transition_M3(_, c, _);
+}
+pattern choiceHasNoOutgoing_M5(c : Choice) {
+ neg find transition_M4(_, c, _);
+}
+pattern choiceHasNoOutgoing_M6(c : Choice) {
+ find transition_M0(_, c, _);
+}
+
+@Constraint(severity="error", message="error", key = {c})
+pattern choiceHasNoIncoming_M0(c: Choice) {
+ neg find transition_M0(_, _, c);
+}
+pattern choiceHasNoIncoming_M1(c:Vertex) {
+ neg find transition_M0(_, _, c);
+}
+pattern choiceHasNoIncoming_M2(c: Choice) {
+ neg find transition_M1(_, _, c);
+}
+pattern choiceHasNoIncoming_M3(c: Choice) {
+ neg find transition_M2(_, _, c);
+}
+pattern choiceHasNoIncoming_M4(c: Choice) {
+ neg find transition_M3(_, _, c);
+}
+pattern choiceHasNoIncoming_M5(c: Choice) {
+ neg find transition_M4(_, _, c);
+}
+pattern choiceHasNoIncoming_M6(c: Choice) {
+ find transition_M0(_, _, c);
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
new file mode 100644
index 00000000..597b1691
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
@@ -0,0 +1,227 @@
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries
+
+import epackage "YakinduMetamodel"
+
+/////////
+// Entry
+/////////
+
+pattern entryInRegion(r1 : Region, e1 : Entry) {
+ Region.vertices(r1, e1);
+}
+
+@Constraint(severity="error", message="error", key = {r1})
+pattern noEntryInRegion(r1 : Region) {
+ neg find entryInRegion(r1, _);
+}
+
+@Constraint(severity="error", message="error", key = {r})
+pattern multipleEntryInRegion(r : Region) {
+ find entryInRegion(r, e1);
+ find entryInRegion(r, e2);
+ e1 != e2;
+}
+
+pattern transition(t : Transition, src : Vertex, trg : Vertex) {
+ Transition.source(t, src);
+ Transition.target(t, trg);
+}
+
+@Constraint(severity="error", message="error", key = {e})
+pattern incomingToEntry(t : Transition, e : Entry) {
+ find transition(t, _, e);
+}
+
+@Constraint(severity="error", message="error", key = {e})
+pattern noOutgoingTransitionFromEntry(e : Entry) {
+ neg find transition(_, e, _);
+}
+
+@Constraint(severity="error", message="error", key = {e})
+pattern multipleTransitionFromEntry(e : Entry, t1 : Transition, t2: Transition) {
+ Entry.outgoingTransitions(e,t1);
+ Entry.outgoingTransitions(e,t2);
+ t1!=t2;
+}
+
+/////////
+// Exit
+/////////
+
+@Constraint(severity="error", message="error", key = {e})
+pattern outgoingFromExit(t : Transition, e : Exit) {
+ Exit.outgoingTransitions(e,t);
+}
+
+/////////
+// Final
+/////////
+
+@Constraint(severity="error", message="error", key = {f})
+pattern outgoingFromFinal(t : Transition, f : FinalState) {
+ FinalState.outgoingTransitions(f,t);
+}
+
+/////////
+// State vs Region
+/////////
+
+@Constraint(severity="error", message="error", key = {region})
+pattern noStateInRegion(region: Region) {
+ neg find StateInRegion(region,_);
+}
+pattern StateInRegion(region: Region, state: State) {
+ Region.vertices(region,state);
+}
+
+/////////
+// Choice
+/////////
+
+@Constraint(severity="error", message="error", key = {c})
+pattern choiceHasNoOutgoing(c : Choice) {
+ neg find transition(_, c, _);
+}
+
+@Constraint(severity="error", message="error", key = {c})
+pattern choiceHasNoIncoming(c: Choice) {
+ neg find transition(_, _, c);
+}
+
+/////////
+// Synchronization
+/////////
+
+@Constraint(severity="error", message="error", key = {s})
+pattern synchHasNoOutgoing(s : Synchronization) {
+ neg find transition(_, s, _);
+}
+
+@Constraint(severity="error", message="error", key = {s})
+pattern synchHasNoIncoming(s : Synchronization) {
+ neg find transition(_, _, s);
+}
+
+@Constraint(severity="error", message="error", key = {s})
+pattern SynchronizedIncomingInSameRegion(s : Synchronization, v1 : Vertex, v2 : Vertex) {
+ find transition(t1, v1, s);
+ find transition(t2, v2, s);
+ t1!=t2;
+ Region.vertices(r, v1);
+ Region.vertices(r, v2);
+} or {
+ find transition(t1, s, v1);
+ find transition(t2, s, v2);
+ t1!=t2;
+ Region.vertices(r, v1);
+ Region.vertices(r, v2);
+}
+
+@Constraint(severity="error", message="error", key = {s})
+pattern notSynchronizingStates(s : Synchronization) {
+ neg find hasMultipleOutgoingTrainsition(s);
+ neg find hasMultipleIncomingTrainsition(s);
+}
+
+pattern hasMultipleOutgoingTrainsition(v : Synchronization) {
+ find transition(_, v, trg1);
+ find transition(_, v, trg2);
+ trg1 != trg2;
+}
+
+pattern hasMultipleIncomingTrainsition(v : Synchronization) {
+ find transition(_, src1, v);
+ find transition(_, src2, v);
+ src1 != src2;
+}
+
+@Constraint(severity="error", message="error", key = {s})
+pattern SynchronizedRegionsAreNotSiblings(s : Synchronization, v1 : Vertex, v2 : Vertex) {
+ find transition(_, v1, s);
+ find transition(_, v2, s);
+ CompositeElement.regions.vertices(r1, v1);
+ CompositeElement.regions.vertices(r2, v2);
+ r1 != r2;
+} or {
+ find transition(_, s, v1);
+ find transition(_, s, v2);
+ CompositeElement.regions.vertices(r1, v1);
+ CompositeElement.regions.vertices(r2, v2);
+ r1 != r2;
+}
+
+///////////////////////////////
+// Extra
+//
+//@Constraint(severity="error", message="error", key = {s})
+//pattern SynchronizedRegionDoesNotHaveParent(s : Synchronization, v : Vertex) {
+// find transition(_, v, s);
+// neg find child(_,v);
+//} or {
+// find transition(_, s, v);
+// neg find child(_,v);
+//}
+
+pattern child(parent: CompositeElement, child: Vertex) {
+ CompositeElement.regions.vertices(parent, child);
+}
+
+@Constraint(severity="error", message="error", key = {s})
+pattern SynchronizedRegionDoesNotHaveMultipleRegions(s : Synchronization, v : Vertex) {
+ find transition(_, v, s);
+ find child(c,v);
+ neg find hasMultipleRegions(c);
+} or {
+ find transition(_, s, v);
+ find child(c,v);
+ neg find hasMultipleRegions(c);
+}
+
+
+pattern hasMultipleRegions(composite: CompositeElement) {
+ CompositeElement.regions(composite,region1);
+ CompositeElement.regions(composite,region2);
+ region1 != region2;
+}
+
+/**
+ * Simplifying model generation
+ */
+@Constraint(severity="error", message="error", key = {s})
+pattern synchThree(s: Synchronization) {
+ Transition.target(t1,s);
+ Transition.target(t2,s);
+ Transition.target(t3,s);
+ t1!=t2;
+ t2!=t3;
+ t1!=t3;
+} or {
+ Transition.source(t1,s);
+ Transition.source(t2,s);
+ Transition.source(t3,s);
+ t1!=t2;
+ t2!=t3;
+ t1!=t3;
+}
+
+/**
+ * Simplifying model generation
+ */
+@Constraint(severity="error", message="error", key = {s1,s2})
+pattern twoSynch(s1 : Synchronization, s2 : Synchronization) {
+ Synchronization(s1);
+ Synchronization(s2);
+ s1 != s2;
+}
+
+/**
+ * Model generation task: at least one synch
+ */
+//@Constraint(severity="error", message="error", key = {s})
+//pattern noSynch(s:Statechart) {
+// Statechart(s);
+// neg find synch(_);
+//}
+//pattern synch(s:Synchronization) {
+// Synchronization(s);
+//}
\ No newline at end of file
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/.gitignore b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/.gitignore
new file mode 100644
index 00000000..a9786e0f
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/.gitignore
@@ -0,0 +1,13 @@
+/.DirectSupertype.java._trace
+/.Ecore.java._trace
+/.LoopInInheritence.java._trace
+/.NonSymmetricOpposite.java._trace
+/.Opposite.java._trace
+/.OppositeDifferentClass.java._trace
+/.EcorePatterns.java._trace
+/DirectSupertype.java
+/EcorePatterns.java
+/LoopInInheritence.java
+/NonSymmetricOpposite.java
+/Opposite.java
+/OppositeDifferentClass.java
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/.gitignore b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/.gitignore
new file mode 100644
index 00000000..60f1891b
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/.gitignore
@@ -0,0 +1,10 @@
+/.FamPatterns.java._trace
+/.Model.java._trace
+/.Parent.java._trace
+/.RootElements.java._trace
+/.TerminatorAndInformation.java._trace
+/.Type.java._trace
+/FamPatterns.java
+/Model.java
+/Parent.java
+/RootElements.java
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/TerminatorAndInformation.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/TerminatorAndInformation.java
new file mode 100644
index 00000000..69a6b9f4
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/TerminatorAndInformation.java
@@ -0,0 +1,747 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator;
+import ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * {@literal @}Constraint(message="terminatorAndInformation", severity="error", key={T})
+ * pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = {
+ * FunctionalOutput.outgoingLinks(Out,I);
+ * FunctionalOutput.terminator(Out,T);
+ * } or {
+ * InformationLink.to(I,In);
+ * FunctionalInput.terminator(In,T);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class TerminatorAndInformation extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.terminatorAndInformation pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private FAMTerminator fT;
+
+ private InformationLink fI;
+
+ private static List parameterNames = makeImmutableList("T", "I");
+
+ private Match(final FAMTerminator pT, final InformationLink pI) {
+ this.fT = pT;
+ this.fI = pI;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("T".equals(parameterName)) return this.fT;
+ if ("I".equals(parameterName)) return this.fI;
+ return null;
+ }
+
+ public FAMTerminator getT() {
+ return this.fT;
+ }
+
+ public InformationLink getI() {
+ return this.fI;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("T".equals(parameterName) ) {
+ this.fT = (FAMTerminator) newValue;
+ return true;
+ }
+ if ("I".equals(parameterName) ) {
+ this.fI = (InformationLink) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setT(final FAMTerminator pT) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fT = pT;
+ }
+
+ public void setI(final InformationLink pI) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fI = pI;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.terminatorAndInformation";
+ }
+
+ @Override
+ public List parameterNames() {
+ return TerminatorAndInformation.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fT, fI};
+ }
+
+ @Override
+ public TerminatorAndInformation.Match toImmutable() {
+ return isMutable() ? newMatch(fT, fI) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"T\"=" + prettyPrintValue(fT) + ", ");
+ result.append("\"I\"=" + prettyPrintValue(fI));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fT, fI);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof TerminatorAndInformation.Match)) {
+ TerminatorAndInformation.Match other = (TerminatorAndInformation.Match) obj;
+ return Objects.equals(fT, other.fT) && Objects.equals(fI, other.fI);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public TerminatorAndInformation specification() {
+ return TerminatorAndInformation.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static TerminatorAndInformation.Match newEmptyMatch() {
+ return new Mutable(null, null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pT the fixed value of pattern parameter T, or null if not bound.
+ * @param pI the fixed value of pattern parameter I, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static TerminatorAndInformation.Match newMutableMatch(final FAMTerminator pT, final InformationLink pI) {
+ return new Mutable(pT, pI);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pT the fixed value of pattern parameter T, or null if not bound.
+ * @param pI the fixed value of pattern parameter I, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static TerminatorAndInformation.Match newMatch(final FAMTerminator pT, final InformationLink pI) {
+ return new Immutable(pT, pI);
+ }
+
+ private static final class Mutable extends TerminatorAndInformation.Match {
+ Mutable(final FAMTerminator pT, final InformationLink pI) {
+ super(pT, pI);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends TerminatorAndInformation.Match {
+ Immutable(final FAMTerminator pT, final InformationLink pI) {
+ super(pT, pI);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.terminatorAndInformation pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * {@literal @}Constraint(message="terminatorAndInformation", severity="error", key={T})
+ * pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = {
+ * FunctionalOutput.outgoingLinks(Out,I);
+ * FunctionalOutput.terminator(Out,T);
+ * } or {
+ * InformationLink.to(I,In);
+ * FunctionalInput.terminator(In,T);
+ * }
+ *
+ *
+ * @see Match
+ * @see TerminatorAndInformation
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static TerminatorAndInformation.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static TerminatorAndInformation.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_T = 0;
+
+ private final static int POSITION_I = 1;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(TerminatorAndInformation.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pT the fixed value of pattern parameter T, or null if not bound.
+ * @param pI the fixed value of pattern parameter I, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final FAMTerminator pT, final InformationLink pI) {
+ return rawStreamAllMatches(new Object[]{pT, pI}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pT the fixed value of pattern parameter T, or null if not bound.
+ * @param pI the fixed value of pattern parameter I, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final FAMTerminator pT, final InformationLink pI) {
+ return rawStreamAllMatches(new Object[]{pT, pI});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pT the fixed value of pattern parameter T, or null if not bound.
+ * @param pI the fixed value of pattern parameter I, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final FAMTerminator pT, final InformationLink pI) {
+ return rawGetOneArbitraryMatch(new Object[]{pT, pI});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pT the fixed value of pattern parameter T, or null if not bound.
+ * @param pI the fixed value of pattern parameter I, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final FAMTerminator pT, final InformationLink pI) {
+ return rawHasMatch(new Object[]{pT, pI});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pT the fixed value of pattern parameter T, or null if not bound.
+ * @param pI the fixed value of pattern parameter I, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final FAMTerminator pT, final InformationLink pI) {
+ return rawCountMatches(new Object[]{pT, pI});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pT the fixed value of pattern parameter T, or null if not bound.
+ * @param pI the fixed value of pattern parameter I, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final FAMTerminator pT, final InformationLink pI, final Consumer super TerminatorAndInformation.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pT, pI}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pT the fixed value of pattern parameter T, or null if not bound.
+ * @param pI the fixed value of pattern parameter I, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public TerminatorAndInformation.Match newMatch(final FAMTerminator pT, final InformationLink pI) {
+ return TerminatorAndInformation.Match.newMatch(pT, pI);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for T.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfT(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_T, parameters).map(FAMTerminator.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for T.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfT() {
+ return rawStreamAllValuesOfT(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for T.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfT() {
+ return rawStreamAllValuesOfT(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for T.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfT(final TerminatorAndInformation.Match partialMatch) {
+ return rawStreamAllValuesOfT(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for T.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfT(final InformationLink pI) {
+ return rawStreamAllValuesOfT(new Object[]{null, pI});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for T.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfT(final TerminatorAndInformation.Match partialMatch) {
+ return rawStreamAllValuesOfT(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for T.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfT(final InformationLink pI) {
+ return rawStreamAllValuesOfT(new Object[]{null, pI}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for I.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfI(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_I, parameters).map(InformationLink.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for I.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfI() {
+ return rawStreamAllValuesOfI(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for I.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfI() {
+ return rawStreamAllValuesOfI(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for I.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfI(final TerminatorAndInformation.Match partialMatch) {
+ return rawStreamAllValuesOfI(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for I.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfI(final FAMTerminator pT) {
+ return rawStreamAllValuesOfI(new Object[]{pT, null});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for I.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfI(final TerminatorAndInformation.Match partialMatch) {
+ return rawStreamAllValuesOfI(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for I.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfI(final FAMTerminator pT) {
+ return rawStreamAllValuesOfI(new Object[]{pT, null}).collect(Collectors.toSet());
+ }
+
+ @Override
+ protected TerminatorAndInformation.Match tupleToMatch(final Tuple t) {
+ try {
+ return TerminatorAndInformation.Match.newMatch((FAMTerminator) t.get(POSITION_T), (InformationLink) t.get(POSITION_I));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected TerminatorAndInformation.Match arrayToMatch(final Object[] match) {
+ try {
+ return TerminatorAndInformation.Match.newMatch((FAMTerminator) match[POSITION_T], (InformationLink) match[POSITION_I]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected TerminatorAndInformation.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return TerminatorAndInformation.Match.newMutableMatch((FAMTerminator) match[POSITION_T], (InformationLink) match[POSITION_I]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return TerminatorAndInformation.instance();
+ }
+ }
+
+ private TerminatorAndInformation() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static TerminatorAndInformation instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected TerminatorAndInformation.Matcher instantiate(final ViatraQueryEngine engine) {
+ return TerminatorAndInformation.Matcher.on(engine);
+ }
+
+ @Override
+ public TerminatorAndInformation.Matcher instantiate() {
+ return TerminatorAndInformation.Matcher.create();
+ }
+
+ @Override
+ public TerminatorAndInformation.Match newEmptyMatch() {
+ return TerminatorAndInformation.Match.newEmptyMatch();
+ }
+
+ @Override
+ public TerminatorAndInformation.Match newMatch(final Object... parameters) {
+ return TerminatorAndInformation.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator) parameters[0], (ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink) parameters[1]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.TerminatorAndInformation (visibility: PUBLIC, simpleName: TerminatorAndInformation, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.TerminatorAndInformation, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.TerminatorAndInformation (visibility: PUBLIC, simpleName: TerminatorAndInformation, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.TerminatorAndInformation, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static TerminatorAndInformation INSTANCE = new TerminatorAndInformation();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static TerminatorAndInformation.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_T = new PParameter("T", "ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("FamMetamodel", "FAMTerminator")), PParameterDirection.INOUT);
+
+ private final PParameter parameter_I = new PParameter("I", "ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("FamMetamodel", "InformationLink")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_T, parameter_I);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.terminatorAndInformation";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("T","I");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_T = body.getOrCreateVariableByName("T");
+ PVariable var_I = body.getOrCreateVariableByName("I");
+ PVariable var_Out = body.getOrCreateVariableByName("Out");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "FAMTerminator")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_I), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "InformationLink")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_T, parameter_T),
+ new ExportedParameter(body, var_I, parameter_I)
+ ));
+ // FunctionalOutput.outgoingLinks(Out,I)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_Out), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "FunctionalOutput")));
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_Out, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("FamMetamodel", "FunctionalOutput", "outgoingLinks")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "InformationLink")));
+ new Equality(body, var__virtual_0_, var_I);
+ // FunctionalOutput.terminator(Out,T)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_Out), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "FunctionalOutput")));
+ PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_Out, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("FamMetamodel", "FunctionalData", "terminator")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "FAMTerminator")));
+ new Equality(body, var__virtual_1_, var_T);
+ bodies.add(body);
+ }
+ {
+ PBody body = new PBody(this);
+ PVariable var_T = body.getOrCreateVariableByName("T");
+ PVariable var_I = body.getOrCreateVariableByName("I");
+ PVariable var_In = body.getOrCreateVariableByName("In");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_T), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "FAMTerminator")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_I), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "InformationLink")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_T, parameter_T),
+ new ExportedParameter(body, var_I, parameter_I)
+ ));
+ // InformationLink.to(I,In)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_I), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "InformationLink")));
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_I, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("FamMetamodel", "InformationLink", "to")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "FunctionalInput")));
+ new Equality(body, var__virtual_0_, var_In);
+ // FunctionalInput.terminator(In,T)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_In), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "FunctionalInput")));
+ PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_In, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("FamMetamodel", "FunctionalData", "terminator")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "FAMTerminator")));
+ new Equality(body, var__virtual_1_, var_T);
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("message", "terminatorAndInformation");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("T")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/Type.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/Type.java
new file mode 100644
index 00000000..bc3230c5
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/Type.java
@@ -0,0 +1,770 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function;
+import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType;
+import ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.Parent;
+import ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.RootElements;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * {@literal @}QueryBasedFeature
+ * pattern type(This : Function, Target : FunctionType) = {
+ * find rootElements(_Model, This);
+ * Target == FunctionType::Root;
+ * } or {
+ * neg find parent(_Child, This);
+ * neg find rootElements(_Model, This);
+ * Target == FunctionType::Leaf;
+ * } or {
+ * find parent(This, _Par);
+ * find parent(_Child, This);
+ * Target == FunctionType::Intermediate;
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class Type extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Function fThis;
+
+ private FunctionType fTarget;
+
+ private static List parameterNames = makeImmutableList("This", "Target");
+
+ private Match(final Function pThis, final FunctionType pTarget) {
+ this.fThis = pThis;
+ this.fTarget = pTarget;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("This".equals(parameterName)) return this.fThis;
+ if ("Target".equals(parameterName)) return this.fTarget;
+ return null;
+ }
+
+ public Function getThis() {
+ return this.fThis;
+ }
+
+ public FunctionType getTarget() {
+ return this.fTarget;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("This".equals(parameterName) ) {
+ this.fThis = (Function) newValue;
+ return true;
+ }
+ if ("Target".equals(parameterName) ) {
+ this.fTarget = (FunctionType) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setThis(final Function pThis) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fThis = pThis;
+ }
+
+ public void setTarget(final FunctionType pTarget) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fTarget = pTarget;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type";
+ }
+
+ @Override
+ public List parameterNames() {
+ return Type.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fThis, fTarget};
+ }
+
+ @Override
+ public Type.Match toImmutable() {
+ return isMutable() ? newMatch(fThis, fTarget) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"This\"=" + prettyPrintValue(fThis) + ", ");
+ result.append("\"Target\"=" + prettyPrintValue(fTarget));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fThis, fTarget);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof Type.Match)) {
+ Type.Match other = (Type.Match) obj;
+ return Objects.equals(fThis, other.fThis) && Objects.equals(fTarget, other.fTarget);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public Type specification() {
+ return Type.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static Type.Match newEmptyMatch() {
+ return new Mutable(null, null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pThis the fixed value of pattern parameter This, or null if not bound.
+ * @param pTarget the fixed value of pattern parameter Target, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static Type.Match newMutableMatch(final Function pThis, final FunctionType pTarget) {
+ return new Mutable(pThis, pTarget);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pThis the fixed value of pattern parameter This, or null if not bound.
+ * @param pTarget the fixed value of pattern parameter Target, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static Type.Match newMatch(final Function pThis, final FunctionType pTarget) {
+ return new Immutable(pThis, pTarget);
+ }
+
+ private static final class Mutable extends Type.Match {
+ Mutable(final Function pThis, final FunctionType pTarget) {
+ super(pThis, pTarget);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends Type.Match {
+ Immutable(final Function pThis, final FunctionType pTarget) {
+ super(pThis, pTarget);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * {@literal @}QueryBasedFeature
+ * pattern type(This : Function, Target : FunctionType) = {
+ * find rootElements(_Model, This);
+ * Target == FunctionType::Root;
+ * } or {
+ * neg find parent(_Child, This);
+ * neg find rootElements(_Model, This);
+ * Target == FunctionType::Leaf;
+ * } or {
+ * find parent(This, _Par);
+ * find parent(_Child, This);
+ * Target == FunctionType::Intermediate;
+ * }
+ *
+ *
+ * @see Match
+ * @see Type
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static Type.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static Type.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_THIS = 0;
+
+ private final static int POSITION_TARGET = 1;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(Type.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pThis the fixed value of pattern parameter This, or null if not bound.
+ * @param pTarget the fixed value of pattern parameter Target, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Function pThis, final FunctionType pTarget) {
+ return rawStreamAllMatches(new Object[]{pThis, pTarget}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pThis the fixed value of pattern parameter This, or null if not bound.
+ * @param pTarget the fixed value of pattern parameter Target, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Function pThis, final FunctionType pTarget) {
+ return rawStreamAllMatches(new Object[]{pThis, pTarget});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pThis the fixed value of pattern parameter This, or null if not bound.
+ * @param pTarget the fixed value of pattern parameter Target, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Function pThis, final FunctionType pTarget) {
+ return rawGetOneArbitraryMatch(new Object[]{pThis, pTarget});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pThis the fixed value of pattern parameter This, or null if not bound.
+ * @param pTarget the fixed value of pattern parameter Target, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Function pThis, final FunctionType pTarget) {
+ return rawHasMatch(new Object[]{pThis, pTarget});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pThis the fixed value of pattern parameter This, or null if not bound.
+ * @param pTarget the fixed value of pattern parameter Target, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Function pThis, final FunctionType pTarget) {
+ return rawCountMatches(new Object[]{pThis, pTarget});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pThis the fixed value of pattern parameter This, or null if not bound.
+ * @param pTarget the fixed value of pattern parameter Target, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Function pThis, final FunctionType pTarget, final Consumer super Type.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pThis, pTarget}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pThis the fixed value of pattern parameter This, or null if not bound.
+ * @param pTarget the fixed value of pattern parameter Target, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public Type.Match newMatch(final Function pThis, final FunctionType pTarget) {
+ return Type.Match.newMatch(pThis, pTarget);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for This.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfThis(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_THIS, parameters).map(Function.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for This.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfThis() {
+ return rawStreamAllValuesOfThis(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for This.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfThis() {
+ return rawStreamAllValuesOfThis(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for This.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfThis(final Type.Match partialMatch) {
+ return rawStreamAllValuesOfThis(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for This.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfThis(final FunctionType pTarget) {
+ return rawStreamAllValuesOfThis(new Object[]{null, pTarget});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for This.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfThis(final Type.Match partialMatch) {
+ return rawStreamAllValuesOfThis(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for This.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfThis(final FunctionType pTarget) {
+ return rawStreamAllValuesOfThis(new Object[]{null, pTarget}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for Target.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfTarget(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_TARGET, parameters).map(FunctionType.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for Target.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfTarget() {
+ return rawStreamAllValuesOfTarget(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for Target.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfTarget() {
+ return rawStreamAllValuesOfTarget(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for Target.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfTarget(final Type.Match partialMatch) {
+ return rawStreamAllValuesOfTarget(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for Target.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfTarget(final Function pThis) {
+ return rawStreamAllValuesOfTarget(new Object[]{pThis, null});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for Target.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfTarget(final Type.Match partialMatch) {
+ return rawStreamAllValuesOfTarget(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for Target.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfTarget(final Function pThis) {
+ return rawStreamAllValuesOfTarget(new Object[]{pThis, null}).collect(Collectors.toSet());
+ }
+
+ @Override
+ protected Type.Match tupleToMatch(final Tuple t) {
+ try {
+ return Type.Match.newMatch((Function) t.get(POSITION_THIS), (FunctionType) t.get(POSITION_TARGET));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected Type.Match arrayToMatch(final Object[] match) {
+ try {
+ return Type.Match.newMatch((Function) match[POSITION_THIS], (FunctionType) match[POSITION_TARGET]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected Type.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return Type.Match.newMutableMatch((Function) match[POSITION_THIS], (FunctionType) match[POSITION_TARGET]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return Type.instance();
+ }
+ }
+
+ private Type() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static Type instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected Type.Matcher instantiate(final ViatraQueryEngine engine) {
+ return Type.Matcher.on(engine);
+ }
+
+ @Override
+ public Type.Matcher instantiate() {
+ return Type.Matcher.create();
+ }
+
+ @Override
+ public Type.Match newEmptyMatch() {
+ return Type.Match.newEmptyMatch();
+ }
+
+ @Override
+ public Type.Match newMatch(final Object... parameters) {
+ return Type.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function) parameters[0], (ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType) parameters[1]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.Type (visibility: PUBLIC, simpleName: Type, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.Type, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.Type (visibility: PUBLIC, simpleName: Type, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.Type, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static Type INSTANCE = new Type();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static Type.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_This = new PParameter("This", "ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("FamMetamodel", "Function")), PParameterDirection.INOUT);
+
+ private final PParameter parameter_Target = new PParameter("Target", "ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("FamMetamodel", "FunctionType")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_This, parameter_Target);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.type";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("This","Target");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_This = body.getOrCreateVariableByName("This");
+ PVariable var_Target = body.getOrCreateVariableByName("Target");
+ PVariable var__Model = body.getOrCreateVariableByName("_Model");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_This), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "Function")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("FamMetamodel", "FunctionType")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_This, parameter_This),
+ new ExportedParameter(body, var_Target, parameter_Target)
+ ));
+ // find rootElements(_Model, This)
+ new PositivePatternCall(body, Tuples.flatTupleOf(var__Model, var_This), RootElements.instance().getInternalQueryRepresentation());
+ // Target == FunctionType::Root
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new ConstantValue(body, var__virtual_0_, getEnumLiteral("FamMetamodel", "FunctionType", "Root").getInstance());
+ new Equality(body, var_Target, var__virtual_0_);
+ bodies.add(body);
+ }
+ {
+ PBody body = new PBody(this);
+ PVariable var_This = body.getOrCreateVariableByName("This");
+ PVariable var_Target = body.getOrCreateVariableByName("Target");
+ PVariable var__Child = body.getOrCreateVariableByName("_Child");
+ PVariable var__Model = body.getOrCreateVariableByName("_Model");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_This), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "Function")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("FamMetamodel", "FunctionType")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_This, parameter_This),
+ new ExportedParameter(body, var_Target, parameter_Target)
+ ));
+ // neg find parent(_Child, This)
+ new NegativePatternCall(body, Tuples.flatTupleOf(var__Child, var_This), Parent.instance().getInternalQueryRepresentation());
+ // neg find rootElements(_Model, This)
+ new NegativePatternCall(body, Tuples.flatTupleOf(var__Model, var_This), RootElements.instance().getInternalQueryRepresentation());
+ // Target == FunctionType::Leaf
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new ConstantValue(body, var__virtual_0_, getEnumLiteral("FamMetamodel", "FunctionType", "Leaf").getInstance());
+ new Equality(body, var_Target, var__virtual_0_);
+ bodies.add(body);
+ }
+ {
+ PBody body = new PBody(this);
+ PVariable var_This = body.getOrCreateVariableByName("This");
+ PVariable var_Target = body.getOrCreateVariableByName("Target");
+ PVariable var__Par = body.getOrCreateVariableByName("_Par");
+ PVariable var__Child = body.getOrCreateVariableByName("_Child");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_This), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("FamMetamodel", "Function")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("FamMetamodel", "FunctionType")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_This, parameter_This),
+ new ExportedParameter(body, var_Target, parameter_Target)
+ ));
+ // find parent(This, _Par)
+ new PositivePatternCall(body, Tuples.flatTupleOf(var_This, var__Par), Parent.instance().getInternalQueryRepresentation());
+ // find parent(_Child, This)
+ new PositivePatternCall(body, Tuples.flatTupleOf(var__Child, var_This), Parent.instance().getInternalQueryRepresentation());
+ // Target == FunctionType::Intermediate
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new ConstantValue(body, var__virtual_0_, getEnumLiteral("FamMetamodel", "FunctionType", "Intermediate").getInstance());
+ new Equality(body, var_Target, var__virtual_0_);
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("QueryBasedFeature");
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/.gitignore b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/.gitignore
new file mode 100644
index 00000000..dcc36d34
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/.gitignore
@@ -0,0 +1,9 @@
+/.ContentInNotLive.java._trace
+/.FileSystem.java._trace
+/.Live.java._trace
+/.PatternContent.java._trace
+/.FileSystemPatterns.java._trace
+/PatternContent.java
+/ContentInNotLive.java
+/FileSystemPatterns.java
+/Live.java
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/.gitignore b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/.gitignore
new file mode 100644
index 00000000..96fd178f
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/.gitignore
@@ -0,0 +1,158 @@
+/.EntryInRegion_M0.java._trace
+/.EntryInRegion_M1.java._trace
+/.EntryInRegion_M2.java._trace
+/.MultipleEntryInRegion_M0.java._trace
+/.MultipleEntryInRegion_M1.java._trace
+/.MultipleEntryInRegion_M2.java._trace
+/.NoEntryInRegion_M0.java._trace
+/.NoEntryInRegion_M1.java._trace
+/.NoEntryInRegion_M2.java._trace
+/.NoEntryInRegion_M3.java._trace
+/.NoEntryInRegion_M4.java._trace
+/.NoEntryInRegion_M5.java._trace
+/.MultipleEntryInRegion_M3.java._trace
+/.EntryInRegion.java._trace
+/.MultipleEntryInRegion.java._trace
+/.NoEntryInRegion.java._trace
+/.Transition.java._trace
+/.Child.java._trace
+/.ChoiceHasNoIncoming.java._trace
+/.ChoiceHasNoOutgoing.java._trace
+/.HasMultipleIncomingTrainsition.java._trace
+/.HasMultipleOutgoingTrainsition.java._trace
+/.HasMultipleRegions.java._trace
+/.IncomingToEntry.java._trace
+/.MultipleTransitionFromEntry.java._trace
+/.NoOutgoingTransitionFromEntry.java._trace
+/.NoStateInRegion.java._trace
+/.NotSynchronizingStates.java._trace
+/.OutgoingFromExit.java._trace
+/.OutgoingFromFinal.java._trace
+/.StateInRegion.java._trace
+/.SynchHasNoIncoming.java._trace
+/.SynchHasNoOutgoing.java._trace
+/.SynchThree.java._trace
+/.SynchronizedIncomingInSameRegion.java._trace
+/.SynchronizedRegionDoesNotHaveMultipleRegions.java._trace
+/.SynchronizedRegionsAreNotSiblings.java._trace
+/.TwoSynch.java._trace
+/.YakinduPatterns.java._trace
+/.ChoiceHasNoIncoming_M0.java._trace
+/.ChoiceHasNoIncoming_M1.java._trace
+/.ChoiceHasNoIncoming_M2.java._trace
+/.ChoiceHasNoIncoming_M3.java._trace
+/.ChoiceHasNoIncoming_M4.java._trace
+/.ChoiceHasNoIncoming_M5.java._trace
+/.ChoiceHasNoIncoming_M6.java._trace
+/.ChoiceHasNoOutgoing_M0.java._trace
+/.ChoiceHasNoOutgoing_M1.java._trace
+/.ChoiceHasNoOutgoing_M2.java._trace
+/.ChoiceHasNoOutgoing_M3.java._trace
+/.ChoiceHasNoOutgoing_M4.java._trace
+/.ChoiceHasNoOutgoing_M5.java._trace
+/.ChoiceHasNoOutgoing_M6.java._trace
+/.IncomingToEntry_1.java._trace
+/.IncomingToEntry_2.java._trace
+/.IncomingToEntry_3.java._trace
+/.IncomingToEntry_4.java._trace
+/.IncomingToEntry_5.java._trace
+/.IncomingToEntry_M0.java._trace
+/.MultipleEntryInRegion_M4.java._trace
+/.MultipleEntryInRegion_M5.java._trace
+/.MultipleTransitionFromEntry_M0.java._trace
+/.MultipleTransitionFromEntry_M1.java._trace
+/.MultipleTransitionFromEntry_M2.java._trace
+/.MultipleTransitionFromEntry_M3.java._trace
+/.MultipleTransitionFromEntry_M4.java._trace
+/.NoOutgoingTransitionFromEntry_M0.java._trace
+/.NoOutgoingTransitionFromEntry_M1.java._trace
+/.NoOutgoingTransitionFromEntry_M2.java._trace
+/.NoOutgoingTransitionFromEntry_M3.java._trace
+/.NoOutgoingTransitionFromEntry_M4.java._trace
+/.NoOutgoingTransitionFromEntry_M5.java._trace
+/.NoStateInRegion_M0.java._trace
+/.NoStateInRegion_M1.java._trace
+/.NoStateInRegion_M2.java._trace
+/.NoStateInRegion_M3.java._trace
+/.OutgoingFromExit_M0.java._trace
+/.OutgoingFromExit_M1.java._trace
+/.OutgoingFromExit_M2.java._trace
+/.OutgoingFromFinal_M0.java._trace
+/.OutgoingFromFinal_M1.java._trace
+/.OutgoingFromFinal_M2.java._trace
+/.StateInRegion_M0.java._trace
+/.StateInRegion_M1.java._trace
+/.StateInRegion_M2.java._trace
+/.Transition_M0.java._trace
+/.Transition_M1.java._trace
+/.Transition_M2.java._trace
+/.Transition_M3.java._trace
+/.Transition_M4.java._trace
+/.YakinduMutatedPatterns.java._trace
+/YakinduPatterns.java
+/MultipleEntryInRegion.java
+/ChoiceHasNoIncoming_M0.java
+/ChoiceHasNoIncoming_M1.java
+/ChoiceHasNoIncoming_M2.java
+/ChoiceHasNoIncoming_M3.java
+/ChoiceHasNoIncoming_M4.java
+/ChoiceHasNoIncoming_M5.java
+/ChoiceHasNoIncoming_M6.java
+/ChoiceHasNoOutgoing_M0.java
+/ChoiceHasNoOutgoing_M1.java
+/ChoiceHasNoOutgoing_M2.java
+/ChoiceHasNoOutgoing_M3.java
+/ChoiceHasNoOutgoing_M4.java
+/ChoiceHasNoOutgoing_M5.java
+/ChoiceHasNoOutgoing_M6.java
+/EntryInRegion_M0.java
+/EntryInRegion_M1.java
+/EntryInRegion_M2.java
+/IncomingToEntry_1.java
+/IncomingToEntry_2.java
+/IncomingToEntry_3.java
+/IncomingToEntry_4.java
+/IncomingToEntry_5.java
+/IncomingToEntry_M0.java
+/MultipleEntryInRegion_M0.java
+/MultipleEntryInRegion_M1.java
+/MultipleEntryInRegion_M2.java
+/MultipleEntryInRegion_M3.java
+/MultipleEntryInRegion_M4.java
+/MultipleEntryInRegion_M5.java
+/MultipleTransitionFromEntry_M0.java
+/MultipleTransitionFromEntry_M1.java
+/MultipleTransitionFromEntry_M2.java
+/MultipleTransitionFromEntry_M3.java
+/MultipleTransitionFromEntry_M4.java
+/NoEntryInRegion_M0.java
+/NoEntryInRegion_M1.java
+/NoEntryInRegion_M2.java
+/NoEntryInRegion_M3.java
+/NoEntryInRegion_M4.java
+/NoEntryInRegion_M5.java
+/NoOutgoingTransitionFromEntry_M0.java
+/NoOutgoingTransitionFromEntry_M1.java
+/NoOutgoingTransitionFromEntry_M2.java
+/NoOutgoingTransitionFromEntry_M3.java
+/NoOutgoingTransitionFromEntry_M4.java
+/NoOutgoingTransitionFromEntry_M5.java
+/NoStateInRegion_M0.java
+/NoStateInRegion_M1.java
+/NoStateInRegion_M2.java
+/NoStateInRegion_M3.java
+/OutgoingFromExit_M0.java
+/OutgoingFromExit_M1.java
+/OutgoingFromExit_M2.java
+/OutgoingFromFinal_M0.java
+/OutgoingFromFinal_M1.java
+/OutgoingFromFinal_M2.java
+/StateInRegion_M0.java
+/StateInRegion_M1.java
+/StateInRegion_M2.java
+/Transition_M0.java
+/Transition_M1.java
+/Transition_M2.java
+/Transition_M3.java
+/Transition_M4.java
+/YakinduMutatedPatterns.java
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/Child.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/Child.java
new file mode 100644
index 00000000..9867c1ee
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/Child.java
@@ -0,0 +1,721 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * ///////////////////////////////
+ * // Extra
+ * //
+ * //{@literal @}Constraint(severity="error", message="error", key = {s})
+ * //pattern SynchronizedRegionDoesNotHaveParent(s : Synchronization, v : Vertex) {
+ * // find transition(_, v, s);
+ * // neg find child(_,v);
+ * //} or {
+ * // find transition(_, s, v);
+ * // neg find child(_,v);
+ * //}
+ *
+ * pattern child(parent: CompositeElement, child: Vertex) {
+ * CompositeElement.regions.vertices(parent, child);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class Child extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.child pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private CompositeElement fParent;
+
+ private Vertex fChild;
+
+ private static List parameterNames = makeImmutableList("parent", "child");
+
+ private Match(final CompositeElement pParent, final Vertex pChild) {
+ this.fParent = pParent;
+ this.fChild = pChild;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("parent".equals(parameterName)) return this.fParent;
+ if ("child".equals(parameterName)) return this.fChild;
+ return null;
+ }
+
+ public CompositeElement getParent() {
+ return this.fParent;
+ }
+
+ public Vertex getChild() {
+ return this.fChild;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("parent".equals(parameterName) ) {
+ this.fParent = (CompositeElement) newValue;
+ return true;
+ }
+ if ("child".equals(parameterName) ) {
+ this.fChild = (Vertex) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setParent(final CompositeElement pParent) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fParent = pParent;
+ }
+
+ public void setChild(final Vertex pChild) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fChild = pChild;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.child";
+ }
+
+ @Override
+ public List parameterNames() {
+ return Child.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fParent, fChild};
+ }
+
+ @Override
+ public Child.Match toImmutable() {
+ return isMutable() ? newMatch(fParent, fChild) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"parent\"=" + prettyPrintValue(fParent) + ", ");
+ result.append("\"child\"=" + prettyPrintValue(fChild));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fParent, fChild);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof Child.Match)) {
+ Child.Match other = (Child.Match) obj;
+ return Objects.equals(fParent, other.fParent) && Objects.equals(fChild, other.fChild);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public Child specification() {
+ return Child.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static Child.Match newEmptyMatch() {
+ return new Mutable(null, null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pParent the fixed value of pattern parameter parent, or null if not bound.
+ * @param pChild the fixed value of pattern parameter child, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static Child.Match newMutableMatch(final CompositeElement pParent, final Vertex pChild) {
+ return new Mutable(pParent, pChild);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pParent the fixed value of pattern parameter parent, or null if not bound.
+ * @param pChild the fixed value of pattern parameter child, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static Child.Match newMatch(final CompositeElement pParent, final Vertex pChild) {
+ return new Immutable(pParent, pChild);
+ }
+
+ private static final class Mutable extends Child.Match {
+ Mutable(final CompositeElement pParent, final Vertex pChild) {
+ super(pParent, pChild);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends Child.Match {
+ Immutable(final CompositeElement pParent, final Vertex pChild) {
+ super(pParent, pChild);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.child pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * ///////////////////////////////
+ * // Extra
+ * //
+ * //{@literal @}Constraint(severity="error", message="error", key = {s})
+ * //pattern SynchronizedRegionDoesNotHaveParent(s : Synchronization, v : Vertex) {
+ * // find transition(_, v, s);
+ * // neg find child(_,v);
+ * //} or {
+ * // find transition(_, s, v);
+ * // neg find child(_,v);
+ * //}
+ *
+ * pattern child(parent: CompositeElement, child: Vertex) {
+ * CompositeElement.regions.vertices(parent, child);
+ * }
+ *
+ *
+ * @see Match
+ * @see Child
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static Child.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static Child.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_PARENT = 0;
+
+ private final static int POSITION_CHILD = 1;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(Child.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pParent the fixed value of pattern parameter parent, or null if not bound.
+ * @param pChild the fixed value of pattern parameter child, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final CompositeElement pParent, final Vertex pChild) {
+ return rawStreamAllMatches(new Object[]{pParent, pChild}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pParent the fixed value of pattern parameter parent, or null if not bound.
+ * @param pChild the fixed value of pattern parameter child, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final CompositeElement pParent, final Vertex pChild) {
+ return rawStreamAllMatches(new Object[]{pParent, pChild});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pParent the fixed value of pattern parameter parent, or null if not bound.
+ * @param pChild the fixed value of pattern parameter child, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final CompositeElement pParent, final Vertex pChild) {
+ return rawGetOneArbitraryMatch(new Object[]{pParent, pChild});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pParent the fixed value of pattern parameter parent, or null if not bound.
+ * @param pChild the fixed value of pattern parameter child, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final CompositeElement pParent, final Vertex pChild) {
+ return rawHasMatch(new Object[]{pParent, pChild});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pParent the fixed value of pattern parameter parent, or null if not bound.
+ * @param pChild the fixed value of pattern parameter child, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final CompositeElement pParent, final Vertex pChild) {
+ return rawCountMatches(new Object[]{pParent, pChild});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pParent the fixed value of pattern parameter parent, or null if not bound.
+ * @param pChild the fixed value of pattern parameter child, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final CompositeElement pParent, final Vertex pChild, final Consumer super Child.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pParent, pChild}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pParent the fixed value of pattern parameter parent, or null if not bound.
+ * @param pChild the fixed value of pattern parameter child, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public Child.Match newMatch(final CompositeElement pParent, final Vertex pChild) {
+ return Child.Match.newMatch(pParent, pChild);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for parent.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfparent(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_PARENT, parameters).map(CompositeElement.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for parent.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfparent() {
+ return rawStreamAllValuesOfparent(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for parent.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfparent() {
+ return rawStreamAllValuesOfparent(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for parent.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfparent(final Child.Match partialMatch) {
+ return rawStreamAllValuesOfparent(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for parent.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfparent(final Vertex pChild) {
+ return rawStreamAllValuesOfparent(new Object[]{null, pChild});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for parent.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfparent(final Child.Match partialMatch) {
+ return rawStreamAllValuesOfparent(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for parent.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfparent(final Vertex pChild) {
+ return rawStreamAllValuesOfparent(new Object[]{null, pChild}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for child.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfchild(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_CHILD, parameters).map(Vertex.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for child.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfchild() {
+ return rawStreamAllValuesOfchild(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for child.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfchild() {
+ return rawStreamAllValuesOfchild(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for child.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfchild(final Child.Match partialMatch) {
+ return rawStreamAllValuesOfchild(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for child.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfchild(final CompositeElement pParent) {
+ return rawStreamAllValuesOfchild(new Object[]{pParent, null});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for child.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfchild(final Child.Match partialMatch) {
+ return rawStreamAllValuesOfchild(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for child.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfchild(final CompositeElement pParent) {
+ return rawStreamAllValuesOfchild(new Object[]{pParent, null}).collect(Collectors.toSet());
+ }
+
+ @Override
+ protected Child.Match tupleToMatch(final Tuple t) {
+ try {
+ return Child.Match.newMatch((CompositeElement) t.get(POSITION_PARENT), (Vertex) t.get(POSITION_CHILD));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected Child.Match arrayToMatch(final Object[] match) {
+ try {
+ return Child.Match.newMatch((CompositeElement) match[POSITION_PARENT], (Vertex) match[POSITION_CHILD]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected Child.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return Child.Match.newMutableMatch((CompositeElement) match[POSITION_PARENT], (Vertex) match[POSITION_CHILD]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return Child.instance();
+ }
+ }
+
+ private Child() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static Child instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected Child.Matcher instantiate(final ViatraQueryEngine engine) {
+ return Child.Matcher.on(engine);
+ }
+
+ @Override
+ public Child.Matcher instantiate() {
+ return Child.Matcher.create();
+ }
+
+ @Override
+ public Child.Match newEmptyMatch() {
+ return Child.Match.newEmptyMatch();
+ }
+
+ @Override
+ public Child.Match newMatch(final Object... parameters) {
+ return Child.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement) parameters[0], (ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex) parameters[1]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Child (visibility: PUBLIC, simpleName: Child, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Child, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Child (visibility: PUBLIC, simpleName: Child, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Child, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static Child INSTANCE = new Child();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static Child.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_parent = new PParameter("parent", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "CompositeElement")), PParameterDirection.INOUT);
+
+ private final PParameter parameter_child = new PParameter("child", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Vertex")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_parent, parameter_child);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.child";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("parent","child");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_parent = body.getOrCreateVariableByName("parent");
+ PVariable var_child = body.getOrCreateVariableByName("child");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_parent), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "CompositeElement")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_child), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Vertex")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_parent, parameter_parent),
+ new ExportedParameter(body, var_child, parameter_child)
+ ));
+ // CompositeElement.regions.vertices(parent, child)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_parent), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "CompositeElement")));
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_parent, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("YakinduMetamodel", "CompositeElement", "regions")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Region")));
+ PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("YakinduMetamodel", "Region", "vertices")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Vertex")));
+ new Equality(body, var__virtual_1_, var_child);
+ bodies.add(body);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/ChoiceHasNoIncoming.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/ChoiceHasNoIncoming.java
new file mode 100644
index 00000000..8e62ee9d
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/ChoiceHasNoIncoming.java
@@ -0,0 +1,551 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {c})
+ * pattern choiceHasNoIncoming(c: Choice) {
+ * neg find transition(_, _, c);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class ChoiceHasNoIncoming extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.choiceHasNoIncoming pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Choice fC;
+
+ private static List parameterNames = makeImmutableList("c");
+
+ private Match(final Choice pC) {
+ this.fC = pC;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("c".equals(parameterName)) return this.fC;
+ return null;
+ }
+
+ public Choice getC() {
+ return this.fC;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("c".equals(parameterName) ) {
+ this.fC = (Choice) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setC(final Choice pC) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fC = pC;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.choiceHasNoIncoming";
+ }
+
+ @Override
+ public List parameterNames() {
+ return ChoiceHasNoIncoming.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fC};
+ }
+
+ @Override
+ public ChoiceHasNoIncoming.Match toImmutable() {
+ return isMutable() ? newMatch(fC) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"c\"=" + prettyPrintValue(fC));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fC);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof ChoiceHasNoIncoming.Match)) {
+ ChoiceHasNoIncoming.Match other = (ChoiceHasNoIncoming.Match) obj;
+ return Objects.equals(fC, other.fC);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public ChoiceHasNoIncoming specification() {
+ return ChoiceHasNoIncoming.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static ChoiceHasNoIncoming.Match newEmptyMatch() {
+ return new Mutable(null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static ChoiceHasNoIncoming.Match newMutableMatch(final Choice pC) {
+ return new Mutable(pC);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static ChoiceHasNoIncoming.Match newMatch(final Choice pC) {
+ return new Immutable(pC);
+ }
+
+ private static final class Mutable extends ChoiceHasNoIncoming.Match {
+ Mutable(final Choice pC) {
+ super(pC);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends ChoiceHasNoIncoming.Match {
+ Immutable(final Choice pC) {
+ super(pC);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.choiceHasNoIncoming pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {c})
+ * pattern choiceHasNoIncoming(c: Choice) {
+ * neg find transition(_, _, c);
+ * }
+ *
+ *
+ * @see Match
+ * @see ChoiceHasNoIncoming
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static ChoiceHasNoIncoming.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static ChoiceHasNoIncoming.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_C = 0;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(ChoiceHasNoIncoming.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Choice pC) {
+ return rawStreamAllMatches(new Object[]{pC}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Choice pC) {
+ return rawStreamAllMatches(new Object[]{pC});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Choice pC) {
+ return rawGetOneArbitraryMatch(new Object[]{pC});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Choice pC) {
+ return rawHasMatch(new Object[]{pC});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Choice pC) {
+ return rawCountMatches(new Object[]{pC});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Choice pC, final Consumer super ChoiceHasNoIncoming.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pC}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public ChoiceHasNoIncoming.Match newMatch(final Choice pC) {
+ return ChoiceHasNoIncoming.Match.newMatch(pC);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for c.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfc(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_C, parameters).map(Choice.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for c.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfc() {
+ return rawStreamAllValuesOfc(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for c.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfc() {
+ return rawStreamAllValuesOfc(emptyArray());
+ }
+
+ @Override
+ protected ChoiceHasNoIncoming.Match tupleToMatch(final Tuple t) {
+ try {
+ return ChoiceHasNoIncoming.Match.newMatch((Choice) t.get(POSITION_C));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected ChoiceHasNoIncoming.Match arrayToMatch(final Object[] match) {
+ try {
+ return ChoiceHasNoIncoming.Match.newMatch((Choice) match[POSITION_C]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected ChoiceHasNoIncoming.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return ChoiceHasNoIncoming.Match.newMutableMatch((Choice) match[POSITION_C]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return ChoiceHasNoIncoming.instance();
+ }
+ }
+
+ private ChoiceHasNoIncoming() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static ChoiceHasNoIncoming instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected ChoiceHasNoIncoming.Matcher instantiate(final ViatraQueryEngine engine) {
+ return ChoiceHasNoIncoming.Matcher.on(engine);
+ }
+
+ @Override
+ public ChoiceHasNoIncoming.Matcher instantiate() {
+ return ChoiceHasNoIncoming.Matcher.create();
+ }
+
+ @Override
+ public ChoiceHasNoIncoming.Match newEmptyMatch() {
+ return ChoiceHasNoIncoming.Match.newEmptyMatch();
+ }
+
+ @Override
+ public ChoiceHasNoIncoming.Match newMatch(final Object... parameters) {
+ return ChoiceHasNoIncoming.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice) parameters[0]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.ChoiceHasNoIncoming (visibility: PUBLIC, simpleName: ChoiceHasNoIncoming, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.ChoiceHasNoIncoming, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.ChoiceHasNoIncoming (visibility: PUBLIC, simpleName: ChoiceHasNoIncoming, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.ChoiceHasNoIncoming, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static ChoiceHasNoIncoming INSTANCE = new ChoiceHasNoIncoming();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static ChoiceHasNoIncoming.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_c = new PParameter("c", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Choice")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_c);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.choiceHasNoIncoming";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("c");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_c = body.getOrCreateVariableByName("c");
+ PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
+ PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_c), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Choice")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_c, parameter_c)
+ ));
+ // neg find transition(_, _, c)
+ new NegativePatternCall(body, Tuples.flatTupleOf(var___0_, var___1_, var_c), Transition.instance().getInternalQueryRepresentation());
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("c")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/ChoiceHasNoOutgoing.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/ChoiceHasNoOutgoing.java
new file mode 100644
index 00000000..1c20a03b
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/ChoiceHasNoOutgoing.java
@@ -0,0 +1,559 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * /////////
+ * // Choice
+ * /////////
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {c})
+ * pattern choiceHasNoOutgoing(c : Choice) {
+ * neg find transition(_, c, _);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class ChoiceHasNoOutgoing extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.choiceHasNoOutgoing pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Choice fC;
+
+ private static List parameterNames = makeImmutableList("c");
+
+ private Match(final Choice pC) {
+ this.fC = pC;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("c".equals(parameterName)) return this.fC;
+ return null;
+ }
+
+ public Choice getC() {
+ return this.fC;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("c".equals(parameterName) ) {
+ this.fC = (Choice) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setC(final Choice pC) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fC = pC;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.choiceHasNoOutgoing";
+ }
+
+ @Override
+ public List parameterNames() {
+ return ChoiceHasNoOutgoing.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fC};
+ }
+
+ @Override
+ public ChoiceHasNoOutgoing.Match toImmutable() {
+ return isMutable() ? newMatch(fC) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"c\"=" + prettyPrintValue(fC));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fC);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof ChoiceHasNoOutgoing.Match)) {
+ ChoiceHasNoOutgoing.Match other = (ChoiceHasNoOutgoing.Match) obj;
+ return Objects.equals(fC, other.fC);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public ChoiceHasNoOutgoing specification() {
+ return ChoiceHasNoOutgoing.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static ChoiceHasNoOutgoing.Match newEmptyMatch() {
+ return new Mutable(null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static ChoiceHasNoOutgoing.Match newMutableMatch(final Choice pC) {
+ return new Mutable(pC);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static ChoiceHasNoOutgoing.Match newMatch(final Choice pC) {
+ return new Immutable(pC);
+ }
+
+ private static final class Mutable extends ChoiceHasNoOutgoing.Match {
+ Mutable(final Choice pC) {
+ super(pC);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends ChoiceHasNoOutgoing.Match {
+ Immutable(final Choice pC) {
+ super(pC);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.choiceHasNoOutgoing pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * /////////
+ * // Choice
+ * /////////
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {c})
+ * pattern choiceHasNoOutgoing(c : Choice) {
+ * neg find transition(_, c, _);
+ * }
+ *
+ *
+ * @see Match
+ * @see ChoiceHasNoOutgoing
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static ChoiceHasNoOutgoing.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static ChoiceHasNoOutgoing.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_C = 0;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(ChoiceHasNoOutgoing.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Choice pC) {
+ return rawStreamAllMatches(new Object[]{pC}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Choice pC) {
+ return rawStreamAllMatches(new Object[]{pC});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Choice pC) {
+ return rawGetOneArbitraryMatch(new Object[]{pC});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Choice pC) {
+ return rawHasMatch(new Object[]{pC});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Choice pC) {
+ return rawCountMatches(new Object[]{pC});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Choice pC, final Consumer super ChoiceHasNoOutgoing.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pC}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pC the fixed value of pattern parameter c, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public ChoiceHasNoOutgoing.Match newMatch(final Choice pC) {
+ return ChoiceHasNoOutgoing.Match.newMatch(pC);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for c.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfc(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_C, parameters).map(Choice.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for c.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfc() {
+ return rawStreamAllValuesOfc(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for c.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfc() {
+ return rawStreamAllValuesOfc(emptyArray());
+ }
+
+ @Override
+ protected ChoiceHasNoOutgoing.Match tupleToMatch(final Tuple t) {
+ try {
+ return ChoiceHasNoOutgoing.Match.newMatch((Choice) t.get(POSITION_C));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected ChoiceHasNoOutgoing.Match arrayToMatch(final Object[] match) {
+ try {
+ return ChoiceHasNoOutgoing.Match.newMatch((Choice) match[POSITION_C]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected ChoiceHasNoOutgoing.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return ChoiceHasNoOutgoing.Match.newMutableMatch((Choice) match[POSITION_C]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return ChoiceHasNoOutgoing.instance();
+ }
+ }
+
+ private ChoiceHasNoOutgoing() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static ChoiceHasNoOutgoing instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected ChoiceHasNoOutgoing.Matcher instantiate(final ViatraQueryEngine engine) {
+ return ChoiceHasNoOutgoing.Matcher.on(engine);
+ }
+
+ @Override
+ public ChoiceHasNoOutgoing.Matcher instantiate() {
+ return ChoiceHasNoOutgoing.Matcher.create();
+ }
+
+ @Override
+ public ChoiceHasNoOutgoing.Match newEmptyMatch() {
+ return ChoiceHasNoOutgoing.Match.newEmptyMatch();
+ }
+
+ @Override
+ public ChoiceHasNoOutgoing.Match newMatch(final Object... parameters) {
+ return ChoiceHasNoOutgoing.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice) parameters[0]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.ChoiceHasNoOutgoing (visibility: PUBLIC, simpleName: ChoiceHasNoOutgoing, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.ChoiceHasNoOutgoing, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.ChoiceHasNoOutgoing (visibility: PUBLIC, simpleName: ChoiceHasNoOutgoing, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.ChoiceHasNoOutgoing, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static ChoiceHasNoOutgoing INSTANCE = new ChoiceHasNoOutgoing();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static ChoiceHasNoOutgoing.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_c = new PParameter("c", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Choice")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_c);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.choiceHasNoOutgoing";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("c");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_c = body.getOrCreateVariableByName("c");
+ PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
+ PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_c), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Choice")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_c, parameter_c)
+ ));
+ // neg find transition(_, c, _)
+ new NegativePatternCall(body, Tuples.flatTupleOf(var___0_, var_c, var___1_), Transition.instance().getInternalQueryRepresentation());
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("c")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/EntryInRegion.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/EntryInRegion.java
new file mode 100644
index 00000000..147b27f9
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/EntryInRegion.java
@@ -0,0 +1,702 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * /////////
+ * // Entry
+ * /////////
+ *
+ * pattern entryInRegion(r1 : Region, e1 : Entry) {
+ * Region.vertices(r1, e1);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class EntryInRegion extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.entryInRegion pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Region fR1;
+
+ private Entry fE1;
+
+ private static List parameterNames = makeImmutableList("r1", "e1");
+
+ private Match(final Region pR1, final Entry pE1) {
+ this.fR1 = pR1;
+ this.fE1 = pE1;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("r1".equals(parameterName)) return this.fR1;
+ if ("e1".equals(parameterName)) return this.fE1;
+ return null;
+ }
+
+ public Region getR1() {
+ return this.fR1;
+ }
+
+ public Entry getE1() {
+ return this.fE1;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("r1".equals(parameterName) ) {
+ this.fR1 = (Region) newValue;
+ return true;
+ }
+ if ("e1".equals(parameterName) ) {
+ this.fE1 = (Entry) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setR1(final Region pR1) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fR1 = pR1;
+ }
+
+ public void setE1(final Entry pE1) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fE1 = pE1;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.entryInRegion";
+ }
+
+ @Override
+ public List parameterNames() {
+ return EntryInRegion.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fR1, fE1};
+ }
+
+ @Override
+ public EntryInRegion.Match toImmutable() {
+ return isMutable() ? newMatch(fR1, fE1) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"r1\"=" + prettyPrintValue(fR1) + ", ");
+ result.append("\"e1\"=" + prettyPrintValue(fE1));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fR1, fE1);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof EntryInRegion.Match)) {
+ EntryInRegion.Match other = (EntryInRegion.Match) obj;
+ return Objects.equals(fR1, other.fR1) && Objects.equals(fE1, other.fE1);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public EntryInRegion specification() {
+ return EntryInRegion.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static EntryInRegion.Match newEmptyMatch() {
+ return new Mutable(null, null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @param pE1 the fixed value of pattern parameter e1, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static EntryInRegion.Match newMutableMatch(final Region pR1, final Entry pE1) {
+ return new Mutable(pR1, pE1);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @param pE1 the fixed value of pattern parameter e1, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static EntryInRegion.Match newMatch(final Region pR1, final Entry pE1) {
+ return new Immutable(pR1, pE1);
+ }
+
+ private static final class Mutable extends EntryInRegion.Match {
+ Mutable(final Region pR1, final Entry pE1) {
+ super(pR1, pE1);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends EntryInRegion.Match {
+ Immutable(final Region pR1, final Entry pE1) {
+ super(pR1, pE1);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.entryInRegion pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * /////////
+ * // Entry
+ * /////////
+ *
+ * pattern entryInRegion(r1 : Region, e1 : Entry) {
+ * Region.vertices(r1, e1);
+ * }
+ *
+ *
+ * @see Match
+ * @see EntryInRegion
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static EntryInRegion.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static EntryInRegion.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_R1 = 0;
+
+ private final static int POSITION_E1 = 1;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(EntryInRegion.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @param pE1 the fixed value of pattern parameter e1, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Region pR1, final Entry pE1) {
+ return rawStreamAllMatches(new Object[]{pR1, pE1}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @param pE1 the fixed value of pattern parameter e1, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Region pR1, final Entry pE1) {
+ return rawStreamAllMatches(new Object[]{pR1, pE1});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @param pE1 the fixed value of pattern parameter e1, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Region pR1, final Entry pE1) {
+ return rawGetOneArbitraryMatch(new Object[]{pR1, pE1});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @param pE1 the fixed value of pattern parameter e1, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Region pR1, final Entry pE1) {
+ return rawHasMatch(new Object[]{pR1, pE1});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @param pE1 the fixed value of pattern parameter e1, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Region pR1, final Entry pE1) {
+ return rawCountMatches(new Object[]{pR1, pE1});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @param pE1 the fixed value of pattern parameter e1, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Region pR1, final Entry pE1, final Consumer super EntryInRegion.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pR1, pE1}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @param pE1 the fixed value of pattern parameter e1, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public EntryInRegion.Match newMatch(final Region pR1, final Entry pE1) {
+ return EntryInRegion.Match.newMatch(pR1, pE1);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for r1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfr1(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_R1, parameters).map(Region.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for r1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfr1() {
+ return rawStreamAllValuesOfr1(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for r1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfr1() {
+ return rawStreamAllValuesOfr1(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for r1.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfr1(final EntryInRegion.Match partialMatch) {
+ return rawStreamAllValuesOfr1(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for r1.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfr1(final Entry pE1) {
+ return rawStreamAllValuesOfr1(new Object[]{null, pE1});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for r1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfr1(final EntryInRegion.Match partialMatch) {
+ return rawStreamAllValuesOfr1(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for r1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfr1(final Entry pE1) {
+ return rawStreamAllValuesOfr1(new Object[]{null, pE1}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfe1(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_E1, parameters).map(Entry.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe1() {
+ return rawStreamAllValuesOfe1(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe1() {
+ return rawStreamAllValuesOfe1(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e1.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe1(final EntryInRegion.Match partialMatch) {
+ return rawStreamAllValuesOfe1(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e1.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe1(final Region pR1) {
+ return rawStreamAllValuesOfe1(new Object[]{pR1, null});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe1(final EntryInRegion.Match partialMatch) {
+ return rawStreamAllValuesOfe1(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe1(final Region pR1) {
+ return rawStreamAllValuesOfe1(new Object[]{pR1, null}).collect(Collectors.toSet());
+ }
+
+ @Override
+ protected EntryInRegion.Match tupleToMatch(final Tuple t) {
+ try {
+ return EntryInRegion.Match.newMatch((Region) t.get(POSITION_R1), (Entry) t.get(POSITION_E1));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected EntryInRegion.Match arrayToMatch(final Object[] match) {
+ try {
+ return EntryInRegion.Match.newMatch((Region) match[POSITION_R1], (Entry) match[POSITION_E1]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected EntryInRegion.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return EntryInRegion.Match.newMutableMatch((Region) match[POSITION_R1], (Entry) match[POSITION_E1]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return EntryInRegion.instance();
+ }
+ }
+
+ private EntryInRegion() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static EntryInRegion instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected EntryInRegion.Matcher instantiate(final ViatraQueryEngine engine) {
+ return EntryInRegion.Matcher.on(engine);
+ }
+
+ @Override
+ public EntryInRegion.Matcher instantiate() {
+ return EntryInRegion.Matcher.create();
+ }
+
+ @Override
+ public EntryInRegion.Match newEmptyMatch() {
+ return EntryInRegion.Match.newEmptyMatch();
+ }
+
+ @Override
+ public EntryInRegion.Match newMatch(final Object... parameters) {
+ return EntryInRegion.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region) parameters[0], (ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry) parameters[1]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.EntryInRegion (visibility: PUBLIC, simpleName: EntryInRegion, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.EntryInRegion, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.EntryInRegion (visibility: PUBLIC, simpleName: EntryInRegion, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.EntryInRegion, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static EntryInRegion INSTANCE = new EntryInRegion();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static EntryInRegion.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_r1 = new PParameter("r1", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Region")), PParameterDirection.INOUT);
+
+ private final PParameter parameter_e1 = new PParameter("e1", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Entry")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_r1, parameter_e1);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.entryInRegion";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("r1","e1");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_r1 = body.getOrCreateVariableByName("r1");
+ PVariable var_e1 = body.getOrCreateVariableByName("e1");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_r1), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Region")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e1), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Entry")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_r1, parameter_r1),
+ new ExportedParameter(body, var_e1, parameter_e1)
+ ));
+ // Region.vertices(r1, e1)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_r1), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Region")));
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_r1, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("YakinduMetamodel", "Region", "vertices")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Vertex")));
+ new Equality(body, var__virtual_0_, var_e1);
+ bodies.add(body);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleIncomingTrainsition.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleIncomingTrainsition.java
new file mode 100644
index 00000000..236ce5ff
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleIncomingTrainsition.java
@@ -0,0 +1,549 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * pattern hasMultipleIncomingTrainsition(v : Synchronization) {
+ * find transition(_, src1, v);
+ * find transition(_, src2, v);
+ * src1 != src2;
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class HasMultipleIncomingTrainsition extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleIncomingTrainsition pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Synchronization fV;
+
+ private static List parameterNames = makeImmutableList("v");
+
+ private Match(final Synchronization pV) {
+ this.fV = pV;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("v".equals(parameterName)) return this.fV;
+ return null;
+ }
+
+ public Synchronization getV() {
+ return this.fV;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("v".equals(parameterName) ) {
+ this.fV = (Synchronization) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setV(final Synchronization pV) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fV = pV;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleIncomingTrainsition";
+ }
+
+ @Override
+ public List parameterNames() {
+ return HasMultipleIncomingTrainsition.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fV};
+ }
+
+ @Override
+ public HasMultipleIncomingTrainsition.Match toImmutable() {
+ return isMutable() ? newMatch(fV) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"v\"=" + prettyPrintValue(fV));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fV);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof HasMultipleIncomingTrainsition.Match)) {
+ HasMultipleIncomingTrainsition.Match other = (HasMultipleIncomingTrainsition.Match) obj;
+ return Objects.equals(fV, other.fV);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public HasMultipleIncomingTrainsition specification() {
+ return HasMultipleIncomingTrainsition.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static HasMultipleIncomingTrainsition.Match newEmptyMatch() {
+ return new Mutable(null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static HasMultipleIncomingTrainsition.Match newMutableMatch(final Synchronization pV) {
+ return new Mutable(pV);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static HasMultipleIncomingTrainsition.Match newMatch(final Synchronization pV) {
+ return new Immutable(pV);
+ }
+
+ private static final class Mutable extends HasMultipleIncomingTrainsition.Match {
+ Mutable(final Synchronization pV) {
+ super(pV);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends HasMultipleIncomingTrainsition.Match {
+ Immutable(final Synchronization pV) {
+ super(pV);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleIncomingTrainsition pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * pattern hasMultipleIncomingTrainsition(v : Synchronization) {
+ * find transition(_, src1, v);
+ * find transition(_, src2, v);
+ * src1 != src2;
+ * }
+ *
+ *
+ * @see Match
+ * @see HasMultipleIncomingTrainsition
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static HasMultipleIncomingTrainsition.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static HasMultipleIncomingTrainsition.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_V = 0;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(HasMultipleIncomingTrainsition.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Synchronization pV) {
+ return rawStreamAllMatches(new Object[]{pV}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Synchronization pV) {
+ return rawStreamAllMatches(new Object[]{pV});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Synchronization pV) {
+ return rawGetOneArbitraryMatch(new Object[]{pV});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Synchronization pV) {
+ return rawHasMatch(new Object[]{pV});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Synchronization pV) {
+ return rawCountMatches(new Object[]{pV});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Synchronization pV, final Consumer super HasMultipleIncomingTrainsition.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pV}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public HasMultipleIncomingTrainsition.Match newMatch(final Synchronization pV) {
+ return HasMultipleIncomingTrainsition.Match.newMatch(pV);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for v.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfv(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_V, parameters).map(Synchronization.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for v.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfv() {
+ return rawStreamAllValuesOfv(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for v.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfv() {
+ return rawStreamAllValuesOfv(emptyArray());
+ }
+
+ @Override
+ protected HasMultipleIncomingTrainsition.Match tupleToMatch(final Tuple t) {
+ try {
+ return HasMultipleIncomingTrainsition.Match.newMatch((Synchronization) t.get(POSITION_V));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected HasMultipleIncomingTrainsition.Match arrayToMatch(final Object[] match) {
+ try {
+ return HasMultipleIncomingTrainsition.Match.newMatch((Synchronization) match[POSITION_V]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected HasMultipleIncomingTrainsition.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return HasMultipleIncomingTrainsition.Match.newMutableMatch((Synchronization) match[POSITION_V]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return HasMultipleIncomingTrainsition.instance();
+ }
+ }
+
+ private HasMultipleIncomingTrainsition() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static HasMultipleIncomingTrainsition instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected HasMultipleIncomingTrainsition.Matcher instantiate(final ViatraQueryEngine engine) {
+ return HasMultipleIncomingTrainsition.Matcher.on(engine);
+ }
+
+ @Override
+ public HasMultipleIncomingTrainsition.Matcher instantiate() {
+ return HasMultipleIncomingTrainsition.Matcher.create();
+ }
+
+ @Override
+ public HasMultipleIncomingTrainsition.Match newEmptyMatch() {
+ return HasMultipleIncomingTrainsition.Match.newEmptyMatch();
+ }
+
+ @Override
+ public HasMultipleIncomingTrainsition.Match newMatch(final Object... parameters) {
+ return HasMultipleIncomingTrainsition.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization) parameters[0]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleIncomingTrainsition (visibility: PUBLIC, simpleName: HasMultipleIncomingTrainsition, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleIncomingTrainsition, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleIncomingTrainsition (visibility: PUBLIC, simpleName: HasMultipleIncomingTrainsition, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleIncomingTrainsition, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static HasMultipleIncomingTrainsition INSTANCE = new HasMultipleIncomingTrainsition();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static HasMultipleIncomingTrainsition.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_v = new PParameter("v", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Synchronization")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_v);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleIncomingTrainsition";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("v");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_v = body.getOrCreateVariableByName("v");
+ PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
+ PVariable var_src1 = body.getOrCreateVariableByName("src1");
+ PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
+ PVariable var_src2 = body.getOrCreateVariableByName("src2");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_v), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Synchronization")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_v, parameter_v)
+ ));
+ // find transition(_, src1, v)
+ new PositivePatternCall(body, Tuples.flatTupleOf(var___0_, var_src1, var_v), Transition.instance().getInternalQueryRepresentation());
+ // find transition(_, src2, v)
+ new PositivePatternCall(body, Tuples.flatTupleOf(var___1_, var_src2, var_v), Transition.instance().getInternalQueryRepresentation());
+ // src1 != src2
+ new Inequality(body, var_src1, var_src2);
+ bodies.add(body);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleOutgoingTrainsition.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleOutgoingTrainsition.java
new file mode 100644
index 00000000..115b93e1
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleOutgoingTrainsition.java
@@ -0,0 +1,549 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * pattern hasMultipleOutgoingTrainsition(v : Synchronization) {
+ * find transition(_, v, trg1);
+ * find transition(_, v, trg2);
+ * trg1 != trg2;
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class HasMultipleOutgoingTrainsition extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleOutgoingTrainsition pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Synchronization fV;
+
+ private static List parameterNames = makeImmutableList("v");
+
+ private Match(final Synchronization pV) {
+ this.fV = pV;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("v".equals(parameterName)) return this.fV;
+ return null;
+ }
+
+ public Synchronization getV() {
+ return this.fV;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("v".equals(parameterName) ) {
+ this.fV = (Synchronization) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setV(final Synchronization pV) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fV = pV;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleOutgoingTrainsition";
+ }
+
+ @Override
+ public List parameterNames() {
+ return HasMultipleOutgoingTrainsition.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fV};
+ }
+
+ @Override
+ public HasMultipleOutgoingTrainsition.Match toImmutable() {
+ return isMutable() ? newMatch(fV) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"v\"=" + prettyPrintValue(fV));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fV);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof HasMultipleOutgoingTrainsition.Match)) {
+ HasMultipleOutgoingTrainsition.Match other = (HasMultipleOutgoingTrainsition.Match) obj;
+ return Objects.equals(fV, other.fV);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public HasMultipleOutgoingTrainsition specification() {
+ return HasMultipleOutgoingTrainsition.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static HasMultipleOutgoingTrainsition.Match newEmptyMatch() {
+ return new Mutable(null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static HasMultipleOutgoingTrainsition.Match newMutableMatch(final Synchronization pV) {
+ return new Mutable(pV);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static HasMultipleOutgoingTrainsition.Match newMatch(final Synchronization pV) {
+ return new Immutable(pV);
+ }
+
+ private static final class Mutable extends HasMultipleOutgoingTrainsition.Match {
+ Mutable(final Synchronization pV) {
+ super(pV);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends HasMultipleOutgoingTrainsition.Match {
+ Immutable(final Synchronization pV) {
+ super(pV);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleOutgoingTrainsition pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * pattern hasMultipleOutgoingTrainsition(v : Synchronization) {
+ * find transition(_, v, trg1);
+ * find transition(_, v, trg2);
+ * trg1 != trg2;
+ * }
+ *
+ *
+ * @see Match
+ * @see HasMultipleOutgoingTrainsition
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static HasMultipleOutgoingTrainsition.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static HasMultipleOutgoingTrainsition.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_V = 0;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(HasMultipleOutgoingTrainsition.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Synchronization pV) {
+ return rawStreamAllMatches(new Object[]{pV}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Synchronization pV) {
+ return rawStreamAllMatches(new Object[]{pV});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Synchronization pV) {
+ return rawGetOneArbitraryMatch(new Object[]{pV});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Synchronization pV) {
+ return rawHasMatch(new Object[]{pV});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Synchronization pV) {
+ return rawCountMatches(new Object[]{pV});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Synchronization pV, final Consumer super HasMultipleOutgoingTrainsition.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pV}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pV the fixed value of pattern parameter v, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public HasMultipleOutgoingTrainsition.Match newMatch(final Synchronization pV) {
+ return HasMultipleOutgoingTrainsition.Match.newMatch(pV);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for v.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfv(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_V, parameters).map(Synchronization.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for v.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfv() {
+ return rawStreamAllValuesOfv(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for v.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfv() {
+ return rawStreamAllValuesOfv(emptyArray());
+ }
+
+ @Override
+ protected HasMultipleOutgoingTrainsition.Match tupleToMatch(final Tuple t) {
+ try {
+ return HasMultipleOutgoingTrainsition.Match.newMatch((Synchronization) t.get(POSITION_V));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected HasMultipleOutgoingTrainsition.Match arrayToMatch(final Object[] match) {
+ try {
+ return HasMultipleOutgoingTrainsition.Match.newMatch((Synchronization) match[POSITION_V]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected HasMultipleOutgoingTrainsition.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return HasMultipleOutgoingTrainsition.Match.newMutableMatch((Synchronization) match[POSITION_V]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return HasMultipleOutgoingTrainsition.instance();
+ }
+ }
+
+ private HasMultipleOutgoingTrainsition() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static HasMultipleOutgoingTrainsition instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected HasMultipleOutgoingTrainsition.Matcher instantiate(final ViatraQueryEngine engine) {
+ return HasMultipleOutgoingTrainsition.Matcher.on(engine);
+ }
+
+ @Override
+ public HasMultipleOutgoingTrainsition.Matcher instantiate() {
+ return HasMultipleOutgoingTrainsition.Matcher.create();
+ }
+
+ @Override
+ public HasMultipleOutgoingTrainsition.Match newEmptyMatch() {
+ return HasMultipleOutgoingTrainsition.Match.newEmptyMatch();
+ }
+
+ @Override
+ public HasMultipleOutgoingTrainsition.Match newMatch(final Object... parameters) {
+ return HasMultipleOutgoingTrainsition.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization) parameters[0]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleOutgoingTrainsition (visibility: PUBLIC, simpleName: HasMultipleOutgoingTrainsition, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleOutgoingTrainsition, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleOutgoingTrainsition (visibility: PUBLIC, simpleName: HasMultipleOutgoingTrainsition, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleOutgoingTrainsition, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static HasMultipleOutgoingTrainsition INSTANCE = new HasMultipleOutgoingTrainsition();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static HasMultipleOutgoingTrainsition.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_v = new PParameter("v", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Synchronization")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_v);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleOutgoingTrainsition";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("v");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_v = body.getOrCreateVariableByName("v");
+ PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
+ PVariable var_trg1 = body.getOrCreateVariableByName("trg1");
+ PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
+ PVariable var_trg2 = body.getOrCreateVariableByName("trg2");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_v), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Synchronization")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_v, parameter_v)
+ ));
+ // find transition(_, v, trg1)
+ new PositivePatternCall(body, Tuples.flatTupleOf(var___0_, var_v, var_trg1), Transition.instance().getInternalQueryRepresentation());
+ // find transition(_, v, trg2)
+ new PositivePatternCall(body, Tuples.flatTupleOf(var___1_, var_v, var_trg2), Transition.instance().getInternalQueryRepresentation());
+ // trg1 != trg2
+ new Inequality(body, var_trg1, var_trg2);
+ bodies.add(body);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleRegions.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleRegions.java
new file mode 100644
index 00000000..5542ccbb
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/HasMultipleRegions.java
@@ -0,0 +1,555 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * pattern hasMultipleRegions(composite: CompositeElement) {
+ * CompositeElement.regions(composite,region1);
+ * CompositeElement.regions(composite,region2);
+ * region1 != region2;
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class HasMultipleRegions extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleRegions pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private CompositeElement fComposite;
+
+ private static List parameterNames = makeImmutableList("composite");
+
+ private Match(final CompositeElement pComposite) {
+ this.fComposite = pComposite;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("composite".equals(parameterName)) return this.fComposite;
+ return null;
+ }
+
+ public CompositeElement getComposite() {
+ return this.fComposite;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("composite".equals(parameterName) ) {
+ this.fComposite = (CompositeElement) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setComposite(final CompositeElement pComposite) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fComposite = pComposite;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleRegions";
+ }
+
+ @Override
+ public List parameterNames() {
+ return HasMultipleRegions.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fComposite};
+ }
+
+ @Override
+ public HasMultipleRegions.Match toImmutable() {
+ return isMutable() ? newMatch(fComposite) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"composite\"=" + prettyPrintValue(fComposite));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fComposite);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof HasMultipleRegions.Match)) {
+ HasMultipleRegions.Match other = (HasMultipleRegions.Match) obj;
+ return Objects.equals(fComposite, other.fComposite);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public HasMultipleRegions specification() {
+ return HasMultipleRegions.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static HasMultipleRegions.Match newEmptyMatch() {
+ return new Mutable(null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pComposite the fixed value of pattern parameter composite, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static HasMultipleRegions.Match newMutableMatch(final CompositeElement pComposite) {
+ return new Mutable(pComposite);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pComposite the fixed value of pattern parameter composite, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static HasMultipleRegions.Match newMatch(final CompositeElement pComposite) {
+ return new Immutable(pComposite);
+ }
+
+ private static final class Mutable extends HasMultipleRegions.Match {
+ Mutable(final CompositeElement pComposite) {
+ super(pComposite);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends HasMultipleRegions.Match {
+ Immutable(final CompositeElement pComposite) {
+ super(pComposite);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleRegions pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * pattern hasMultipleRegions(composite: CompositeElement) {
+ * CompositeElement.regions(composite,region1);
+ * CompositeElement.regions(composite,region2);
+ * region1 != region2;
+ * }
+ *
+ *
+ * @see Match
+ * @see HasMultipleRegions
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static HasMultipleRegions.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static HasMultipleRegions.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_COMPOSITE = 0;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(HasMultipleRegions.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pComposite the fixed value of pattern parameter composite, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final CompositeElement pComposite) {
+ return rawStreamAllMatches(new Object[]{pComposite}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pComposite the fixed value of pattern parameter composite, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final CompositeElement pComposite) {
+ return rawStreamAllMatches(new Object[]{pComposite});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pComposite the fixed value of pattern parameter composite, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final CompositeElement pComposite) {
+ return rawGetOneArbitraryMatch(new Object[]{pComposite});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pComposite the fixed value of pattern parameter composite, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final CompositeElement pComposite) {
+ return rawHasMatch(new Object[]{pComposite});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pComposite the fixed value of pattern parameter composite, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final CompositeElement pComposite) {
+ return rawCountMatches(new Object[]{pComposite});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pComposite the fixed value of pattern parameter composite, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final CompositeElement pComposite, final Consumer super HasMultipleRegions.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pComposite}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pComposite the fixed value of pattern parameter composite, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public HasMultipleRegions.Match newMatch(final CompositeElement pComposite) {
+ return HasMultipleRegions.Match.newMatch(pComposite);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for composite.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfcomposite(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_COMPOSITE, parameters).map(CompositeElement.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for composite.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfcomposite() {
+ return rawStreamAllValuesOfcomposite(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for composite.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfcomposite() {
+ return rawStreamAllValuesOfcomposite(emptyArray());
+ }
+
+ @Override
+ protected HasMultipleRegions.Match tupleToMatch(final Tuple t) {
+ try {
+ return HasMultipleRegions.Match.newMatch((CompositeElement) t.get(POSITION_COMPOSITE));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected HasMultipleRegions.Match arrayToMatch(final Object[] match) {
+ try {
+ return HasMultipleRegions.Match.newMatch((CompositeElement) match[POSITION_COMPOSITE]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected HasMultipleRegions.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return HasMultipleRegions.Match.newMutableMatch((CompositeElement) match[POSITION_COMPOSITE]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return HasMultipleRegions.instance();
+ }
+ }
+
+ private HasMultipleRegions() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static HasMultipleRegions instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected HasMultipleRegions.Matcher instantiate(final ViatraQueryEngine engine) {
+ return HasMultipleRegions.Matcher.on(engine);
+ }
+
+ @Override
+ public HasMultipleRegions.Matcher instantiate() {
+ return HasMultipleRegions.Matcher.create();
+ }
+
+ @Override
+ public HasMultipleRegions.Match newEmptyMatch() {
+ return HasMultipleRegions.Match.newEmptyMatch();
+ }
+
+ @Override
+ public HasMultipleRegions.Match newMatch(final Object... parameters) {
+ return HasMultipleRegions.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement) parameters[0]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleRegions (visibility: PUBLIC, simpleName: HasMultipleRegions, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleRegions, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleRegions (visibility: PUBLIC, simpleName: HasMultipleRegions, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleRegions, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static HasMultipleRegions INSTANCE = new HasMultipleRegions();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static HasMultipleRegions.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_composite = new PParameter("composite", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "CompositeElement")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_composite);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.hasMultipleRegions";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("composite");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_composite = body.getOrCreateVariableByName("composite");
+ PVariable var_region1 = body.getOrCreateVariableByName("region1");
+ PVariable var_region2 = body.getOrCreateVariableByName("region2");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_composite), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "CompositeElement")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_composite, parameter_composite)
+ ));
+ // CompositeElement.regions(composite,region1)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_composite), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "CompositeElement")));
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_composite, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("YakinduMetamodel", "CompositeElement", "regions")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Region")));
+ new Equality(body, var__virtual_0_, var_region1);
+ // CompositeElement.regions(composite,region2)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_composite), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "CompositeElement")));
+ PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_composite, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("YakinduMetamodel", "CompositeElement", "regions")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Region")));
+ new Equality(body, var__virtual_1_, var_region2);
+ // region1 != region2
+ new Inequality(body, var_region1, var_region2);
+ bodies.add(body);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/IncomingToEntry.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/IncomingToEntry.java
new file mode 100644
index 00000000..ed8ca3e5
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/IncomingToEntry.java
@@ -0,0 +1,703 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {e})
+ * pattern incomingToEntry(t : Transition, e : Entry) {
+ * find transition(t, _, e);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class IncomingToEntry extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.incomingToEntry pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Transition fT;
+
+ private Entry fE;
+
+ private static List parameterNames = makeImmutableList("t", "e");
+
+ private Match(final Transition pT, final Entry pE) {
+ this.fT = pT;
+ this.fE = pE;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("t".equals(parameterName)) return this.fT;
+ if ("e".equals(parameterName)) return this.fE;
+ return null;
+ }
+
+ public Transition getT() {
+ return this.fT;
+ }
+
+ public Entry getE() {
+ return this.fE;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("t".equals(parameterName) ) {
+ this.fT = (Transition) newValue;
+ return true;
+ }
+ if ("e".equals(parameterName) ) {
+ this.fE = (Entry) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setT(final Transition pT) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fT = pT;
+ }
+
+ public void setE(final Entry pE) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fE = pE;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.incomingToEntry";
+ }
+
+ @Override
+ public List parameterNames() {
+ return IncomingToEntry.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fT, fE};
+ }
+
+ @Override
+ public IncomingToEntry.Match toImmutable() {
+ return isMutable() ? newMatch(fT, fE) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"t\"=" + prettyPrintValue(fT) + ", ");
+ result.append("\"e\"=" + prettyPrintValue(fE));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fT, fE);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof IncomingToEntry.Match)) {
+ IncomingToEntry.Match other = (IncomingToEntry.Match) obj;
+ return Objects.equals(fT, other.fT) && Objects.equals(fE, other.fE);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public IncomingToEntry specification() {
+ return IncomingToEntry.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static IncomingToEntry.Match newEmptyMatch() {
+ return new Mutable(null, null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static IncomingToEntry.Match newMutableMatch(final Transition pT, final Entry pE) {
+ return new Mutable(pT, pE);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static IncomingToEntry.Match newMatch(final Transition pT, final Entry pE) {
+ return new Immutable(pT, pE);
+ }
+
+ private static final class Mutable extends IncomingToEntry.Match {
+ Mutable(final Transition pT, final Entry pE) {
+ super(pT, pE);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends IncomingToEntry.Match {
+ Immutable(final Transition pT, final Entry pE) {
+ super(pT, pE);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.incomingToEntry pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {e})
+ * pattern incomingToEntry(t : Transition, e : Entry) {
+ * find transition(t, _, e);
+ * }
+ *
+ *
+ * @see Match
+ * @see IncomingToEntry
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static IncomingToEntry.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static IncomingToEntry.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_T = 0;
+
+ private final static int POSITION_E = 1;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(IncomingToEntry.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Transition pT, final Entry pE) {
+ return rawStreamAllMatches(new Object[]{pT, pE}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Transition pT, final Entry pE) {
+ return rawStreamAllMatches(new Object[]{pT, pE});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Transition pT, final Entry pE) {
+ return rawGetOneArbitraryMatch(new Object[]{pT, pE});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Transition pT, final Entry pE) {
+ return rawHasMatch(new Object[]{pT, pE});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Transition pT, final Entry pE) {
+ return rawCountMatches(new Object[]{pT, pE});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Transition pT, final Entry pE, final Consumer super IncomingToEntry.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pT, pE}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public IncomingToEntry.Match newMatch(final Transition pT, final Entry pE) {
+ return IncomingToEntry.Match.newMatch(pT, pE);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOft(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_T, parameters).map(Transition.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft() {
+ return rawStreamAllValuesOft(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft() {
+ return rawStreamAllValuesOft(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft(final IncomingToEntry.Match partialMatch) {
+ return rawStreamAllValuesOft(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft(final Entry pE) {
+ return rawStreamAllValuesOft(new Object[]{null, pE});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft(final IncomingToEntry.Match partialMatch) {
+ return rawStreamAllValuesOft(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft(final Entry pE) {
+ return rawStreamAllValuesOft(new Object[]{null, pE}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfe(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_E, parameters).map(Entry.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe() {
+ return rawStreamAllValuesOfe(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe() {
+ return rawStreamAllValuesOfe(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe(final IncomingToEntry.Match partialMatch) {
+ return rawStreamAllValuesOfe(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe(final Transition pT) {
+ return rawStreamAllValuesOfe(new Object[]{pT, null});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe(final IncomingToEntry.Match partialMatch) {
+ return rawStreamAllValuesOfe(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe(final Transition pT) {
+ return rawStreamAllValuesOfe(new Object[]{pT, null}).collect(Collectors.toSet());
+ }
+
+ @Override
+ protected IncomingToEntry.Match tupleToMatch(final Tuple t) {
+ try {
+ return IncomingToEntry.Match.newMatch((Transition) t.get(POSITION_T), (Entry) t.get(POSITION_E));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected IncomingToEntry.Match arrayToMatch(final Object[] match) {
+ try {
+ return IncomingToEntry.Match.newMatch((Transition) match[POSITION_T], (Entry) match[POSITION_E]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected IncomingToEntry.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return IncomingToEntry.Match.newMutableMatch((Transition) match[POSITION_T], (Entry) match[POSITION_E]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return IncomingToEntry.instance();
+ }
+ }
+
+ private IncomingToEntry() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IncomingToEntry instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected IncomingToEntry.Matcher instantiate(final ViatraQueryEngine engine) {
+ return IncomingToEntry.Matcher.on(engine);
+ }
+
+ @Override
+ public IncomingToEntry.Matcher instantiate() {
+ return IncomingToEntry.Matcher.create();
+ }
+
+ @Override
+ public IncomingToEntry.Match newEmptyMatch() {
+ return IncomingToEntry.Match.newEmptyMatch();
+ }
+
+ @Override
+ public IncomingToEntry.Match newMatch(final Object... parameters) {
+ return IncomingToEntry.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition) parameters[0], (ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry) parameters[1]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.IncomingToEntry (visibility: PUBLIC, simpleName: IncomingToEntry, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.IncomingToEntry, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.IncomingToEntry (visibility: PUBLIC, simpleName: IncomingToEntry, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.IncomingToEntry, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static IncomingToEntry INSTANCE = new IncomingToEntry();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static IncomingToEntry.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_t = new PParameter("t", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Transition")), PParameterDirection.INOUT);
+
+ private final PParameter parameter_e = new PParameter("e", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Entry")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_t, parameter_e);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.incomingToEntry";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("t","e");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_t = body.getOrCreateVariableByName("t");
+ PVariable var_e = body.getOrCreateVariableByName("e");
+ PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_t), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Transition")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Entry")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_t, parameter_t),
+ new ExportedParameter(body, var_e, parameter_e)
+ ));
+ // find transition(t, _, e)
+ new PositivePatternCall(body, Tuples.flatTupleOf(var_t, var___0_, var_e), ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Transition.instance().getInternalQueryRepresentation());
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("e")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/MultipleTransitionFromEntry.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/MultipleTransitionFromEntry.java
new file mode 100644
index 00000000..e4c1bac5
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/MultipleTransitionFromEntry.java
@@ -0,0 +1,827 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {e})
+ * pattern multipleTransitionFromEntry(e : Entry, t1 : Transition, t2: Transition) {
+ * Entry.outgoingTransitions(e,t1);
+ * Entry.outgoingTransitions(e,t2);
+ * t1!=t2;
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class MultipleTransitionFromEntry extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.multipleTransitionFromEntry pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Entry fE;
+
+ private Transition fT1;
+
+ private Transition fT2;
+
+ private static List parameterNames = makeImmutableList("e", "t1", "t2");
+
+ private Match(final Entry pE, final Transition pT1, final Transition pT2) {
+ this.fE = pE;
+ this.fT1 = pT1;
+ this.fT2 = pT2;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("e".equals(parameterName)) return this.fE;
+ if ("t1".equals(parameterName)) return this.fT1;
+ if ("t2".equals(parameterName)) return this.fT2;
+ return null;
+ }
+
+ public Entry getE() {
+ return this.fE;
+ }
+
+ public Transition getT1() {
+ return this.fT1;
+ }
+
+ public Transition getT2() {
+ return this.fT2;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("e".equals(parameterName) ) {
+ this.fE = (Entry) newValue;
+ return true;
+ }
+ if ("t1".equals(parameterName) ) {
+ this.fT1 = (Transition) newValue;
+ return true;
+ }
+ if ("t2".equals(parameterName) ) {
+ this.fT2 = (Transition) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setE(final Entry pE) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fE = pE;
+ }
+
+ public void setT1(final Transition pT1) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fT1 = pT1;
+ }
+
+ public void setT2(final Transition pT2) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fT2 = pT2;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.multipleTransitionFromEntry";
+ }
+
+ @Override
+ public List parameterNames() {
+ return MultipleTransitionFromEntry.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fE, fT1, fT2};
+ }
+
+ @Override
+ public MultipleTransitionFromEntry.Match toImmutable() {
+ return isMutable() ? newMatch(fE, fT1, fT2) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"e\"=" + prettyPrintValue(fE) + ", ");
+ result.append("\"t1\"=" + prettyPrintValue(fT1) + ", ");
+ result.append("\"t2\"=" + prettyPrintValue(fT2));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fE, fT1, fT2);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof MultipleTransitionFromEntry.Match)) {
+ MultipleTransitionFromEntry.Match other = (MultipleTransitionFromEntry.Match) obj;
+ return Objects.equals(fE, other.fE) && Objects.equals(fT1, other.fT1) && Objects.equals(fT2, other.fT2);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public MultipleTransitionFromEntry specification() {
+ return MultipleTransitionFromEntry.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static MultipleTransitionFromEntry.Match newEmptyMatch() {
+ return new Mutable(null, null, null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param pT1 the fixed value of pattern parameter t1, or null if not bound.
+ * @param pT2 the fixed value of pattern parameter t2, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static MultipleTransitionFromEntry.Match newMutableMatch(final Entry pE, final Transition pT1, final Transition pT2) {
+ return new Mutable(pE, pT1, pT2);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param pT1 the fixed value of pattern parameter t1, or null if not bound.
+ * @param pT2 the fixed value of pattern parameter t2, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static MultipleTransitionFromEntry.Match newMatch(final Entry pE, final Transition pT1, final Transition pT2) {
+ return new Immutable(pE, pT1, pT2);
+ }
+
+ private static final class Mutable extends MultipleTransitionFromEntry.Match {
+ Mutable(final Entry pE, final Transition pT1, final Transition pT2) {
+ super(pE, pT1, pT2);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends MultipleTransitionFromEntry.Match {
+ Immutable(final Entry pE, final Transition pT1, final Transition pT2) {
+ super(pE, pT1, pT2);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.multipleTransitionFromEntry pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {e})
+ * pattern multipleTransitionFromEntry(e : Entry, t1 : Transition, t2: Transition) {
+ * Entry.outgoingTransitions(e,t1);
+ * Entry.outgoingTransitions(e,t2);
+ * t1!=t2;
+ * }
+ *
+ *
+ * @see Match
+ * @see MultipleTransitionFromEntry
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static MultipleTransitionFromEntry.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static MultipleTransitionFromEntry.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_E = 0;
+
+ private final static int POSITION_T1 = 1;
+
+ private final static int POSITION_T2 = 2;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(MultipleTransitionFromEntry.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param pT1 the fixed value of pattern parameter t1, or null if not bound.
+ * @param pT2 the fixed value of pattern parameter t2, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Entry pE, final Transition pT1, final Transition pT2) {
+ return rawStreamAllMatches(new Object[]{pE, pT1, pT2}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param pT1 the fixed value of pattern parameter t1, or null if not bound.
+ * @param pT2 the fixed value of pattern parameter t2, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Entry pE, final Transition pT1, final Transition pT2) {
+ return rawStreamAllMatches(new Object[]{pE, pT1, pT2});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param pT1 the fixed value of pattern parameter t1, or null if not bound.
+ * @param pT2 the fixed value of pattern parameter t2, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Entry pE, final Transition pT1, final Transition pT2) {
+ return rawGetOneArbitraryMatch(new Object[]{pE, pT1, pT2});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param pT1 the fixed value of pattern parameter t1, or null if not bound.
+ * @param pT2 the fixed value of pattern parameter t2, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Entry pE, final Transition pT1, final Transition pT2) {
+ return rawHasMatch(new Object[]{pE, pT1, pT2});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param pT1 the fixed value of pattern parameter t1, or null if not bound.
+ * @param pT2 the fixed value of pattern parameter t2, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Entry pE, final Transition pT1, final Transition pT2) {
+ return rawCountMatches(new Object[]{pE, pT1, pT2});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param pT1 the fixed value of pattern parameter t1, or null if not bound.
+ * @param pT2 the fixed value of pattern parameter t2, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Entry pE, final Transition pT1, final Transition pT2, final Consumer super MultipleTransitionFromEntry.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pE, pT1, pT2}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param pT1 the fixed value of pattern parameter t1, or null if not bound.
+ * @param pT2 the fixed value of pattern parameter t2, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public MultipleTransitionFromEntry.Match newMatch(final Entry pE, final Transition pT1, final Transition pT2) {
+ return MultipleTransitionFromEntry.Match.newMatch(pE, pT1, pT2);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfe(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_E, parameters).map(Entry.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe() {
+ return rawStreamAllValuesOfe(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe() {
+ return rawStreamAllValuesOfe(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe(final MultipleTransitionFromEntry.Match partialMatch) {
+ return rawStreamAllValuesOfe(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe(final Transition pT1, final Transition pT2) {
+ return rawStreamAllValuesOfe(new Object[]{null, pT1, pT2});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe(final MultipleTransitionFromEntry.Match partialMatch) {
+ return rawStreamAllValuesOfe(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe(final Transition pT1, final Transition pT2) {
+ return rawStreamAllValuesOfe(new Object[]{null, pT1, pT2}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOft1(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_T1, parameters).map(Transition.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft1() {
+ return rawStreamAllValuesOft1(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft1() {
+ return rawStreamAllValuesOft1(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t1.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft1(final MultipleTransitionFromEntry.Match partialMatch) {
+ return rawStreamAllValuesOft1(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t1.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft1(final Entry pE, final Transition pT2) {
+ return rawStreamAllValuesOft1(new Object[]{pE, null, pT2});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft1(final MultipleTransitionFromEntry.Match partialMatch) {
+ return rawStreamAllValuesOft1(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft1(final Entry pE, final Transition pT2) {
+ return rawStreamAllValuesOft1(new Object[]{pE, null, pT2}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t2.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOft2(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_T2, parameters).map(Transition.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t2.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft2() {
+ return rawStreamAllValuesOft2(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t2.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft2() {
+ return rawStreamAllValuesOft2(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t2.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft2(final MultipleTransitionFromEntry.Match partialMatch) {
+ return rawStreamAllValuesOft2(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t2.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft2(final Entry pE, final Transition pT1) {
+ return rawStreamAllValuesOft2(new Object[]{pE, pT1, null});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t2.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft2(final MultipleTransitionFromEntry.Match partialMatch) {
+ return rawStreamAllValuesOft2(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t2.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft2(final Entry pE, final Transition pT1) {
+ return rawStreamAllValuesOft2(new Object[]{pE, pT1, null}).collect(Collectors.toSet());
+ }
+
+ @Override
+ protected MultipleTransitionFromEntry.Match tupleToMatch(final Tuple t) {
+ try {
+ return MultipleTransitionFromEntry.Match.newMatch((Entry) t.get(POSITION_E), (Transition) t.get(POSITION_T1), (Transition) t.get(POSITION_T2));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected MultipleTransitionFromEntry.Match arrayToMatch(final Object[] match) {
+ try {
+ return MultipleTransitionFromEntry.Match.newMatch((Entry) match[POSITION_E], (Transition) match[POSITION_T1], (Transition) match[POSITION_T2]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected MultipleTransitionFromEntry.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return MultipleTransitionFromEntry.Match.newMutableMatch((Entry) match[POSITION_E], (Transition) match[POSITION_T1], (Transition) match[POSITION_T2]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return MultipleTransitionFromEntry.instance();
+ }
+ }
+
+ private MultipleTransitionFromEntry() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static MultipleTransitionFromEntry instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected MultipleTransitionFromEntry.Matcher instantiate(final ViatraQueryEngine engine) {
+ return MultipleTransitionFromEntry.Matcher.on(engine);
+ }
+
+ @Override
+ public MultipleTransitionFromEntry.Matcher instantiate() {
+ return MultipleTransitionFromEntry.Matcher.create();
+ }
+
+ @Override
+ public MultipleTransitionFromEntry.Match newEmptyMatch() {
+ return MultipleTransitionFromEntry.Match.newEmptyMatch();
+ }
+
+ @Override
+ public MultipleTransitionFromEntry.Match newMatch(final Object... parameters) {
+ return MultipleTransitionFromEntry.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry) parameters[0], (ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition) parameters[1], (ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition) parameters[2]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.MultipleTransitionFromEntry (visibility: PUBLIC, simpleName: MultipleTransitionFromEntry, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.MultipleTransitionFromEntry, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.MultipleTransitionFromEntry (visibility: PUBLIC, simpleName: MultipleTransitionFromEntry, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.MultipleTransitionFromEntry, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static MultipleTransitionFromEntry INSTANCE = new MultipleTransitionFromEntry();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static MultipleTransitionFromEntry.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_e = new PParameter("e", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Entry")), PParameterDirection.INOUT);
+
+ private final PParameter parameter_t1 = new PParameter("t1", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Transition")), PParameterDirection.INOUT);
+
+ private final PParameter parameter_t2 = new PParameter("t2", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Transition")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_e, parameter_t1, parameter_t2);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.multipleTransitionFromEntry";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("e","t1","t2");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_e = body.getOrCreateVariableByName("e");
+ PVariable var_t1 = body.getOrCreateVariableByName("t1");
+ PVariable var_t2 = body.getOrCreateVariableByName("t2");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Entry")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_t1), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Transition")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_t2), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Transition")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_e, parameter_e),
+ new ExportedParameter(body, var_t1, parameter_t1),
+ new ExportedParameter(body, var_t2, parameter_t2)
+ ));
+ // Entry.outgoingTransitions(e,t1)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Entry")));
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("YakinduMetamodel", "Vertex", "outgoingTransitions")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Transition")));
+ new Equality(body, var__virtual_0_, var_t1);
+ // Entry.outgoingTransitions(e,t2)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Entry")));
+ PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("YakinduMetamodel", "Vertex", "outgoingTransitions")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Transition")));
+ new Equality(body, var__virtual_1_, var_t2);
+ // t1!=t2
+ new Inequality(body, var_t1, var_t2);
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("e")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoEntryInRegion.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoEntryInRegion.java
new file mode 100644
index 00000000..c1f7df4a
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoEntryInRegion.java
@@ -0,0 +1,550 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.EntryInRegion;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {r1})
+ * pattern noEntryInRegion(r1 : Region) {
+ * neg find entryInRegion(r1, _);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class NoEntryInRegion extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noEntryInRegion pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Region fR1;
+
+ private static List parameterNames = makeImmutableList("r1");
+
+ private Match(final Region pR1) {
+ this.fR1 = pR1;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("r1".equals(parameterName)) return this.fR1;
+ return null;
+ }
+
+ public Region getR1() {
+ return this.fR1;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("r1".equals(parameterName) ) {
+ this.fR1 = (Region) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setR1(final Region pR1) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fR1 = pR1;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noEntryInRegion";
+ }
+
+ @Override
+ public List parameterNames() {
+ return NoEntryInRegion.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fR1};
+ }
+
+ @Override
+ public NoEntryInRegion.Match toImmutable() {
+ return isMutable() ? newMatch(fR1) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"r1\"=" + prettyPrintValue(fR1));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fR1);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof NoEntryInRegion.Match)) {
+ NoEntryInRegion.Match other = (NoEntryInRegion.Match) obj;
+ return Objects.equals(fR1, other.fR1);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public NoEntryInRegion specification() {
+ return NoEntryInRegion.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static NoEntryInRegion.Match newEmptyMatch() {
+ return new Mutable(null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static NoEntryInRegion.Match newMutableMatch(final Region pR1) {
+ return new Mutable(pR1);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static NoEntryInRegion.Match newMatch(final Region pR1) {
+ return new Immutable(pR1);
+ }
+
+ private static final class Mutable extends NoEntryInRegion.Match {
+ Mutable(final Region pR1) {
+ super(pR1);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends NoEntryInRegion.Match {
+ Immutable(final Region pR1) {
+ super(pR1);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noEntryInRegion pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {r1})
+ * pattern noEntryInRegion(r1 : Region) {
+ * neg find entryInRegion(r1, _);
+ * }
+ *
+ *
+ * @see Match
+ * @see NoEntryInRegion
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static NoEntryInRegion.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static NoEntryInRegion.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_R1 = 0;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(NoEntryInRegion.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Region pR1) {
+ return rawStreamAllMatches(new Object[]{pR1}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Region pR1) {
+ return rawStreamAllMatches(new Object[]{pR1});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Region pR1) {
+ return rawGetOneArbitraryMatch(new Object[]{pR1});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Region pR1) {
+ return rawHasMatch(new Object[]{pR1});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Region pR1) {
+ return rawCountMatches(new Object[]{pR1});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Region pR1, final Consumer super NoEntryInRegion.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pR1}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pR1 the fixed value of pattern parameter r1, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public NoEntryInRegion.Match newMatch(final Region pR1) {
+ return NoEntryInRegion.Match.newMatch(pR1);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for r1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfr1(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_R1, parameters).map(Region.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for r1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfr1() {
+ return rawStreamAllValuesOfr1(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for r1.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfr1() {
+ return rawStreamAllValuesOfr1(emptyArray());
+ }
+
+ @Override
+ protected NoEntryInRegion.Match tupleToMatch(final Tuple t) {
+ try {
+ return NoEntryInRegion.Match.newMatch((Region) t.get(POSITION_R1));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected NoEntryInRegion.Match arrayToMatch(final Object[] match) {
+ try {
+ return NoEntryInRegion.Match.newMatch((Region) match[POSITION_R1]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected NoEntryInRegion.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return NoEntryInRegion.Match.newMutableMatch((Region) match[POSITION_R1]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return NoEntryInRegion.instance();
+ }
+ }
+
+ private NoEntryInRegion() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static NoEntryInRegion instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected NoEntryInRegion.Matcher instantiate(final ViatraQueryEngine engine) {
+ return NoEntryInRegion.Matcher.on(engine);
+ }
+
+ @Override
+ public NoEntryInRegion.Matcher instantiate() {
+ return NoEntryInRegion.Matcher.create();
+ }
+
+ @Override
+ public NoEntryInRegion.Match newEmptyMatch() {
+ return NoEntryInRegion.Match.newEmptyMatch();
+ }
+
+ @Override
+ public NoEntryInRegion.Match newMatch(final Object... parameters) {
+ return NoEntryInRegion.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region) parameters[0]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoEntryInRegion (visibility: PUBLIC, simpleName: NoEntryInRegion, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoEntryInRegion, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoEntryInRegion (visibility: PUBLIC, simpleName: NoEntryInRegion, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoEntryInRegion, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static NoEntryInRegion INSTANCE = new NoEntryInRegion();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static NoEntryInRegion.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_r1 = new PParameter("r1", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Region")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_r1);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noEntryInRegion";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("r1");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_r1 = body.getOrCreateVariableByName("r1");
+ PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_r1), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Region")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_r1, parameter_r1)
+ ));
+ // neg find entryInRegion(r1, _)
+ new NegativePatternCall(body, Tuples.flatTupleOf(var_r1, var___0_), EntryInRegion.instance().getInternalQueryRepresentation());
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("r1")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoOutgoingTransitionFromEntry.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoOutgoingTransitionFromEntry.java
new file mode 100644
index 00000000..d9a3de50
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoOutgoingTransitionFromEntry.java
@@ -0,0 +1,551 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {e})
+ * pattern noOutgoingTransitionFromEntry(e : Entry) {
+ * neg find transition(_, e, _);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class NoOutgoingTransitionFromEntry extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noOutgoingTransitionFromEntry pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Entry fE;
+
+ private static List parameterNames = makeImmutableList("e");
+
+ private Match(final Entry pE) {
+ this.fE = pE;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("e".equals(parameterName)) return this.fE;
+ return null;
+ }
+
+ public Entry getE() {
+ return this.fE;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("e".equals(parameterName) ) {
+ this.fE = (Entry) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setE(final Entry pE) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fE = pE;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noOutgoingTransitionFromEntry";
+ }
+
+ @Override
+ public List parameterNames() {
+ return NoOutgoingTransitionFromEntry.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fE};
+ }
+
+ @Override
+ public NoOutgoingTransitionFromEntry.Match toImmutable() {
+ return isMutable() ? newMatch(fE) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"e\"=" + prettyPrintValue(fE));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fE);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof NoOutgoingTransitionFromEntry.Match)) {
+ NoOutgoingTransitionFromEntry.Match other = (NoOutgoingTransitionFromEntry.Match) obj;
+ return Objects.equals(fE, other.fE);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public NoOutgoingTransitionFromEntry specification() {
+ return NoOutgoingTransitionFromEntry.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static NoOutgoingTransitionFromEntry.Match newEmptyMatch() {
+ return new Mutable(null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static NoOutgoingTransitionFromEntry.Match newMutableMatch(final Entry pE) {
+ return new Mutable(pE);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static NoOutgoingTransitionFromEntry.Match newMatch(final Entry pE) {
+ return new Immutable(pE);
+ }
+
+ private static final class Mutable extends NoOutgoingTransitionFromEntry.Match {
+ Mutable(final Entry pE) {
+ super(pE);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends NoOutgoingTransitionFromEntry.Match {
+ Immutable(final Entry pE) {
+ super(pE);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noOutgoingTransitionFromEntry pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {e})
+ * pattern noOutgoingTransitionFromEntry(e : Entry) {
+ * neg find transition(_, e, _);
+ * }
+ *
+ *
+ * @see Match
+ * @see NoOutgoingTransitionFromEntry
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static NoOutgoingTransitionFromEntry.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static NoOutgoingTransitionFromEntry.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_E = 0;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(NoOutgoingTransitionFromEntry.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Entry pE) {
+ return rawStreamAllMatches(new Object[]{pE}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Entry pE) {
+ return rawStreamAllMatches(new Object[]{pE});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Entry pE) {
+ return rawGetOneArbitraryMatch(new Object[]{pE});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Entry pE) {
+ return rawHasMatch(new Object[]{pE});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Entry pE) {
+ return rawCountMatches(new Object[]{pE});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Entry pE, final Consumer super NoOutgoingTransitionFromEntry.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pE}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public NoOutgoingTransitionFromEntry.Match newMatch(final Entry pE) {
+ return NoOutgoingTransitionFromEntry.Match.newMatch(pE);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfe(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_E, parameters).map(Entry.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe() {
+ return rawStreamAllValuesOfe(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe() {
+ return rawStreamAllValuesOfe(emptyArray());
+ }
+
+ @Override
+ protected NoOutgoingTransitionFromEntry.Match tupleToMatch(final Tuple t) {
+ try {
+ return NoOutgoingTransitionFromEntry.Match.newMatch((Entry) t.get(POSITION_E));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected NoOutgoingTransitionFromEntry.Match arrayToMatch(final Object[] match) {
+ try {
+ return NoOutgoingTransitionFromEntry.Match.newMatch((Entry) match[POSITION_E]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected NoOutgoingTransitionFromEntry.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return NoOutgoingTransitionFromEntry.Match.newMutableMatch((Entry) match[POSITION_E]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return NoOutgoingTransitionFromEntry.instance();
+ }
+ }
+
+ private NoOutgoingTransitionFromEntry() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static NoOutgoingTransitionFromEntry instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected NoOutgoingTransitionFromEntry.Matcher instantiate(final ViatraQueryEngine engine) {
+ return NoOutgoingTransitionFromEntry.Matcher.on(engine);
+ }
+
+ @Override
+ public NoOutgoingTransitionFromEntry.Matcher instantiate() {
+ return NoOutgoingTransitionFromEntry.Matcher.create();
+ }
+
+ @Override
+ public NoOutgoingTransitionFromEntry.Match newEmptyMatch() {
+ return NoOutgoingTransitionFromEntry.Match.newEmptyMatch();
+ }
+
+ @Override
+ public NoOutgoingTransitionFromEntry.Match newMatch(final Object... parameters) {
+ return NoOutgoingTransitionFromEntry.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry) parameters[0]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoOutgoingTransitionFromEntry (visibility: PUBLIC, simpleName: NoOutgoingTransitionFromEntry, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoOutgoingTransitionFromEntry, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoOutgoingTransitionFromEntry (visibility: PUBLIC, simpleName: NoOutgoingTransitionFromEntry, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoOutgoingTransitionFromEntry, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static NoOutgoingTransitionFromEntry INSTANCE = new NoOutgoingTransitionFromEntry();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static NoOutgoingTransitionFromEntry.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_e = new PParameter("e", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Entry")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_e);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noOutgoingTransitionFromEntry";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("e");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_e = body.getOrCreateVariableByName("e");
+ PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
+ PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Entry")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_e, parameter_e)
+ ));
+ // neg find transition(_, e, _)
+ new NegativePatternCall(body, Tuples.flatTupleOf(var___0_, var_e, var___1_), Transition.instance().getInternalQueryRepresentation());
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("e")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoStateInRegion.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoStateInRegion.java
new file mode 100644
index 00000000..841339ae
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NoStateInRegion.java
@@ -0,0 +1,558 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.StateInRegion;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * /////////
+ * // State vs Region
+ * /////////
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {region})
+ * pattern noStateInRegion(region: Region) {
+ * neg find StateInRegion(region,_);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class NoStateInRegion extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noStateInRegion pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Region fRegion;
+
+ private static List parameterNames = makeImmutableList("region");
+
+ private Match(final Region pRegion) {
+ this.fRegion = pRegion;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("region".equals(parameterName)) return this.fRegion;
+ return null;
+ }
+
+ public Region getRegion() {
+ return this.fRegion;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("region".equals(parameterName) ) {
+ this.fRegion = (Region) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setRegion(final Region pRegion) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fRegion = pRegion;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noStateInRegion";
+ }
+
+ @Override
+ public List parameterNames() {
+ return NoStateInRegion.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fRegion};
+ }
+
+ @Override
+ public NoStateInRegion.Match toImmutable() {
+ return isMutable() ? newMatch(fRegion) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"region\"=" + prettyPrintValue(fRegion));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fRegion);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof NoStateInRegion.Match)) {
+ NoStateInRegion.Match other = (NoStateInRegion.Match) obj;
+ return Objects.equals(fRegion, other.fRegion);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public NoStateInRegion specification() {
+ return NoStateInRegion.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static NoStateInRegion.Match newEmptyMatch() {
+ return new Mutable(null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static NoStateInRegion.Match newMutableMatch(final Region pRegion) {
+ return new Mutable(pRegion);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static NoStateInRegion.Match newMatch(final Region pRegion) {
+ return new Immutable(pRegion);
+ }
+
+ private static final class Mutable extends NoStateInRegion.Match {
+ Mutable(final Region pRegion) {
+ super(pRegion);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends NoStateInRegion.Match {
+ Immutable(final Region pRegion) {
+ super(pRegion);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noStateInRegion pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * /////////
+ * // State vs Region
+ * /////////
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {region})
+ * pattern noStateInRegion(region: Region) {
+ * neg find StateInRegion(region,_);
+ * }
+ *
+ *
+ * @see Match
+ * @see NoStateInRegion
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static NoStateInRegion.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static NoStateInRegion.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_REGION = 0;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(NoStateInRegion.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Region pRegion) {
+ return rawStreamAllMatches(new Object[]{pRegion}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Region pRegion) {
+ return rawStreamAllMatches(new Object[]{pRegion});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Region pRegion) {
+ return rawGetOneArbitraryMatch(new Object[]{pRegion});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Region pRegion) {
+ return rawHasMatch(new Object[]{pRegion});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Region pRegion) {
+ return rawCountMatches(new Object[]{pRegion});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Region pRegion, final Consumer super NoStateInRegion.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pRegion}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public NoStateInRegion.Match newMatch(final Region pRegion) {
+ return NoStateInRegion.Match.newMatch(pRegion);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for region.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfregion(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_REGION, parameters).map(Region.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for region.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfregion() {
+ return rawStreamAllValuesOfregion(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for region.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfregion() {
+ return rawStreamAllValuesOfregion(emptyArray());
+ }
+
+ @Override
+ protected NoStateInRegion.Match tupleToMatch(final Tuple t) {
+ try {
+ return NoStateInRegion.Match.newMatch((Region) t.get(POSITION_REGION));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected NoStateInRegion.Match arrayToMatch(final Object[] match) {
+ try {
+ return NoStateInRegion.Match.newMatch((Region) match[POSITION_REGION]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected NoStateInRegion.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return NoStateInRegion.Match.newMutableMatch((Region) match[POSITION_REGION]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return NoStateInRegion.instance();
+ }
+ }
+
+ private NoStateInRegion() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static NoStateInRegion instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected NoStateInRegion.Matcher instantiate(final ViatraQueryEngine engine) {
+ return NoStateInRegion.Matcher.on(engine);
+ }
+
+ @Override
+ public NoStateInRegion.Matcher instantiate() {
+ return NoStateInRegion.Matcher.create();
+ }
+
+ @Override
+ public NoStateInRegion.Match newEmptyMatch() {
+ return NoStateInRegion.Match.newEmptyMatch();
+ }
+
+ @Override
+ public NoStateInRegion.Match newMatch(final Object... parameters) {
+ return NoStateInRegion.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region) parameters[0]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoStateInRegion (visibility: PUBLIC, simpleName: NoStateInRegion, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoStateInRegion, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoStateInRegion (visibility: PUBLIC, simpleName: NoStateInRegion, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NoStateInRegion, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static NoStateInRegion INSTANCE = new NoStateInRegion();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static NoStateInRegion.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_region = new PParameter("region", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Region")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_region);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.noStateInRegion";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("region");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_region = body.getOrCreateVariableByName("region");
+ PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_region), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Region")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_region, parameter_region)
+ ));
+ // neg find StateInRegion(region,_)
+ new NegativePatternCall(body, Tuples.flatTupleOf(var_region, var___0_), StateInRegion.instance().getInternalQueryRepresentation());
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("region")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NotSynchronizingStates.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NotSynchronizingStates.java
new file mode 100644
index 00000000..b9a60ca9
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/NotSynchronizingStates.java
@@ -0,0 +1,554 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleIncomingTrainsition;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.HasMultipleOutgoingTrainsition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {s})
+ * pattern notSynchronizingStates(s : Synchronization) {
+ * neg find hasMultipleOutgoingTrainsition(s);
+ * neg find hasMultipleIncomingTrainsition(s);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class NotSynchronizingStates extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.notSynchronizingStates pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Synchronization fS;
+
+ private static List parameterNames = makeImmutableList("s");
+
+ private Match(final Synchronization pS) {
+ this.fS = pS;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("s".equals(parameterName)) return this.fS;
+ return null;
+ }
+
+ public Synchronization getS() {
+ return this.fS;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("s".equals(parameterName) ) {
+ this.fS = (Synchronization) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setS(final Synchronization pS) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fS = pS;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.notSynchronizingStates";
+ }
+
+ @Override
+ public List parameterNames() {
+ return NotSynchronizingStates.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fS};
+ }
+
+ @Override
+ public NotSynchronizingStates.Match toImmutable() {
+ return isMutable() ? newMatch(fS) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"s\"=" + prettyPrintValue(fS));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fS);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof NotSynchronizingStates.Match)) {
+ NotSynchronizingStates.Match other = (NotSynchronizingStates.Match) obj;
+ return Objects.equals(fS, other.fS);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public NotSynchronizingStates specification() {
+ return NotSynchronizingStates.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static NotSynchronizingStates.Match newEmptyMatch() {
+ return new Mutable(null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static NotSynchronizingStates.Match newMutableMatch(final Synchronization pS) {
+ return new Mutable(pS);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static NotSynchronizingStates.Match newMatch(final Synchronization pS) {
+ return new Immutable(pS);
+ }
+
+ private static final class Mutable extends NotSynchronizingStates.Match {
+ Mutable(final Synchronization pS) {
+ super(pS);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends NotSynchronizingStates.Match {
+ Immutable(final Synchronization pS) {
+ super(pS);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.notSynchronizingStates pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {s})
+ * pattern notSynchronizingStates(s : Synchronization) {
+ * neg find hasMultipleOutgoingTrainsition(s);
+ * neg find hasMultipleIncomingTrainsition(s);
+ * }
+ *
+ *
+ * @see Match
+ * @see NotSynchronizingStates
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static NotSynchronizingStates.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static NotSynchronizingStates.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_S = 0;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(NotSynchronizingStates.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Synchronization pS) {
+ return rawStreamAllMatches(new Object[]{pS}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Synchronization pS) {
+ return rawStreamAllMatches(new Object[]{pS});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Synchronization pS) {
+ return rawGetOneArbitraryMatch(new Object[]{pS});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Synchronization pS) {
+ return rawHasMatch(new Object[]{pS});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Synchronization pS) {
+ return rawCountMatches(new Object[]{pS});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Synchronization pS, final Consumer super NotSynchronizingStates.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pS}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public NotSynchronizingStates.Match newMatch(final Synchronization pS) {
+ return NotSynchronizingStates.Match.newMatch(pS);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for s.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfs(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_S, parameters).map(Synchronization.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for s.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfs() {
+ return rawStreamAllValuesOfs(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for s.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfs() {
+ return rawStreamAllValuesOfs(emptyArray());
+ }
+
+ @Override
+ protected NotSynchronizingStates.Match tupleToMatch(final Tuple t) {
+ try {
+ return NotSynchronizingStates.Match.newMatch((Synchronization) t.get(POSITION_S));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected NotSynchronizingStates.Match arrayToMatch(final Object[] match) {
+ try {
+ return NotSynchronizingStates.Match.newMatch((Synchronization) match[POSITION_S]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected NotSynchronizingStates.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return NotSynchronizingStates.Match.newMutableMatch((Synchronization) match[POSITION_S]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return NotSynchronizingStates.instance();
+ }
+ }
+
+ private NotSynchronizingStates() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static NotSynchronizingStates instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected NotSynchronizingStates.Matcher instantiate(final ViatraQueryEngine engine) {
+ return NotSynchronizingStates.Matcher.on(engine);
+ }
+
+ @Override
+ public NotSynchronizingStates.Matcher instantiate() {
+ return NotSynchronizingStates.Matcher.create();
+ }
+
+ @Override
+ public NotSynchronizingStates.Match newEmptyMatch() {
+ return NotSynchronizingStates.Match.newEmptyMatch();
+ }
+
+ @Override
+ public NotSynchronizingStates.Match newMatch(final Object... parameters) {
+ return NotSynchronizingStates.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization) parameters[0]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NotSynchronizingStates (visibility: PUBLIC, simpleName: NotSynchronizingStates, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NotSynchronizingStates, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NotSynchronizingStates (visibility: PUBLIC, simpleName: NotSynchronizingStates, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.NotSynchronizingStates, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static NotSynchronizingStates INSTANCE = new NotSynchronizingStates();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static NotSynchronizingStates.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_s = new PParameter("s", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Synchronization")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_s);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.notSynchronizingStates";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("s");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_s = body.getOrCreateVariableByName("s");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_s), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Synchronization")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_s, parameter_s)
+ ));
+ // neg find hasMultipleOutgoingTrainsition(s)
+ new NegativePatternCall(body, Tuples.flatTupleOf(var_s), HasMultipleOutgoingTrainsition.instance().getInternalQueryRepresentation());
+ // neg find hasMultipleIncomingTrainsition(s)
+ new NegativePatternCall(body, Tuples.flatTupleOf(var_s), HasMultipleIncomingTrainsition.instance().getInternalQueryRepresentation());
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("s")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/OutgoingFromExit.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/OutgoingFromExit.java
new file mode 100644
index 00000000..10f0e056
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/OutgoingFromExit.java
@@ -0,0 +1,715 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * /////////
+ * // Exit
+ * /////////
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {e})
+ * pattern outgoingFromExit(t : Transition, e : Exit) {
+ * Exit.outgoingTransitions(e,t);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class OutgoingFromExit extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.outgoingFromExit pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Transition fT;
+
+ private Exit fE;
+
+ private static List parameterNames = makeImmutableList("t", "e");
+
+ private Match(final Transition pT, final Exit pE) {
+ this.fT = pT;
+ this.fE = pE;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("t".equals(parameterName)) return this.fT;
+ if ("e".equals(parameterName)) return this.fE;
+ return null;
+ }
+
+ public Transition getT() {
+ return this.fT;
+ }
+
+ public Exit getE() {
+ return this.fE;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("t".equals(parameterName) ) {
+ this.fT = (Transition) newValue;
+ return true;
+ }
+ if ("e".equals(parameterName) ) {
+ this.fE = (Exit) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setT(final Transition pT) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fT = pT;
+ }
+
+ public void setE(final Exit pE) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fE = pE;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.outgoingFromExit";
+ }
+
+ @Override
+ public List parameterNames() {
+ return OutgoingFromExit.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fT, fE};
+ }
+
+ @Override
+ public OutgoingFromExit.Match toImmutable() {
+ return isMutable() ? newMatch(fT, fE) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"t\"=" + prettyPrintValue(fT) + ", ");
+ result.append("\"e\"=" + prettyPrintValue(fE));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fT, fE);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof OutgoingFromExit.Match)) {
+ OutgoingFromExit.Match other = (OutgoingFromExit.Match) obj;
+ return Objects.equals(fT, other.fT) && Objects.equals(fE, other.fE);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public OutgoingFromExit specification() {
+ return OutgoingFromExit.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static OutgoingFromExit.Match newEmptyMatch() {
+ return new Mutable(null, null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static OutgoingFromExit.Match newMutableMatch(final Transition pT, final Exit pE) {
+ return new Mutable(pT, pE);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static OutgoingFromExit.Match newMatch(final Transition pT, final Exit pE) {
+ return new Immutable(pT, pE);
+ }
+
+ private static final class Mutable extends OutgoingFromExit.Match {
+ Mutable(final Transition pT, final Exit pE) {
+ super(pT, pE);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends OutgoingFromExit.Match {
+ Immutable(final Transition pT, final Exit pE) {
+ super(pT, pE);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.outgoingFromExit pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * /////////
+ * // Exit
+ * /////////
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {e})
+ * pattern outgoingFromExit(t : Transition, e : Exit) {
+ * Exit.outgoingTransitions(e,t);
+ * }
+ *
+ *
+ * @see Match
+ * @see OutgoingFromExit
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static OutgoingFromExit.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static OutgoingFromExit.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_T = 0;
+
+ private final static int POSITION_E = 1;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(OutgoingFromExit.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Transition pT, final Exit pE) {
+ return rawStreamAllMatches(new Object[]{pT, pE}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Transition pT, final Exit pE) {
+ return rawStreamAllMatches(new Object[]{pT, pE});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Transition pT, final Exit pE) {
+ return rawGetOneArbitraryMatch(new Object[]{pT, pE});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Transition pT, final Exit pE) {
+ return rawHasMatch(new Object[]{pT, pE});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Transition pT, final Exit pE) {
+ return rawCountMatches(new Object[]{pT, pE});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Transition pT, final Exit pE, final Consumer super OutgoingFromExit.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pT, pE}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pE the fixed value of pattern parameter e, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public OutgoingFromExit.Match newMatch(final Transition pT, final Exit pE) {
+ return OutgoingFromExit.Match.newMatch(pT, pE);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOft(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_T, parameters).map(Transition.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft() {
+ return rawStreamAllValuesOft(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft() {
+ return rawStreamAllValuesOft(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft(final OutgoingFromExit.Match partialMatch) {
+ return rawStreamAllValuesOft(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft(final Exit pE) {
+ return rawStreamAllValuesOft(new Object[]{null, pE});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft(final OutgoingFromExit.Match partialMatch) {
+ return rawStreamAllValuesOft(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft(final Exit pE) {
+ return rawStreamAllValuesOft(new Object[]{null, pE}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfe(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_E, parameters).map(Exit.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe() {
+ return rawStreamAllValuesOfe(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe() {
+ return rawStreamAllValuesOfe(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe(final OutgoingFromExit.Match partialMatch) {
+ return rawStreamAllValuesOfe(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfe(final Transition pT) {
+ return rawStreamAllValuesOfe(new Object[]{pT, null});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe(final OutgoingFromExit.Match partialMatch) {
+ return rawStreamAllValuesOfe(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for e.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfe(final Transition pT) {
+ return rawStreamAllValuesOfe(new Object[]{pT, null}).collect(Collectors.toSet());
+ }
+
+ @Override
+ protected OutgoingFromExit.Match tupleToMatch(final Tuple t) {
+ try {
+ return OutgoingFromExit.Match.newMatch((Transition) t.get(POSITION_T), (Exit) t.get(POSITION_E));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected OutgoingFromExit.Match arrayToMatch(final Object[] match) {
+ try {
+ return OutgoingFromExit.Match.newMatch((Transition) match[POSITION_T], (Exit) match[POSITION_E]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected OutgoingFromExit.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return OutgoingFromExit.Match.newMutableMatch((Transition) match[POSITION_T], (Exit) match[POSITION_E]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return OutgoingFromExit.instance();
+ }
+ }
+
+ private OutgoingFromExit() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static OutgoingFromExit instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected OutgoingFromExit.Matcher instantiate(final ViatraQueryEngine engine) {
+ return OutgoingFromExit.Matcher.on(engine);
+ }
+
+ @Override
+ public OutgoingFromExit.Matcher instantiate() {
+ return OutgoingFromExit.Matcher.create();
+ }
+
+ @Override
+ public OutgoingFromExit.Match newEmptyMatch() {
+ return OutgoingFromExit.Match.newEmptyMatch();
+ }
+
+ @Override
+ public OutgoingFromExit.Match newMatch(final Object... parameters) {
+ return OutgoingFromExit.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition) parameters[0], (ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit) parameters[1]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.OutgoingFromExit (visibility: PUBLIC, simpleName: OutgoingFromExit, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.OutgoingFromExit, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.OutgoingFromExit (visibility: PUBLIC, simpleName: OutgoingFromExit, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.OutgoingFromExit, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static OutgoingFromExit INSTANCE = new OutgoingFromExit();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static OutgoingFromExit.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_t = new PParameter("t", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Transition")), PParameterDirection.INOUT);
+
+ private final PParameter parameter_e = new PParameter("e", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Exit")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_t, parameter_e);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.outgoingFromExit";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("t","e");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_t = body.getOrCreateVariableByName("t");
+ PVariable var_e = body.getOrCreateVariableByName("e");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_t), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Transition")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Exit")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_t, parameter_t),
+ new ExportedParameter(body, var_e, parameter_e)
+ ));
+ // Exit.outgoingTransitions(e,t)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Exit")));
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_e, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("YakinduMetamodel", "Vertex", "outgoingTransitions")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Transition")));
+ new Equality(body, var__virtual_0_, var_t);
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("e")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/OutgoingFromFinal.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/OutgoingFromFinal.java
new file mode 100644
index 00000000..fbac352b
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/OutgoingFromFinal.java
@@ -0,0 +1,715 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * /////////
+ * // Final
+ * /////////
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {f})
+ * pattern outgoingFromFinal(t : Transition, f : FinalState) {
+ * FinalState.outgoingTransitions(f,t);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class OutgoingFromFinal extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.outgoingFromFinal pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Transition fT;
+
+ private FinalState fF;
+
+ private static List parameterNames = makeImmutableList("t", "f");
+
+ private Match(final Transition pT, final FinalState pF) {
+ this.fT = pT;
+ this.fF = pF;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("t".equals(parameterName)) return this.fT;
+ if ("f".equals(parameterName)) return this.fF;
+ return null;
+ }
+
+ public Transition getT() {
+ return this.fT;
+ }
+
+ public FinalState getF() {
+ return this.fF;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("t".equals(parameterName) ) {
+ this.fT = (Transition) newValue;
+ return true;
+ }
+ if ("f".equals(parameterName) ) {
+ this.fF = (FinalState) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setT(final Transition pT) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fT = pT;
+ }
+
+ public void setF(final FinalState pF) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fF = pF;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.outgoingFromFinal";
+ }
+
+ @Override
+ public List parameterNames() {
+ return OutgoingFromFinal.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fT, fF};
+ }
+
+ @Override
+ public OutgoingFromFinal.Match toImmutable() {
+ return isMutable() ? newMatch(fT, fF) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"t\"=" + prettyPrintValue(fT) + ", ");
+ result.append("\"f\"=" + prettyPrintValue(fF));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fT, fF);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof OutgoingFromFinal.Match)) {
+ OutgoingFromFinal.Match other = (OutgoingFromFinal.Match) obj;
+ return Objects.equals(fT, other.fT) && Objects.equals(fF, other.fF);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public OutgoingFromFinal specification() {
+ return OutgoingFromFinal.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static OutgoingFromFinal.Match newEmptyMatch() {
+ return new Mutable(null, null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pF the fixed value of pattern parameter f, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static OutgoingFromFinal.Match newMutableMatch(final Transition pT, final FinalState pF) {
+ return new Mutable(pT, pF);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pF the fixed value of pattern parameter f, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static OutgoingFromFinal.Match newMatch(final Transition pT, final FinalState pF) {
+ return new Immutable(pT, pF);
+ }
+
+ private static final class Mutable extends OutgoingFromFinal.Match {
+ Mutable(final Transition pT, final FinalState pF) {
+ super(pT, pF);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends OutgoingFromFinal.Match {
+ Immutable(final Transition pT, final FinalState pF) {
+ super(pT, pF);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.outgoingFromFinal pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * /////////
+ * // Final
+ * /////////
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {f})
+ * pattern outgoingFromFinal(t : Transition, f : FinalState) {
+ * FinalState.outgoingTransitions(f,t);
+ * }
+ *
+ *
+ * @see Match
+ * @see OutgoingFromFinal
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static OutgoingFromFinal.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static OutgoingFromFinal.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_T = 0;
+
+ private final static int POSITION_F = 1;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(OutgoingFromFinal.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pF the fixed value of pattern parameter f, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Transition pT, final FinalState pF) {
+ return rawStreamAllMatches(new Object[]{pT, pF}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pF the fixed value of pattern parameter f, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Transition pT, final FinalState pF) {
+ return rawStreamAllMatches(new Object[]{pT, pF});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pF the fixed value of pattern parameter f, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Transition pT, final FinalState pF) {
+ return rawGetOneArbitraryMatch(new Object[]{pT, pF});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pF the fixed value of pattern parameter f, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Transition pT, final FinalState pF) {
+ return rawHasMatch(new Object[]{pT, pF});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pF the fixed value of pattern parameter f, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Transition pT, final FinalState pF) {
+ return rawCountMatches(new Object[]{pT, pF});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pF the fixed value of pattern parameter f, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Transition pT, final FinalState pF, final Consumer super OutgoingFromFinal.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pT, pF}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pT the fixed value of pattern parameter t, or null if not bound.
+ * @param pF the fixed value of pattern parameter f, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public OutgoingFromFinal.Match newMatch(final Transition pT, final FinalState pF) {
+ return OutgoingFromFinal.Match.newMatch(pT, pF);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOft(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_T, parameters).map(Transition.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft() {
+ return rawStreamAllValuesOft(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft() {
+ return rawStreamAllValuesOft(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft(final OutgoingFromFinal.Match partialMatch) {
+ return rawStreamAllValuesOft(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOft(final FinalState pF) {
+ return rawStreamAllValuesOft(new Object[]{null, pF});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft(final OutgoingFromFinal.Match partialMatch) {
+ return rawStreamAllValuesOft(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for t.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOft(final FinalState pF) {
+ return rawStreamAllValuesOft(new Object[]{null, pF}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for f.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOff(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_F, parameters).map(FinalState.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for f.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOff() {
+ return rawStreamAllValuesOff(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for f.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOff() {
+ return rawStreamAllValuesOff(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for f.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOff(final OutgoingFromFinal.Match partialMatch) {
+ return rawStreamAllValuesOff(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for f.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOff(final Transition pT) {
+ return rawStreamAllValuesOff(new Object[]{pT, null});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for f.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOff(final OutgoingFromFinal.Match partialMatch) {
+ return rawStreamAllValuesOff(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for f.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOff(final Transition pT) {
+ return rawStreamAllValuesOff(new Object[]{pT, null}).collect(Collectors.toSet());
+ }
+
+ @Override
+ protected OutgoingFromFinal.Match tupleToMatch(final Tuple t) {
+ try {
+ return OutgoingFromFinal.Match.newMatch((Transition) t.get(POSITION_T), (FinalState) t.get(POSITION_F));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected OutgoingFromFinal.Match arrayToMatch(final Object[] match) {
+ try {
+ return OutgoingFromFinal.Match.newMatch((Transition) match[POSITION_T], (FinalState) match[POSITION_F]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected OutgoingFromFinal.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return OutgoingFromFinal.Match.newMutableMatch((Transition) match[POSITION_T], (FinalState) match[POSITION_F]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return OutgoingFromFinal.instance();
+ }
+ }
+
+ private OutgoingFromFinal() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static OutgoingFromFinal instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected OutgoingFromFinal.Matcher instantiate(final ViatraQueryEngine engine) {
+ return OutgoingFromFinal.Matcher.on(engine);
+ }
+
+ @Override
+ public OutgoingFromFinal.Matcher instantiate() {
+ return OutgoingFromFinal.Matcher.create();
+ }
+
+ @Override
+ public OutgoingFromFinal.Match newEmptyMatch() {
+ return OutgoingFromFinal.Match.newEmptyMatch();
+ }
+
+ @Override
+ public OutgoingFromFinal.Match newMatch(final Object... parameters) {
+ return OutgoingFromFinal.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition) parameters[0], (ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState) parameters[1]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.OutgoingFromFinal (visibility: PUBLIC, simpleName: OutgoingFromFinal, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.OutgoingFromFinal, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.OutgoingFromFinal (visibility: PUBLIC, simpleName: OutgoingFromFinal, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.OutgoingFromFinal, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static OutgoingFromFinal INSTANCE = new OutgoingFromFinal();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static OutgoingFromFinal.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_t = new PParameter("t", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Transition")), PParameterDirection.INOUT);
+
+ private final PParameter parameter_f = new PParameter("f", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "FinalState")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_t, parameter_f);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.outgoingFromFinal";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("t","f");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_t = body.getOrCreateVariableByName("t");
+ PVariable var_f = body.getOrCreateVariableByName("f");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_t), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Transition")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_f), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "FinalState")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_t, parameter_t),
+ new ExportedParameter(body, var_f, parameter_f)
+ ));
+ // FinalState.outgoingTransitions(f,t)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_f), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "FinalState")));
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_f, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("YakinduMetamodel", "Vertex", "outgoingTransitions")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Transition")));
+ new Equality(body, var__virtual_0_, var_t);
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("f")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/StateInRegion.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/StateInRegion.java
new file mode 100644
index 00000000..0d1fd0e6
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/StateInRegion.java
@@ -0,0 +1,694 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * pattern StateInRegion(region: Region, state: State) {
+ * Region.vertices(region,state);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class StateInRegion extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.StateInRegion pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Region fRegion;
+
+ private State fState;
+
+ private static List parameterNames = makeImmutableList("region", "state");
+
+ private Match(final Region pRegion, final State pState) {
+ this.fRegion = pRegion;
+ this.fState = pState;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("region".equals(parameterName)) return this.fRegion;
+ if ("state".equals(parameterName)) return this.fState;
+ return null;
+ }
+
+ public Region getRegion() {
+ return this.fRegion;
+ }
+
+ public State getState() {
+ return this.fState;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("region".equals(parameterName) ) {
+ this.fRegion = (Region) newValue;
+ return true;
+ }
+ if ("state".equals(parameterName) ) {
+ this.fState = (State) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setRegion(final Region pRegion) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fRegion = pRegion;
+ }
+
+ public void setState(final State pState) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fState = pState;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.StateInRegion";
+ }
+
+ @Override
+ public List parameterNames() {
+ return StateInRegion.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fRegion, fState};
+ }
+
+ @Override
+ public StateInRegion.Match toImmutable() {
+ return isMutable() ? newMatch(fRegion, fState) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"region\"=" + prettyPrintValue(fRegion) + ", ");
+ result.append("\"state\"=" + prettyPrintValue(fState));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fRegion, fState);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof StateInRegion.Match)) {
+ StateInRegion.Match other = (StateInRegion.Match) obj;
+ return Objects.equals(fRegion, other.fRegion) && Objects.equals(fState, other.fState);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public StateInRegion specification() {
+ return StateInRegion.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static StateInRegion.Match newEmptyMatch() {
+ return new Mutable(null, null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @param pState the fixed value of pattern parameter state, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static StateInRegion.Match newMutableMatch(final Region pRegion, final State pState) {
+ return new Mutable(pRegion, pState);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @param pState the fixed value of pattern parameter state, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static StateInRegion.Match newMatch(final Region pRegion, final State pState) {
+ return new Immutable(pRegion, pState);
+ }
+
+ private static final class Mutable extends StateInRegion.Match {
+ Mutable(final Region pRegion, final State pState) {
+ super(pRegion, pState);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends StateInRegion.Match {
+ Immutable(final Region pRegion, final State pState) {
+ super(pRegion, pState);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.StateInRegion pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * pattern StateInRegion(region: Region, state: State) {
+ * Region.vertices(region,state);
+ * }
+ *
+ *
+ * @see Match
+ * @see StateInRegion
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static StateInRegion.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static StateInRegion.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_REGION = 0;
+
+ private final static int POSITION_STATE = 1;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(StateInRegion.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @param pState the fixed value of pattern parameter state, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Region pRegion, final State pState) {
+ return rawStreamAllMatches(new Object[]{pRegion, pState}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @param pState the fixed value of pattern parameter state, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Region pRegion, final State pState) {
+ return rawStreamAllMatches(new Object[]{pRegion, pState});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @param pState the fixed value of pattern parameter state, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Region pRegion, final State pState) {
+ return rawGetOneArbitraryMatch(new Object[]{pRegion, pState});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @param pState the fixed value of pattern parameter state, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Region pRegion, final State pState) {
+ return rawHasMatch(new Object[]{pRegion, pState});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @param pState the fixed value of pattern parameter state, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Region pRegion, final State pState) {
+ return rawCountMatches(new Object[]{pRegion, pState});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @param pState the fixed value of pattern parameter state, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Region pRegion, final State pState, final Consumer super StateInRegion.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pRegion, pState}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pRegion the fixed value of pattern parameter region, or null if not bound.
+ * @param pState the fixed value of pattern parameter state, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public StateInRegion.Match newMatch(final Region pRegion, final State pState) {
+ return StateInRegion.Match.newMatch(pRegion, pState);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for region.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfregion(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_REGION, parameters).map(Region.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for region.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfregion() {
+ return rawStreamAllValuesOfregion(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for region.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfregion() {
+ return rawStreamAllValuesOfregion(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for region.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfregion(final StateInRegion.Match partialMatch) {
+ return rawStreamAllValuesOfregion(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for region.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfregion(final State pState) {
+ return rawStreamAllValuesOfregion(new Object[]{null, pState});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for region.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfregion(final StateInRegion.Match partialMatch) {
+ return rawStreamAllValuesOfregion(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for region.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfregion(final State pState) {
+ return rawStreamAllValuesOfregion(new Object[]{null, pState}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for state.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfstate(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_STATE, parameters).map(State.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for state.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfstate() {
+ return rawStreamAllValuesOfstate(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for state.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfstate() {
+ return rawStreamAllValuesOfstate(emptyArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for state.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfstate(final StateInRegion.Match partialMatch) {
+ return rawStreamAllValuesOfstate(partialMatch.toArray());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for state.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ *
+ * @return the Stream of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfstate(final Region pRegion) {
+ return rawStreamAllValuesOfstate(new Object[]{pRegion, null});
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for state.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfstate(final StateInRegion.Match partialMatch) {
+ return rawStreamAllValuesOfstate(partialMatch.toArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for state.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfstate(final Region pRegion) {
+ return rawStreamAllValuesOfstate(new Object[]{pRegion, null}).collect(Collectors.toSet());
+ }
+
+ @Override
+ protected StateInRegion.Match tupleToMatch(final Tuple t) {
+ try {
+ return StateInRegion.Match.newMatch((Region) t.get(POSITION_REGION), (State) t.get(POSITION_STATE));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected StateInRegion.Match arrayToMatch(final Object[] match) {
+ try {
+ return StateInRegion.Match.newMatch((Region) match[POSITION_REGION], (State) match[POSITION_STATE]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected StateInRegion.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return StateInRegion.Match.newMutableMatch((Region) match[POSITION_REGION], (State) match[POSITION_STATE]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return StateInRegion.instance();
+ }
+ }
+
+ private StateInRegion() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static StateInRegion instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected StateInRegion.Matcher instantiate(final ViatraQueryEngine engine) {
+ return StateInRegion.Matcher.on(engine);
+ }
+
+ @Override
+ public StateInRegion.Matcher instantiate() {
+ return StateInRegion.Matcher.create();
+ }
+
+ @Override
+ public StateInRegion.Match newEmptyMatch() {
+ return StateInRegion.Match.newEmptyMatch();
+ }
+
+ @Override
+ public StateInRegion.Match newMatch(final Object... parameters) {
+ return StateInRegion.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region) parameters[0], (ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State) parameters[1]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.StateInRegion (visibility: PUBLIC, simpleName: StateInRegion, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.StateInRegion, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.StateInRegion (visibility: PUBLIC, simpleName: StateInRegion, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.StateInRegion, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static StateInRegion INSTANCE = new StateInRegion();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static StateInRegion.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_region = new PParameter("region", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Region")), PParameterDirection.INOUT);
+
+ private final PParameter parameter_state = new PParameter("state", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "State")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_region, parameter_state);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.StateInRegion";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("region","state");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_region = body.getOrCreateVariableByName("region");
+ PVariable var_state = body.getOrCreateVariableByName("state");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_region), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Region")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var_state), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "State")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_region, parameter_region),
+ new ExportedParameter(body, var_state, parameter_state)
+ ));
+ // Region.vertices(region,state)
+ new TypeConstraint(body, Tuples.flatTupleOf(var_region), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Region")));
+ PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_region, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("YakinduMetamodel", "Region", "vertices")));
+ new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Vertex")));
+ new Equality(body, var__virtual_0_, var_state);
+ bodies.add(body);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchHasNoIncoming.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchHasNoIncoming.java
new file mode 100644
index 00000000..d59ab2d9
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchHasNoIncoming.java
@@ -0,0 +1,551 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ * Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {s})
+ * pattern synchHasNoIncoming(s : Synchronization) {
+ * neg find transition(_, _, s);
+ * }
+ *
+ *
+ * @see Matcher
+ * @see Match
+ *
+ */
+@SuppressWarnings("all")
+public final class SynchHasNoIncoming extends BaseGeneratedEMFQuerySpecification {
+ /**
+ * Pattern-specific match representation of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.synchHasNoIncoming pattern,
+ * to be used in conjunction with {@link Matcher}.
+ *
+ * Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
+ * Each instance is a (possibly partial) substitution of pattern parameters,
+ * usable to represent a match of the pattern in the result of a query,
+ * or to specify the bound (fixed) input parameters when issuing a query.
+ *
+ * @see Matcher
+ *
+ */
+ public static abstract class Match extends BasePatternMatch {
+ private Synchronization fS;
+
+ private static List parameterNames = makeImmutableList("s");
+
+ private Match(final Synchronization pS) {
+ this.fS = pS;
+ }
+
+ @Override
+ public Object get(final String parameterName) {
+ if ("s".equals(parameterName)) return this.fS;
+ return null;
+ }
+
+ public Synchronization getS() {
+ return this.fS;
+ }
+
+ @Override
+ public boolean set(final String parameterName, final Object newValue) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ if ("s".equals(parameterName) ) {
+ this.fS = (Synchronization) newValue;
+ return true;
+ }
+ return false;
+ }
+
+ public void setS(final Synchronization pS) {
+ if (!isMutable()) throw new java.lang.UnsupportedOperationException();
+ this.fS = pS;
+ }
+
+ @Override
+ public String patternName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.synchHasNoIncoming";
+ }
+
+ @Override
+ public List parameterNames() {
+ return SynchHasNoIncoming.Match.parameterNames;
+ }
+
+ @Override
+ public Object[] toArray() {
+ return new Object[]{fS};
+ }
+
+ @Override
+ public SynchHasNoIncoming.Match toImmutable() {
+ return isMutable() ? newMatch(fS) : this;
+ }
+
+ @Override
+ public String prettyPrint() {
+ StringBuilder result = new StringBuilder();
+ result.append("\"s\"=" + prettyPrintValue(fS));
+ return result.toString();
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(fS);
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null) {
+ return false;
+ }
+ if ((obj instanceof SynchHasNoIncoming.Match)) {
+ SynchHasNoIncoming.Match other = (SynchHasNoIncoming.Match) obj;
+ return Objects.equals(fS, other.fS);
+ } else {
+ // this should be infrequent
+ if (!(obj instanceof IPatternMatch)) {
+ return false;
+ }
+ IPatternMatch otherSig = (IPatternMatch) obj;
+ return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
+ }
+ }
+
+ @Override
+ public SynchHasNoIncoming specification() {
+ return SynchHasNoIncoming.instance();
+ }
+
+ /**
+ * Returns an empty, mutable match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @return the empty match.
+ *
+ */
+ public static SynchHasNoIncoming.Match newEmptyMatch() {
+ return new Mutable(null);
+ }
+
+ /**
+ * Returns a mutable (partial) match.
+ * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
+ *
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return the new, mutable (partial) match object.
+ *
+ */
+ public static SynchHasNoIncoming.Match newMutableMatch(final Synchronization pS) {
+ return new Mutable(pS);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public static SynchHasNoIncoming.Match newMatch(final Synchronization pS) {
+ return new Immutable(pS);
+ }
+
+ private static final class Mutable extends SynchHasNoIncoming.Match {
+ Mutable(final Synchronization pS) {
+ super(pS);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return true;
+ }
+ }
+
+ private static final class Immutable extends SynchHasNoIncoming.Match {
+ Immutable(final Synchronization pS) {
+ super(pS);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+ }
+ }
+
+ /**
+ * Generated pattern matcher API of the ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.synchHasNoIncoming pattern,
+ * providing pattern-specific query methods.
+ *
+ *
Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
+ * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
+ *
+ *
Matches of the pattern will be represented as {@link Match}.
+ *
+ *
Original source:
+ *
+ * {@literal @}Constraint(severity="error", message="error", key = {s})
+ * pattern synchHasNoIncoming(s : Synchronization) {
+ * neg find transition(_, _, s);
+ * }
+ *
+ *
+ * @see Match
+ * @see SynchHasNoIncoming
+ *
+ */
+ public static class Matcher extends BaseMatcher {
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ public static SynchHasNoIncoming.Matcher on(final ViatraQueryEngine engine) {
+ // check if matcher already exists
+ Matcher matcher = engine.getExistingMatcher(querySpecification());
+ if (matcher == null) {
+ matcher = (Matcher)engine.getMatcher(querySpecification());
+ }
+ return matcher;
+ }
+
+ /**
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ * @return an initialized matcher
+ * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
+ *
+ */
+ public static SynchHasNoIncoming.Matcher create() {
+ return new Matcher();
+ }
+
+ private final static int POSITION_S = 0;
+
+ private final static Logger LOGGER = ViatraQueryLoggingUtil.getLogger(SynchHasNoIncoming.Matcher.class);
+
+ /**
+ * Initializes the pattern matcher within an existing VIATRA Query engine.
+ * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
+ *
+ * @param engine the existing VIATRA Query engine in which this matcher will be created.
+ * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
+ *
+ */
+ private Matcher() {
+ super(querySpecification());
+ }
+
+ /**
+ * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return matches represented as a Match object.
+ *
+ */
+ public Collection getAllMatches(final Synchronization pS) {
+ return rawStreamAllMatches(new Object[]{pS}).collect(Collectors.toSet());
+ }
+
+ /**
+ * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
+ *
+ * NOTE: It is important not to modify the source model while the stream is being processed.
+ * If the match set of the pattern changes during processing, the contents of the stream is undefined.
+ * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return a stream of matches represented as a Match object.
+ *
+ */
+ public Stream streamAllMatches(final Synchronization pS) {
+ return rawStreamAllMatches(new Object[]{pS});
+ }
+
+ /**
+ * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return a match represented as a Match object, or null if no match is found.
+ *
+ */
+ public Optional getOneArbitraryMatch(final Synchronization pS) {
+ return rawGetOneArbitraryMatch(new Object[]{pS});
+ }
+
+ /**
+ * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
+ * under any possible substitution of the unspecified parameters (if any).
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return true if the input is a valid (partial) match of the pattern.
+ *
+ */
+ public boolean hasMatch(final Synchronization pS) {
+ return rawHasMatch(new Object[]{pS});
+ }
+
+ /**
+ * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return the number of pattern matches found.
+ *
+ */
+ public int countMatches(final Synchronization pS) {
+ return rawCountMatches(new Object[]{pS});
+ }
+
+ /**
+ * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
+ * Neither determinism nor randomness of selection is guaranteed.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @param processor the action that will process the selected match.
+ * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
+ *
+ */
+ public boolean forOneArbitraryMatch(final Synchronization pS, final Consumer super SynchHasNoIncoming.Match> processor) {
+ return rawForOneArbitraryMatch(new Object[]{pS}, processor);
+ }
+
+ /**
+ * Returns a new (partial) match.
+ * This can be used e.g. to call the matcher with a partial match.
+ * The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
+ * @param pS the fixed value of pattern parameter s, or null if not bound.
+ * @return the (partial) match object.
+ *
+ */
+ public SynchHasNoIncoming.Match newMatch(final Synchronization pS) {
+ return SynchHasNoIncoming.Match.newMatch(pS);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for s.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ protected Stream rawStreamAllValuesOfs(final Object[] parameters) {
+ return rawStreamAllValues(POSITION_S, parameters).map(Synchronization.class::cast);
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for s.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Set getAllValuesOfs() {
+ return rawStreamAllValuesOfs(emptyArray()).collect(Collectors.toSet());
+ }
+
+ /**
+ * Retrieve the set of values that occur in matches for s.
+ * @return the Set of all values or empty set if there are no matches
+ *
+ */
+ public Stream streamAllValuesOfs() {
+ return rawStreamAllValuesOfs(emptyArray());
+ }
+
+ @Override
+ protected SynchHasNoIncoming.Match tupleToMatch(final Tuple t) {
+ try {
+ return SynchHasNoIncoming.Match.newMatch((Synchronization) t.get(POSITION_S));
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in tuple not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected SynchHasNoIncoming.Match arrayToMatch(final Object[] match) {
+ try {
+ return SynchHasNoIncoming.Match.newMatch((Synchronization) match[POSITION_S]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ @Override
+ protected SynchHasNoIncoming.Match arrayToMatchMutable(final Object[] match) {
+ try {
+ return SynchHasNoIncoming.Match.newMutableMatch((Synchronization) match[POSITION_S]);
+ } catch(ClassCastException e) {
+ LOGGER.error("Element(s) in array not properly typed!",e);
+ return null;
+ }
+ }
+
+ /**
+ * @return the singleton instance of the query specification of this pattern
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static IQuerySpecification querySpecification() {
+ return SynchHasNoIncoming.instance();
+ }
+ }
+
+ private SynchHasNoIncoming() {
+ super(GeneratedPQuery.INSTANCE);
+ }
+
+ /**
+ * @return the singleton instance of the query specification
+ * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
+ *
+ */
+ public static SynchHasNoIncoming instance() {
+ try{
+ return LazyHolder.INSTANCE;
+ } catch (ExceptionInInitializerError err) {
+ throw processInitializerError(err);
+ }
+ }
+
+ @Override
+ protected SynchHasNoIncoming.Matcher instantiate(final ViatraQueryEngine engine) {
+ return SynchHasNoIncoming.Matcher.on(engine);
+ }
+
+ @Override
+ public SynchHasNoIncoming.Matcher instantiate() {
+ return SynchHasNoIncoming.Matcher.create();
+ }
+
+ @Override
+ public SynchHasNoIncoming.Match newEmptyMatch() {
+ return SynchHasNoIncoming.Match.newEmptyMatch();
+ }
+
+ @Override
+ public SynchHasNoIncoming.Match newMatch(final Object... parameters) {
+ return SynchHasNoIncoming.Match.newMatch((ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization) parameters[0]);
+ }
+
+ /**
+ * Inner class allowing the singleton instance of {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.SynchHasNoIncoming (visibility: PUBLIC, simpleName: SynchHasNoIncoming, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.SynchHasNoIncoming, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
+ * not at the class load time of the outer class,
+ * but rather at the first call to {@link JvmGenericType: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.SynchHasNoIncoming (visibility: PUBLIC, simpleName: SynchHasNoIncoming, identifier: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.SynchHasNoIncoming, deprecated: ) (abstract: false, static: false, final: true, packageName: ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
+ *
+ * This workaround is required e.g. to support recursion.
+ *
+ */
+ private static class LazyHolder {
+ private final static SynchHasNoIncoming INSTANCE = new SynchHasNoIncoming();
+
+ /**
+ * Statically initializes the query specification after the field {@link #INSTANCE} is assigned.
+ * This initialization order is required to support indirect recursion.
+ *
+ *
The static initializer is defined using a helper field to work around limitations of the code generator.
+ *
+ */
+ private final static Object STATIC_INITIALIZER = ensureInitialized();
+
+ public static Object ensureInitialized() {
+ INSTANCE.ensureInitializedInternal();
+ return null;
+ }
+ }
+
+ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
+ private final static SynchHasNoIncoming.GeneratedPQuery INSTANCE = new GeneratedPQuery();
+
+ private final PParameter parameter_s = new PParameter("s", "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("YakinduMetamodel", "Synchronization")), PParameterDirection.INOUT);
+
+ private final List parameters = Arrays.asList(parameter_s);
+
+ private GeneratedPQuery() {
+ super(PVisibility.PUBLIC);
+ }
+
+ @Override
+ public String getFullyQualifiedName() {
+ return "ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.synchHasNoIncoming";
+ }
+
+ @Override
+ public List getParameterNames() {
+ return Arrays.asList("s");
+ }
+
+ @Override
+ public List getParameters() {
+ return parameters;
+ }
+
+ @Override
+ public Set doGetContainedBodies() {
+ setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
+ Set bodies = new LinkedHashSet<>();
+ {
+ PBody body = new PBody(this);
+ PVariable var_s = body.getOrCreateVariableByName("s");
+ PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
+ PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
+ new TypeConstraint(body, Tuples.flatTupleOf(var_s), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("YakinduMetamodel", "Synchronization")));
+ body.setSymbolicParameters(Arrays.asList(
+ new ExportedParameter(body, var_s, parameter_s)
+ ));
+ // neg find transition(_, _, s)
+ new NegativePatternCall(body, Tuples.flatTupleOf(var___0_, var___1_, var_s), Transition.instance().getInternalQueryRepresentation());
+ bodies.add(body);
+ }
+ {
+ PAnnotation annotation = new PAnnotation("Constraint");
+ annotation.addAttribute("severity", "error");
+ annotation.addAttribute("message", "error");
+ annotation.addAttribute("key", Arrays.asList(new Object[] {
+ new ParameterReference("s")
+ }));
+ addAnnotation(annotation);
+ }
+ return bodies;
+ }
+ }
+}
diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchHasNoOutgoing.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchHasNoOutgoing.java
new file mode 100644
index 00000000..e3ff69bd
--- /dev/null
+++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src-gen/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/SynchHasNoOutgoing.java
@@ -0,0 +1,559 @@
+/**
+ * Generated from platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/queries/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql
+ */
+package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries;
+
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization;
+import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries.Transition;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import org.apache.log4j.Logger;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.viatra.query.runtime.api.IPatternMatch;
+import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
+import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
+import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
+import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
+import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
+import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
+import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
+import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
+import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
+import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
+import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
+
+/**
+ * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
+ *
+ *