From 64a02259b30424e10586672993901cb1a6b9f83e Mon Sep 17 00:00:00 2001 From: OszkarSemerath Date: Wed, 7 Nov 2018 17:33:28 +0100 Subject: Ecore gen test --- Tests/Ecore-Plugin/.classpath | 7 + Tests/Ecore-Plugin/.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 7 + Tests/Ecore-Plugin/EcoreGeneration.vsconfig | 33 + Tests/Ecore-Plugin/InitialPackage.ecore | 2 + Tests/Ecore-Plugin/META-INF/MANIFEST.MF | 8 + Tests/Ecore-Plugin/build.properties | 4 + Tests/Ecore-Plugin/outputs/debug/errors.txt | 200 + .../outputs/debug/generated3valued.vql_deactivated | 27665 +++++++++++++++++++ .../outputs/debug/generation.logicproblem | 2059 ++ Tests/Ecore-Plugin/outputs/debug/init.partialmodel | 497 + Tests/Ecore-Plugin/outputs/debug/problem.als | 401 + Tests/Ecore-Plugin/outputs/log.txt | 1 + Tests/Ecore-Plugin/outputs/models/1.gml | 2629 ++ Tests/Ecore-Plugin/outputs/models/1.png | Bin 0 -> 191062 bytes Tests/Ecore-Plugin/outputs/models/1.xmi | 9 + Tests/Ecore-Plugin/outputs/models/2.gml | 2667 ++ Tests/Ecore-Plugin/outputs/models/2.png | Bin 0 -> 179049 bytes Tests/Ecore-Plugin/outputs/models/2.xmi | 9 + Tests/Ecore-Plugin/outputs/models/3.gml | 2705 ++ Tests/Ecore-Plugin/outputs/models/3.png | Bin 0 -> 180110 bytes Tests/Ecore-Plugin/outputs/models/3.xmi | 9 + Tests/Ecore-Plugin/outputs/models/4.gml | 2743 ++ Tests/Ecore-Plugin/outputs/models/4.png | Bin 0 -> 194694 bytes Tests/Ecore-Plugin/outputs/models/4.xmi | 9 + Tests/Ecore-Plugin/outputs/models/5.gml | 2781 ++ Tests/Ecore-Plugin/outputs/models/5.png | Bin 0 -> 206377 bytes Tests/Ecore-Plugin/outputs/models/5.xmi | 9 + Tests/Ecore-Plugin/outputs/statistics.csv | 64 + 29 files changed, 44552 insertions(+) create mode 100644 Tests/Ecore-Plugin/.classpath create mode 100644 Tests/Ecore-Plugin/.project create mode 100644 Tests/Ecore-Plugin/.settings/org.eclipse.jdt.core.prefs create mode 100644 Tests/Ecore-Plugin/EcoreGeneration.vsconfig create mode 100644 Tests/Ecore-Plugin/InitialPackage.ecore create mode 100644 Tests/Ecore-Plugin/META-INF/MANIFEST.MF create mode 100644 Tests/Ecore-Plugin/build.properties create mode 100644 Tests/Ecore-Plugin/outputs/debug/errors.txt create mode 100644 Tests/Ecore-Plugin/outputs/debug/generated3valued.vql_deactivated create mode 100644 Tests/Ecore-Plugin/outputs/debug/generation.logicproblem create mode 100644 Tests/Ecore-Plugin/outputs/debug/init.partialmodel create mode 100644 Tests/Ecore-Plugin/outputs/debug/problem.als create mode 100644 Tests/Ecore-Plugin/outputs/log.txt create mode 100644 Tests/Ecore-Plugin/outputs/models/1.gml create mode 100644 Tests/Ecore-Plugin/outputs/models/1.png create mode 100644 Tests/Ecore-Plugin/outputs/models/1.xmi create mode 100644 Tests/Ecore-Plugin/outputs/models/2.gml create mode 100644 Tests/Ecore-Plugin/outputs/models/2.png create mode 100644 Tests/Ecore-Plugin/outputs/models/2.xmi create mode 100644 Tests/Ecore-Plugin/outputs/models/3.gml create mode 100644 Tests/Ecore-Plugin/outputs/models/3.png create mode 100644 Tests/Ecore-Plugin/outputs/models/3.xmi create mode 100644 Tests/Ecore-Plugin/outputs/models/4.gml create mode 100644 Tests/Ecore-Plugin/outputs/models/4.png create mode 100644 Tests/Ecore-Plugin/outputs/models/4.xmi create mode 100644 Tests/Ecore-Plugin/outputs/models/5.gml create mode 100644 Tests/Ecore-Plugin/outputs/models/5.png create mode 100644 Tests/Ecore-Plugin/outputs/models/5.xmi create mode 100644 Tests/Ecore-Plugin/outputs/statistics.csv (limited to 'Tests/Ecore-Plugin') diff --git a/Tests/Ecore-Plugin/.classpath b/Tests/Ecore-Plugin/.classpath new file mode 100644 index 00000000..b862a296 --- /dev/null +++ b/Tests/Ecore-Plugin/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Tests/Ecore-Plugin/.project b/Tests/Ecore-Plugin/.project new file mode 100644 index 00000000..d75e46f7 --- /dev/null +++ b/Tests/Ecore-Plugin/.project @@ -0,0 +1,34 @@ + + + Ecore-Plugin + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/Tests/Ecore-Plugin/.settings/org.eclipse.jdt.core.prefs b/Tests/Ecore-Plugin/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Tests/Ecore-Plugin/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/Tests/Ecore-Plugin/EcoreGeneration.vsconfig b/Tests/Ecore-Plugin/EcoreGeneration.vsconfig new file mode 100644 index 00000000..2ae1da99 --- /dev/null +++ b/Tests/Ecore-Plugin/EcoreGeneration.vsconfig @@ -0,0 +1,33 @@ +import epackage "http://www.eclipse.org/emf/2002/Ecore" + +metamodel allSupported { package ecore excluding { + EClassifier.instanceClass,EClassifier.defaultValue,EEnumLiteral.instance,EStructuralFeature.defaultValue, + EJavaClass, EJavaObject, EJavaObject, + EPackage.eFactoryInstance, EFactory, EFactory.ePackage + } +} + +generate { + metamodel = allSupported + //constraints = { ... } + partial-model = { "platform:/resource/Ecore-Plugin/InitialPackage.ecore" } + solver = AlloySolver + scope = { + #node += 5, + #string += { "A", "B" }, + #int += {0,1,-1} + } + + config = { + runtime = 10000, + log-level = normal + } + + number = 5 + runs = 1 + + debug = "platform:/resource/Ecore-Plugin/outputs/debug" + log = "platform:/resource/Ecore-Plugin/outputs/log.txt" + output = "platform:/resource/Ecore-Plugin/outputs/models" + statistics = "platform:/resource/Ecore-Plugin/outputs/statistics.csv" +} \ No newline at end of file diff --git a/Tests/Ecore-Plugin/InitialPackage.ecore b/Tests/Ecore-Plugin/InitialPackage.ecore new file mode 100644 index 00000000..539059a8 --- /dev/null +++ b/Tests/Ecore-Plugin/InitialPackage.ecore @@ -0,0 +1,2 @@ + + diff --git a/Tests/Ecore-Plugin/META-INF/MANIFEST.MF b/Tests/Ecore-Plugin/META-INF/MANIFEST.MF new file mode 100644 index 00000000..e13ea790 --- /dev/null +++ b/Tests/Ecore-Plugin/META-INF/MANIFEST.MF @@ -0,0 +1,8 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Ecore-Plugin +Bundle-SymbolicName: Ecore-Plugin +Bundle-Version: 1.0.0.qualifier +Automatic-Module-Name: Ecore-Plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.14.0" diff --git a/Tests/Ecore-Plugin/build.properties b/Tests/Ecore-Plugin/build.properties new file mode 100644 index 00000000..41eb6ade --- /dev/null +++ b/Tests/Ecore-Plugin/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/Tests/Ecore-Plugin/outputs/debug/errors.txt b/Tests/Ecore-Plugin/outputs/debug/errors.txt new file mode 100644 index 00000000..f5a4c569 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/debug/errors.txt @@ -0,0 +1,200 @@ +Error occured (UnsupportedOperationException): Unsupported attribute type: EJavaClass + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.TypeOfRange(EAttributeMapper_RelationsOverTypes.java:227) + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.transformEAttributes(EAttributeMapper_RelationsOverTypes.java:69) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformEAttributes(Ecore2Logic.java:140) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformMetamodel(Ecore2Logic.java:83) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:189) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): Unsupported attribute type: EJavaClass + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.TypeOfRange(EAttributeMapper_RelationsOverTypes.java:227) + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.transformEAttributes(EAttributeMapper_RelationsOverTypes.java:69) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformEAttributes(Ecore2Logic.java:140) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformMetamodel(Ecore2Logic.java:83) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:189) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): Class EFactory is not translated to logic! + hu.bme.mit.inf.dslreasoner.ecore2logic.EClassMapper_AllElementAsObject.TypeofEClass(EClassMapper_AllElementAsObject.java:63) + hu.bme.mit.inf.dslreasoner.ecore2logic.EReferenceMapper_RelationsOverTypes.createIndicatorDeclarations(EReferenceMapper_RelationsOverTypes.java:88) + hu.bme.mit.inf.dslreasoner.ecore2logic.EReferenceMapper_RelationsOverTypes.transformEReferences(EReferenceMapper_RelationsOverTypes.java:68) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformEReferences(Ecore2Logic.java:120) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformMetamodel(Ecore2Logic.java:81) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:189) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): Unsupported attribute type: EJavaClass + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.TypeOfRange(EAttributeMapper_RelationsOverTypes.java:227) + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.transformEAttributes(EAttributeMapper_RelationsOverTypes.java:69) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformEAttributes(Ecore2Logic.java:140) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformMetamodel(Ecore2Logic.java:83) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:189) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): Unsupported attribute type: EJavaClass of org.eclipse.emf.ecore.impl.EcorePackageImpl@3316527e (name: ecore) (nsURI: http://www.eclipse.org/emf/2002/Ecore, nsPrefix: ecore)::EClassifier.instanceClass + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.TypeOfRange(EAttributeMapper_RelationsOverTypes.java:237) + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.transformEAttributes(EAttributeMapper_RelationsOverTypes.java:70) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformEAttributes(Ecore2Logic.java:140) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformMetamodel(Ecore2Logic.java:83) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:189) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): Unsupported attribute type: EJavaObject of org.eclipse.emf.ecore.impl.EcorePackageImpl@a5e8260 (name: ecore) (nsURI: http://www.eclipse.org/emf/2002/Ecore, nsPrefix: ecore)::EClassifier.defaultValue + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.TypeOfRange(EAttributeMapper_RelationsOverTypes.java:237) + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.transformEAttributes(EAttributeMapper_RelationsOverTypes.java:70) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformEAttributes(Ecore2Logic.java:140) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformMetamodel(Ecore2Logic.java:83) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:189) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): Unsupported attribute type: EEnumerator of org.eclipse.emf.ecore.impl.EcorePackageImpl@a5e8260 (name: ecore) (nsURI: http://www.eclipse.org/emf/2002/Ecore, nsPrefix: ecore)::EEnumLiteral.instance + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.TypeOfRange(EAttributeMapper_RelationsOverTypes.java:237) + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.transformEAttributes(EAttributeMapper_RelationsOverTypes.java:70) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformEAttributes(Ecore2Logic.java:140) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformMetamodel(Ecore2Logic.java:83) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:189) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): Unsupported attribute type: EJavaObject of org.eclipse.emf.ecore.impl.EcorePackageImpl@a5e8260 (name: ecore) (nsURI: http://www.eclipse.org/emf/2002/Ecore, nsPrefix: ecore)::EStructuralFeature.defaultValue + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.TypeOfRange(EAttributeMapper_RelationsOverTypes.java:237) + hu.bme.mit.inf.dslreasoner.ecore2logic.EAttributeMapper_RelationsOverTypes.transformEAttributes(EAttributeMapper_RelationsOverTypes.java:70) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformEAttributes(Ecore2Logic.java:140) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.transformMetamodel(Ecore2Logic.java:83) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:189) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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 (IOWrappedException): The object 'hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.StringElementImpl@7aef4326 (name: "InitialPackage") (valueSet: true) (value: InitialPackage)' is not contained in a resource. + org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:301) + org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:265) + org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:389) + org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1475) + org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1044) + hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace.writeModel(ReasonerWorkspace.java:80) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:204) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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 (IOWrappedException): The object 'hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.StringElementImpl@fa78fd9 (name: "InitialPackage") (valueSet: true) (value: InitialPackage)' is not contained in a resource. + org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:301) + org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:265) + org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:389) + org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1475) + org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1044) + hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace.writeModel(ReasonerWorkspace.java:80) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:204) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): Unhandled parameter types: [hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl.StringLiteralImpl@26cfcaf3 (value: A), hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PartialModelAsLogicInterpretation@24a216f4, {}] + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.resolve(LogicStructureBuilder.java:909) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.lambda$22(LogicStructureBuilder.java:712) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder$$Lambda$859/731011825.apply(Unknown Source) + org.eclipse.xtext.xbase.lib.internal.FunctionDelegate.apply(FunctionDelegate.java:42) + com.google.common.collect.Lists$TransformingRandomAccessList$1.transform(Lists.java:651) + com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47) + java.util.AbstractCollection.toArray(AbstractCollection.java:196) + com.google.common.collect.Iterables.toArray(Iterables.java:295) + com.google.common.collect.Iterables.toArray(Iterables.java:290) + org.eclipse.xtext.xbase.lib.Conversions.unwrapArray(Conversions.java:195) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder._resolveSymbolicValue(LogicStructureBuilder.java:634) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.resolveSymbolicValue(LogicStructureBuilder.java:924) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder._resolve(LogicStructureBuilder.java:585) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.resolve(LogicStructureBuilder.java:907) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.evalAsBool(LogicStructureBuilder.java:96) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:127) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): Unhandled parameter types: [false] + hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PartialModelAsLogicInterpretation.elementLookupForward(PartialModelAsLogicInterpretation.java:278) + hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PartialModelAsLogicInterpretation.getInterpretation(PartialModelAsLogicInterpretation.java:224) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder._resolveSymbolicValue(LogicStructureBuilder.java:639) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.resolveSymbolicValue(LogicStructureBuilder.java:931) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder._resolve(LogicStructureBuilder.java:590) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.resolve(LogicStructureBuilder.java:914) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.evalAsBool(LogicStructureBuilder.java:97) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:127) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): Unhandled parameter types: [false] + hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PartialModelAsLogicInterpretation.elementLookupForward(PartialModelAsLogicInterpretation.java:278) + hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PartialModelAsLogicInterpretation.getInterpretation(PartialModelAsLogicInterpretation.java:224) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder._resolveSymbolicValue(LogicStructureBuilder.java:639) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.resolveSymbolicValue(LogicStructureBuilder.java:931) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder._resolve(LogicStructureBuilder.java:590) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.resolve(LogicStructureBuilder.java:914) + hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder.evalAsBool(LogicStructureBuilder.java:97) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:127) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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 (IOWrappedException): The object 'hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.StringElementImpl@4f949d6c (name: "packageName") (valueSet: true) (value: packageName)' is not contained in a resource. + org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:301) + org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:265) + org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:389) + org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1475) + org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1044) + hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace.writeModel(ReasonerWorkspace.java:80) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:204) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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 (IOWrappedException): The object 'hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.StringElementImpl@3156ba0d (name: "packageName") (valueSet: true) (value: packageName)' is not contained in a resource. + org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:301) + org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:265) + org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:389) + org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1475) + org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1044) + hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace.writeModel(ReasonerWorkspace.java:80) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:204) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): TODO: auto-generated method stub + hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.AlloyModelInterpretation.getAllStringsInStructure(AlloyModelInterpretation.java:384) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore._getAllElementsOfDatatype(Logic2Ecore.java:191) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.getAllElementsOfDatatype(Logic2Ecore.java:288) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:122) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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): TODO: auto-generated method stub + hu.bme.mit.inf.dlsreasoner.alloy.reasoner.builder.AlloyModelInterpretation.getAllStringsInStructure(AlloyModelInterpretation.java:384) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore._getAllElementsOfDatatype(Logic2Ecore.java:191) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.getAllElementsOfDatatype(Logic2Ecore.java:288) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:122) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + 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/Ecore-Plugin/outputs/debug/generated3valued.vql_deactivated b/Tests/Ecore-Plugin/outputs/debug/generated3valued.vql_deactivated new file mode 100644 index 00000000..11cbdd60 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/debug/generated3valued.vql_deactivated @@ -0,0 +1,27665 @@ +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 mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEClass_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEClass_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 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 mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(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 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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEObject_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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEObject_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEObject_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEObject_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_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 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 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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEObject_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 mustInstanceOfEClassifier_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 mustInstanceOfEReference_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 mustInstanceOfETypeParameter_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 mustInstanceOfEOperation_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 mustInstanceOfEAttribute_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 mustInstanceOfEDataType_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 mustInstanceOfETypedElement_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 mustInstanceOfEEnum_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 mustInstanceOfEStringToStringMapEntry_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_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_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_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_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_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_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_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_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_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_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); +} + +////////// +// 4.2 Type refinement +////////// +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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEClass_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEObject_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 mustInstanceOfENamedElement_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 scopeDisallowsNewEClass_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 scopeDisallowsNewEClassifier_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 scopeDisallowsNewEDataType_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 scopeDisallowsNewEEnum_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 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 mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfENamedElement_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 scopeDisallowsNewEModelElement_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 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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 scopeDisallowsNewETypeParameter_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 mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 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 mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_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 mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_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 mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 scopeDisallowsNewENamedElement_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_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 scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_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 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 mustInstanceOfENamedElement_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 mustInstanceOfEParameter_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 mustInstanceOfEOperation_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 mustInstanceOfEAnnotation_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 mustInstanceOfEModelElement_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 mustInstanceOfEClassifier_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 mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEDataType_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 mustInstanceOfETypeParameter_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_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_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_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_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_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_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_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_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_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_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); +} + +////////// +// 4.2 Type refinement +////////// +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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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); +} +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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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); +} +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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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); +} +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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_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 mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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); +} +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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_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); +} +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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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); +} +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 mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_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 "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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 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 mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfENamedElement_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 mustInstanceOfEParameter_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 mustInstanceOfEOperation_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 mustInstanceOfEAnnotation_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 mustInstanceOfEModelElement_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 mustInstanceOfEClassifier_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 mustInstanceOfEPackage_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEDataType_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 mustInstanceOfETypeParameter_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_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_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_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_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_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_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_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_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_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_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_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_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); +} + +////////// +// 4.2 Type refinement +////////// +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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfETypedElement_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEClassifier_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEReference_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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEReference_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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEClass_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEClass_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEClassifier_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 mustInstanceOfEClass_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 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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEPackage_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 mustInstanceOfEOperation_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 mustInstanceOfEParameter_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 mustInstanceOfEAttribute_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 mustInstanceOfEObject_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_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); +} +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_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_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_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_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_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_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_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_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_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_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); +} + +////////// +// 4.2 Type refinement +////////// +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 mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEClass_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEClass_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 mustInstanceOfEGenericType_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_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 mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEReference_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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEReference_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 mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_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 mustInstanceOfEEnumLiteral_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_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 mustInstanceOfEEnumLiteral_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_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 mustInstanceOfEPackage_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_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 mustInstanceOfEPackage_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_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 mustInstanceOfEPackage_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEPackage_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(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 scopeDisallowsNewEModelElement_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_UndefinedPart(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 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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEReference_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find mustInstanceOfEReference_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEPackage_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEPackage_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEPackage_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEPackage_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_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 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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_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 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 mustInstanceOfEParameter_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 mustInstanceOfEReference_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 mustInstanceOfEOperation_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 mustInstanceOfENamedElement_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 mustInstanceOfEClass_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 mustInstanceOfEModelElement_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 mustInstanceOfEPackage_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 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 mustInstanceOfEClassifier_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 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_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_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_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_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_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_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_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_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_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_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_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_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_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 mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_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); +} +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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_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 mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClass_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_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 mustInstanceOfEModelElement_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); +} +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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEReference_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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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); +} +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 mustInstanceOfEModelElement_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); +} +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 mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEPackage_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEPackage_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 mustInstanceOfETypedElement_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); +} +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 mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClass_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/Ecore-Plugin/outputs/debug/generation.logicproblem b/Tests/Ecore-Plugin/outputs/debug/generation.logicproblem new file mode 100644 index 00000000..90807b8d --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/debug/generation.logicproblem @@ -0,0 +1,2059 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Ecore-Plugin/outputs/debug/init.partialmodel b/Tests/Ecore-Plugin/outputs/debug/init.partialmodel new file mode 100644 index 00000000..985e7346 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/debug/init.partialmodel @@ -0,0 +1,497 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/Ecore-Plugin/outputs/debug/problem.als b/Tests/Ecore-Plugin/outputs/debug/problem.als new file mode 100644 index 00000000..23498c39 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/debug/problem.als @@ -0,0 +1,401 @@ +enum util'boolean { + util'boolean'true, util'boolean'false +} +one sig util'language { + util'root : one type'EEnumLiteral'class + (type'EEnum'class + (type'EAnnotation'class + (type'EDataType'class + (type'EGenericType'class + (type'ENamedElement'class + (type'EModelElement'class + (type'ETypedElement'class + (type'EAttribute'class + (type'EObject'class + (type'EClass'class + (type'EStringToStringMapEntry'class + (type'EPackage'class + (type'EReference'class + (type'EClassifier'class + (type'EOperation'class + (type'ETypeParameter'class + (type'EParameter'class + (type'EStructuralFeature'class + (type'EModelElement'class'DefinedPart + (type'EModelElement'class'UndefinedPart + (type'ENamedElement'class'DefinedPart + (type'ENamedElement'class'UndefinedPart + (type'EPackage'class'DefinedPart + type'EPackage'class'UndefinedPart))))))))))))))))))))))), + util'contains : (type'EEnumLiteral'class + (type'EEnum'class + (type'EAnnotation'class + (type'EDataType'class + (type'EGenericType'class + (type'ENamedElement'class + (type'EModelElement'class + (type'ETypedElement'class + (type'EAttribute'class + (type'EObject'class + (type'EClass'class + (type'EStringToStringMapEntry'class + (type'EPackage'class + (type'EReference'class + (type'EClassifier'class + (type'EOperation'class + (type'ETypeParameter'class + (type'EParameter'class + (type'EStructuralFeature'class + (type'EModelElement'class'DefinedPart + (type'EModelElement'class'UndefinedPart + (type'ENamedElement'class'DefinedPart + (type'ENamedElement'class'UndefinedPart + (type'EPackage'class'DefinedPart + type'EPackage'class'UndefinedPart)))))))))))))))))))))))) lone->set (type'EEnumLiteral'class + (type'EEnum'class + (type'EAnnotation'class + (type'EDataType'class + (type'EGenericType'class + (type'ENamedElement'class + (type'EModelElement'class + (type'ETypedElement'class + (type'EAttribute'class + (type'EObject'class + (type'EClass'class + (type'EStringToStringMapEntry'class + (type'EPackage'class + (type'EReference'class + (type'EClassifier'class + (type'EOperation'class + (type'ETypeParameter'class + (type'EParameter'class + (type'EStructuralFeature'class + (type'EModelElement'class'DefinedPart + (type'EModelElement'class'UndefinedPart + (type'ENamedElement'class'DefinedPart + (type'ENamedElement'class'UndefinedPart + (type'EPackage'class'DefinedPart + type'EPackage'class'UndefinedPart)))))))))))))))))))))))) +} +abstract sig util'Object { +} +sig type'EAttribute'class in type'EStructuralFeature'class { + eAttributeType'reference'EAttribute : one type'EDataType'class, + iD'attribute'EAttribute : lone util'boolean +} +sig type'EAnnotation'class in type'EModelElement'class + type'EModelElement'class'UndefinedPart { + details'reference'EAnnotation : set type'EStringToStringMapEntry'class, + eModelElement'reference'EAnnotation : lone type'EModelElement'class, + contents'reference'EAnnotation : set type'EObject'class, + references'reference'EAnnotation : set type'EObject'class, + source'attribute'EAnnotation : lone String +} +sig type'EClass'class in type'EClassifier'class { + eSuperTypes'reference'EClass : set type'EClass'class, + eOperations'reference'EClass : set type'EOperation'class, + eAllAttributes'reference'EClass : set type'EAttribute'class, + eAllReferences'reference'EClass : set type'EReference'class, + eReferences'reference'EClass : set type'EReference'class, + eAttributes'reference'EClass : set type'EAttribute'class, + eAllContainments'reference'EClass : set type'EReference'class, + eAllOperations'reference'EClass : set type'EOperation'class, + eAllStructuralFeatures'reference'EClass : set type'EStructuralFeature'class, + eAllSuperTypes'reference'EClass : set type'EClass'class, + eIDAttribute'reference'EClass : lone type'EAttribute'class, + eStructuralFeatures'reference'EClass : set type'EStructuralFeature'class, + eGenericSuperTypes'reference'EClass : set type'EGenericType'class, + eAllGenericSuperTypes'reference'EClass : set type'EGenericType'class, + abstract'attribute'EClass : lone util'boolean, + interface'attribute'EClass : lone util'boolean +} +sig type'EClassifier'class in type'ENamedElement'class + type'ENamedElement'class'UndefinedPart { + ePackage'reference'EClassifier : lone type'EPackage'class, + eTypeParameters'reference'EClassifier : set type'ETypeParameter'class, + instanceClassName'attribute'EClassifier : lone String, + instanceTypeName'attribute'EClassifier : lone String +} +sig type'EDataType'class in type'EClassifier'class { + serializable'attribute'EDataType : lone util'boolean +} +sig type'EEnum'class in type'EDataType'class { + eLiterals'reference'EEnum : set type'EEnumLiteral'class +} +sig type'EEnumLiteral'class in type'ENamedElement'class + type'ENamedElement'class'UndefinedPart { + eEnum'reference'EEnumLiteral : lone type'EEnum'class, + value'attribute'EEnumLiteral : lone Int, + literal'attribute'EEnumLiteral : lone String +} +sig type'EModelElement'class in util'Object { + eAnnotations'reference'EModelElement : set type'EAnnotation'class +} +sig type'ENamedElement'class in type'EModelElement'class { + name'attribute'ENamedElement : lone String +} +sig type'EObject'class in util'Object { +} +sig type'EOperation'class in type'ETypedElement'class { + eContainingClass'reference'EOperation : lone type'EClass'class, + eTypeParameters'reference'EOperation : set type'ETypeParameter'class, + eParameters'reference'EOperation : set type'EParameter'class, + eExceptions'reference'EOperation : set type'EClassifier'class, + eGenericExceptions'reference'EOperation : set type'EGenericType'class +} +sig type'EPackage'class in type'ENamedElement'class { + eClassifiers'reference'EPackage : set type'EClassifier'class, + eSubpackages'reference'EPackage : set type'EPackage'class, + eSuperPackage'reference'EPackage : lone type'EPackage'class, + nsURI'attribute'EPackage : lone String, + nsPrefix'attribute'EPackage : lone String +} +sig type'EParameter'class in type'ETypedElement'class { + eOperation'reference'EParameter : lone type'EOperation'class +} +sig type'EReference'class in type'EStructuralFeature'class { + eOpposite'reference'EReference : lone type'EReference'class, + eReferenceType'reference'EReference : one type'EClass'class, + eKeys'reference'EReference : set type'EAttribute'class, + containment'attribute'EReference : lone util'boolean, + container'attribute'EReference : lone util'boolean, + resolveProxies'attribute'EReference : lone util'boolean +} +sig type'EStructuralFeature'class in type'ETypedElement'class { + eContainingClass'reference'EStructuralFeature : lone type'EClass'class, + changeable'attribute'EStructuralFeature : lone util'boolean, + volatile'attribute'EStructuralFeature : lone util'boolean, + transient'attribute'EStructuralFeature : lone util'boolean, + defaultValueLiteral'attribute'EStructuralFeature : lone String, + unsettable'attribute'EStructuralFeature : lone util'boolean, + derived'attribute'EStructuralFeature : lone util'boolean +} +sig type'ETypedElement'class in type'ENamedElement'class + type'ENamedElement'class'UndefinedPart { + eType'reference'ETypedElement : lone type'EClassifier'class, + eGenericType'reference'ETypedElement : lone type'EGenericType'class, + ordered'attribute'ETypedElement : lone util'boolean, + unique'attribute'ETypedElement : lone util'boolean, + lowerBound'attribute'ETypedElement : lone Int, + upperBound'attribute'ETypedElement : lone Int, + many'attribute'ETypedElement : lone util'boolean, + required'attribute'ETypedElement : lone util'boolean +} +sig type'EStringToStringMapEntry'class in util'Object { + key'attribute'EStringToStringMapEntry : lone String, + value'attribute'EStringToStringMapEntry : lone String +} +sig type'EGenericType'class in util'Object { + eUpperBound'reference'EGenericType : lone type'EGenericType'class, + eTypeArguments'reference'EGenericType : set type'EGenericType'class, + eRawType'reference'EGenericType : one type'EClassifier'class, + eLowerBound'reference'EGenericType : lone type'EGenericType'class, + eTypeParameter'reference'EGenericType : lone type'ETypeParameter'class, + eClassifier'reference'EGenericType : lone type'EClassifier'class +} +sig type'ETypeParameter'class in type'ENamedElement'class + type'ENamedElement'class'UndefinedPart { + eBounds'reference'ETypeParameter : set type'EGenericType'class +} +sig type'EModelElement'class'DefinedPart in type'EModelElement'class { +} +sig type'EModelElement'class'UndefinedPart in type'EModelElement'class { +} +sig type'ENamedElement'class'DefinedPart in type'ENamedElement'class + type'EModelElement'class'DefinedPart { +} +sig type'ENamedElement'class'UndefinedPart in type'ENamedElement'class + type'EModelElement'class'UndefinedPart { +} +sig type'EPackage'class'DefinedPart in type'EPackage'class + type'ENamedElement'class'DefinedPart { +} +sig type'EPackage'class'UndefinedPart in type'EPackage'class + type'ENamedElement'class'UndefinedPart { +} +one sig element'o'1 in type'EModelElement'class'DefinedPart { +} +fact typedefinition'EModelElement'class'DefinedPart { + type'EModelElement'class'DefinedPart = element'o'1 +} +fact typedefinition'ENamedElement'class'DefinedPart { + type'ENamedElement'class'DefinedPart = element'o'1 +} +fact typedefinition'EPackage'class'DefinedPart { + type'EPackage'class'DefinedPart = element'o'1 +} +fact abstract'EAnnotation'class { + type'EAnnotation'class = type'EModelElement'class & type'EModelElement'class'UndefinedPart +} +fact abstract'EClassifier'class { + type'EClassifier'class = type'ENamedElement'class & type'ENamedElement'class'UndefinedPart +} +fact abstract'EEnumLiteral'class { + type'EEnumLiteral'class = type'ENamedElement'class & type'ENamedElement'class'UndefinedPart +} +fact abstract'ETypedElement'class { + type'ETypedElement'class = type'ENamedElement'class & type'ENamedElement'class'UndefinedPart +} +fact abstract'ETypeParameter'class { + type'ETypeParameter'class = type'ENamedElement'class & type'ENamedElement'class'UndefinedPart +} +fact abstract'ENamedElement'class'DefinedPart { + type'ENamedElement'class'DefinedPart = type'ENamedElement'class & type'EModelElement'class'DefinedPart +} +fact abstract'ENamedElement'class'UndefinedPart { + type'ENamedElement'class'UndefinedPart = type'ENamedElement'class & type'EModelElement'class'UndefinedPart +} +fact abstract'EPackage'class'DefinedPart { + type'EPackage'class'DefinedPart = type'EPackage'class & type'ENamedElement'class'DefinedPart +} +fact abstract'EPackage'class'UndefinedPart { + type'EPackage'class'UndefinedPart = type'EPackage'class & type'ENamedElement'class'UndefinedPart +} +fact abstract'EClassifier'class { + type'EClassifier'class = type'EClass'class + type'EDataType'class +} +fact abstract'EModelElement'class { + type'EModelElement'class = type'EAnnotation'class + (type'ENamedElement'class + (type'EModelElement'class'DefinedPart + type'EModelElement'class'UndefinedPart)) +} +fact abstract'ENamedElement'class { + type'ENamedElement'class = type'EClassifier'class + (type'EEnumLiteral'class + (type'EPackage'class + (type'ETypedElement'class + (type'ETypeParameter'class + (type'ENamedElement'class'DefinedPart + type'ENamedElement'class'UndefinedPart))))) +} +fact abstract'EPackage'class { + type'EPackage'class = type'EPackage'class'DefinedPart + type'EPackage'class'UndefinedPart +} +fact abstract'EStructuralFeature'class { + type'EStructuralFeature'class = type'EAttribute'class + type'EReference'class +} +fact abstract'ETypedElement'class { + type'ETypedElement'class = type'EOperation'class + (type'EParameter'class + type'EStructuralFeature'class) +} +fact abstract'EModelElement'class'DefinedPart { + type'EModelElement'class'DefinedPart = type'ENamedElement'class'DefinedPart +} +fact abstract'EModelElement'class'UndefinedPart { + type'EModelElement'class'UndefinedPart = type'EAnnotation'class + type'ENamedElement'class'UndefinedPart +} +fact abstract'ENamedElement'class'DefinedPart { + type'ENamedElement'class'DefinedPart = type'EPackage'class'DefinedPart +} +fact abstract'ENamedElement'class'UndefinedPart { + type'ENamedElement'class'UndefinedPart = type'EClassifier'class + (type'EEnumLiteral'class + (type'EPackage'class'UndefinedPart + (type'ETypedElement'class + type'ETypeParameter'class))) +} +fact ObjectTypeDefinition { + util'Object = type'EModelElement'class + (type'EObject'class + (type'EStringToStringMapEntry'class + type'EGenericType'class)) +} +fact common'types'EObject'class'EModelElement'class { + type'EObject'class & type'EModelElement'class = none +} +fact common'types'EStringToStringMapEntry'class'EModelElement'class { + type'EStringToStringMapEntry'class & type'EModelElement'class = none +} +fact common'types'EStringToStringMapEntry'class'EObject'class { + type'EStringToStringMapEntry'class & type'EObject'class = none +} +fact common'types'EGenericType'class'EModelElement'class { + type'EGenericType'class & type'EModelElement'class = none +} +fact common'types'EGenericType'class'EObject'class { + type'EGenericType'class & type'EObject'class = none +} +fact common'types'EGenericType'class'EStringToStringMapEntry'class { + type'EGenericType'class & type'EStringToStringMapEntry'class = none +} +fact common'types'EDataType'class'EClass'class { + type'EDataType'class & type'EClass'class = none +} +fact common'types'ENamedElement'class'EAnnotation'class { + type'ENamedElement'class & type'EAnnotation'class = none +} +fact common'types'EModelElement'class'DefinedPart'EAnnotation'class { + type'EModelElement'class'DefinedPart & type'EAnnotation'class = none +} +fact common'types'EModelElement'class'DefinedPart'ENamedElement'class { + type'EModelElement'class'DefinedPart & type'ENamedElement'class = type'ENamedElement'class'DefinedPart +} +fact common'types'EModelElement'class'UndefinedPart'EAnnotation'class { + type'EModelElement'class'UndefinedPart & type'EAnnotation'class = type'EAnnotation'class +} +fact common'types'EModelElement'class'UndefinedPart'ENamedElement'class { + type'EModelElement'class'UndefinedPart & type'ENamedElement'class = type'ENamedElement'class'UndefinedPart +} +fact common'types'EModelElement'class'UndefinedPart'EModelElement'class'DefinedPart { + type'EModelElement'class'UndefinedPart & type'EModelElement'class'DefinedPart = none +} +fact common'types'EEnumLiteral'class'EClassifier'class { + type'EEnumLiteral'class & type'EClassifier'class = none +} +fact common'types'EPackage'class'EClassifier'class { + type'EPackage'class & type'EClassifier'class = none +} +fact common'types'EPackage'class'EEnumLiteral'class { + type'EPackage'class & type'EEnumLiteral'class = none +} +fact common'types'ETypedElement'class'EClassifier'class { + type'ETypedElement'class & type'EClassifier'class = none +} +fact common'types'ETypedElement'class'EEnumLiteral'class { + type'ETypedElement'class & type'EEnumLiteral'class = none +} +fact common'types'ETypedElement'class'EPackage'class { + type'ETypedElement'class & type'EPackage'class = none +} +fact common'types'ETypeParameter'class'EClassifier'class { + type'ETypeParameter'class & type'EClassifier'class = none +} +fact common'types'ETypeParameter'class'EEnumLiteral'class { + type'ETypeParameter'class & type'EEnumLiteral'class = none +} +fact common'types'ETypeParameter'class'EPackage'class { + type'ETypeParameter'class & type'EPackage'class = none +} +fact common'types'ETypeParameter'class'ETypedElement'class { + type'ETypeParameter'class & type'ETypedElement'class = none +} +fact common'types'ENamedElement'class'DefinedPart'EClassifier'class { + type'ENamedElement'class'DefinedPart & type'EClassifier'class = none +} +fact common'types'ENamedElement'class'DefinedPart'EEnumLiteral'class { + type'ENamedElement'class'DefinedPart & type'EEnumLiteral'class = none +} +fact common'types'ENamedElement'class'DefinedPart'EPackage'class { + type'ENamedElement'class'DefinedPart & type'EPackage'class = type'EPackage'class'DefinedPart +} +fact common'types'ENamedElement'class'DefinedPart'ETypedElement'class { + type'ENamedElement'class'DefinedPart & type'ETypedElement'class = none +} +fact common'types'ENamedElement'class'DefinedPart'ETypeParameter'class { + type'ENamedElement'class'DefinedPart & type'ETypeParameter'class = none +} +fact common'types'ENamedElement'class'UndefinedPart'EClassifier'class { + type'ENamedElement'class'UndefinedPart & type'EClassifier'class = type'EClassifier'class +} +fact common'types'ENamedElement'class'UndefinedPart'EEnumLiteral'class { + type'ENamedElement'class'UndefinedPart & type'EEnumLiteral'class = type'EEnumLiteral'class +} +fact common'types'ENamedElement'class'UndefinedPart'EPackage'class { + type'ENamedElement'class'UndefinedPart & type'EPackage'class = type'EPackage'class'UndefinedPart +} +fact common'types'ENamedElement'class'UndefinedPart'ETypedElement'class { + type'ENamedElement'class'UndefinedPart & type'ETypedElement'class = type'ETypedElement'class +} +fact common'types'ENamedElement'class'UndefinedPart'ETypeParameter'class { + type'ENamedElement'class'UndefinedPart & type'ETypeParameter'class = type'ETypeParameter'class +} +fact common'types'ENamedElement'class'UndefinedPart'ENamedElement'class'DefinedPart { + type'ENamedElement'class'UndefinedPart & type'ENamedElement'class'DefinedPart = none +} +fact common'types'EPackage'class'UndefinedPart'EPackage'class'DefinedPart { + type'EPackage'class'UndefinedPart & type'EPackage'class'DefinedPart = none +} +fact common'types'EReference'class'EAttribute'class { + type'EReference'class & type'EAttribute'class = none +} +fact common'types'EParameter'class'EOperation'class { + type'EParameter'class & type'EOperation'class = none +} +fact common'types'EStructuralFeature'class'EOperation'class { + type'EStructuralFeature'class & type'EOperation'class = none +} +fact common'types'EStructuralFeature'class'EParameter'class { + type'EStructuralFeature'class & type'EParameter'class = none +} +fact common'types'ENamedElement'class'UndefinedPart'EAnnotation'class { + type'ENamedElement'class'UndefinedPart & type'EAnnotation'class = none +} +fact common'types'EEnumLiteral'class'EClassifier'class { + type'EEnumLiteral'class & type'EClassifier'class = none +} +fact common'types'EPackage'class'UndefinedPart'EClassifier'class { + type'EPackage'class'UndefinedPart & type'EClassifier'class = none +} +fact common'types'EPackage'class'UndefinedPart'EEnumLiteral'class { + type'EPackage'class'UndefinedPart & type'EEnumLiteral'class = none +} +fact common'types'ETypedElement'class'EClassifier'class { + type'ETypedElement'class & type'EClassifier'class = none +} +fact common'types'ETypedElement'class'EEnumLiteral'class { + type'ETypedElement'class & type'EEnumLiteral'class = none +} +fact common'types'ETypedElement'class'EPackage'class'UndefinedPart { + type'ETypedElement'class & type'EPackage'class'UndefinedPart = none +} +fact common'types'ETypeParameter'class'EClassifier'class { + type'ETypeParameter'class & type'EClassifier'class = none +} +fact common'types'ETypeParameter'class'EEnumLiteral'class { + type'ETypeParameter'class & type'EEnumLiteral'class = none +} +fact common'types'ETypeParameter'class'EPackage'class'UndefinedPart { + type'ETypeParameter'class & type'EPackage'class'UndefinedPart = none +} +fact common'types'ETypeParameter'class'ETypedElement'class { + type'ETypeParameter'class & type'ETypedElement'class = none +} +fact util'containmentDefinition { + util'language.util'contains = details'reference'EAnnotation + (contents'reference'EAnnotation + (eOperations'reference'EClass + (eStructuralFeatures'reference'EClass + (eGenericSuperTypes'reference'EClass + (eTypeParameters'reference'EClassifier + (eLiterals'reference'EEnum + (eAnnotations'reference'EModelElement + (eTypeParameters'reference'EOperation + (eParameters'reference'EOperation + (eGenericExceptions'reference'EOperation + (eClassifiers'reference'EPackage + (eSubpackages'reference'EPackage + (eGenericType'reference'ETypedElement + (eUpperBound'reference'EGenericType + (eTypeArguments'reference'EGenericType + (eLowerBound'reference'EGenericType + eBounds'reference'ETypeParameter)))))))))))))))) +} +fact util'noParentForRoot { + no parent: type'EEnumLiteral'class + (type'EEnum'class + (type'EAnnotation'class + (type'EDataType'class + (type'EGenericType'class + (type'ENamedElement'class + (type'EModelElement'class + (type'ETypedElement'class + (type'EAttribute'class + (type'EObject'class + (type'EClass'class + (type'EStringToStringMapEntry'class + (type'EPackage'class + (type'EReference'class + (type'EClassifier'class + (type'EOperation'class + (type'ETypeParameter'class + (type'EParameter'class + (type'EStructuralFeature'class + (type'EModelElement'class'DefinedPart + (type'EModelElement'class'UndefinedPart + (type'ENamedElement'class'DefinedPart + (type'ENamedElement'class'UndefinedPart + (type'EPackage'class'DefinedPart + type'EPackage'class'UndefinedPart))))))))))))))))))))))) { parent->(util'language.util'root) in util'language.util'contains } +} +fact util'atLeastOneParent { + all child: type'EEnumLiteral'class + (type'EEnum'class + (type'EAnnotation'class + (type'EDataType'class + (type'EGenericType'class + (type'ENamedElement'class + (type'EModelElement'class + (type'ETypedElement'class + (type'EAttribute'class + (type'EObject'class + (type'EClass'class + (type'EStringToStringMapEntry'class + (type'EPackage'class + (type'EReference'class + (type'EClassifier'class + (type'EOperation'class + (type'ETypeParameter'class + (type'EParameter'class + (type'EStructuralFeature'class + (type'EModelElement'class'DefinedPart + (type'EModelElement'class'UndefinedPart + (type'ENamedElement'class'DefinedPart + (type'ENamedElement'class'UndefinedPart + (type'EPackage'class'DefinedPart + type'EPackage'class'UndefinedPart))))))))))))))))))))))) { child = util'language.util'root or (some parent: type'EEnumLiteral'class + (type'EEnum'class + (type'EAnnotation'class + (type'EDataType'class + (type'EGenericType'class + (type'ENamedElement'class + (type'EModelElement'class + (type'ETypedElement'class + (type'EAttribute'class + (type'EObject'class + (type'EClass'class + (type'EStringToStringMapEntry'class + (type'EPackage'class + (type'EReference'class + (type'EClassifier'class + (type'EOperation'class + (type'ETypeParameter'class + (type'EParameter'class + (type'EStructuralFeature'class + (type'EModelElement'class'DefinedPart + (type'EModelElement'class'UndefinedPart + (type'ENamedElement'class'DefinedPart + (type'ENamedElement'class'UndefinedPart + (type'EPackage'class'DefinedPart + type'EPackage'class'UndefinedPart))))))))))))))))))))))) { parent->child in util'language.util'contains }) } +} +fact util'noCircularContainment { + no circle: type'EEnumLiteral'class + (type'EEnum'class + (type'EAnnotation'class + (type'EDataType'class + (type'EGenericType'class + (type'ENamedElement'class + (type'EModelElement'class + (type'ETypedElement'class + (type'EAttribute'class + (type'EObject'class + (type'EClass'class + (type'EStringToStringMapEntry'class + (type'EPackage'class + (type'EReference'class + (type'EClassifier'class + (type'EOperation'class + (type'ETypeParameter'class + (type'EParameter'class + (type'EStructuralFeature'class + (type'EModelElement'class'DefinedPart + (type'EModelElement'class'UndefinedPart + (type'ENamedElement'class'DefinedPart + (type'ENamedElement'class'UndefinedPart + (type'EPackage'class'DefinedPart + type'EPackage'class'UndefinedPart))))))))))))))))))))))) { circle->circle in ^ (util'language.util'contains) } +} +fact oppositeReference'eModelElement'EAnnotation { + eModelElement'reference'EAnnotation = ~ eAnnotations'reference'EModelElement +} +fact oppositeReference'eOperations'EClass { + eOperations'reference'EClass = ~ eContainingClass'reference'EOperation +} +fact oppositeReference'eStructuralFeatures'EClass { + eStructuralFeatures'reference'EClass = ~ eContainingClass'reference'EStructuralFeature +} +fact oppositeReference'ePackage'EClassifier { + ePackage'reference'EClassifier = ~ eClassifiers'reference'EPackage +} +fact oppositeReference'eLiterals'EEnum { + eLiterals'reference'EEnum = ~ eEnum'reference'EEnumLiteral +} +fact oppositeReference'eParameters'EOperation { + eParameters'reference'EOperation = ~ eOperation'reference'EParameter +} +fact oppositeReference'eSubpackages'EPackage { + eSubpackages'reference'EPackage = ~ eSuperPackage'reference'EPackage +} +fact PartialInterpretation'name'attribute'ENamedElement { + "packageName" in element'o'1.name'attribute'ENamedElement +} +fact PartialInterpretation'nsURI'attribute'EPackage { + "nsUri" in element'o'1.nsURI'attribute'EPackage +} +fact PartialInterpretation'nsPrefix'attribute'EPackage { + "nsPrefix" in element'o'1.nsPrefix'attribute'EPackage +} +fact EnsureAllStrings { + "A" = "A" && ("B" = "B" && ("nsPrefix" = "nsPrefix" && ("nsUri" = "nsUri" && "packageName" = "packageName"))) +} +run { } for exactly 6 util'Object , 2 Int , exactly 0 String \ No newline at end of file diff --git a/Tests/Ecore-Plugin/outputs/log.txt b/Tests/Ecore-Plugin/outputs/log.txt new file mode 100644 index 00000000..4add290c --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/log.txt @@ -0,0 +1 @@ +Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model 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, 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, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: Visualisations: Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: Visualisations: Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: Visualisations: Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: Visualisations: Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: Visualisations: Model generation finished \ No newline at end of file diff --git a/Tests/Ecore-Plugin/outputs/models/1.gml b/Tests/Ecore-Plugin/outputs/models/1.gml new file mode 100644 index 00000000..011b5f22 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/models/1.gml @@ -0,0 +1,2629 @@ +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 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 9 + 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 10 + 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 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 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 " + EModelElement class + ENamedElement class + EReference class + EStructuralFeature class + ETypedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 13 + 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 14 + 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 15 + 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 16 + 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 8 + 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 10 + 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 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eReferences reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eAllStructuralFeatures 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 12 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eStructuralFeatures reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 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 8 + 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 10 + 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 9 + 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 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 12 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eOpposite reference EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eReferenceType reference EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eContainingClass reference EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eType reference ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + 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 10 + 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 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 1 + 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 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 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 7 + 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 11 + 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 9 + 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 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 7 + 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 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "containment attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "container attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "changeable attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "volatile attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "transient attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "defaultValueLiteral attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "unsettable attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "derived attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ordered attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + 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 12 + target 4 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "lowerBound attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "upperBound attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "many attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "required attribute ETypedElement" + 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 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 13 + 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 14 + 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 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 " + EEnumLiteral 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 13 + 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 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 14 + target 15 + 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 15 + target 14 + 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 13 + 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 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 13 + target 9 + 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 12 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 14 + 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 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 14 + 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 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 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" + ] + ] +] diff --git a/Tests/Ecore-Plugin/outputs/models/1.png b/Tests/Ecore-Plugin/outputs/models/1.png new file mode 100644 index 00000000..39e53424 Binary files /dev/null and b/Tests/Ecore-Plugin/outputs/models/1.png differ diff --git a/Tests/Ecore-Plugin/outputs/models/1.xmi b/Tests/Ecore-Plugin/outputs/models/1.xmi new file mode 100644 index 00000000..cfd0f3d5 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/models/1.xmi @@ -0,0 +1,9 @@ + + + +
+
+
+
+ + diff --git a/Tests/Ecore-Plugin/outputs/models/2.gml b/Tests/Ecore-Plugin/outputs/models/2.gml new file mode 100644 index 00000000..e7b87333 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/models/2.gml @@ -0,0 +1,2667 @@ +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 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 9 + 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 10 + 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 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 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 " + EModelElement class + ENamedElement class + EReference class + EStructuralFeature class + ETypedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 13 + 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 14 + 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 15 + 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 16 + 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 8 + 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 10 + 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 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eReferences reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eAllStructuralFeatures 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 12 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eStructuralFeatures reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 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 8 + 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 10 + 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 9 + 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 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 12 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eOpposite reference EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eReferenceType reference EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eContainingClass reference EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eType reference ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + 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 10 + 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 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 1 + 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 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 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 7 + 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 11 + 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 9 + 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 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 7 + 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 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "containment attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "container attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "resolveProxies attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "changeable attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "volatile attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "transient attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "defaultValueLiteral attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "unsettable attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "derived attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ordered attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + 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 12 + target 4 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "lowerBound attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "upperBound attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "many attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "required attribute ETypedElement" + 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 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 13 + 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 14 + 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 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 " + EEnumLiteral 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 13 + 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 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 14 + target 15 + 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 15 + target 14 + 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 13 + 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 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 13 + target 9 + 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 12 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 14 + 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 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 14 + 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 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 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 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" + ] + ] +] diff --git a/Tests/Ecore-Plugin/outputs/models/2.png b/Tests/Ecore-Plugin/outputs/models/2.png new file mode 100644 index 00000000..344b27e9 Binary files /dev/null and b/Tests/Ecore-Plugin/outputs/models/2.png differ diff --git a/Tests/Ecore-Plugin/outputs/models/2.xmi b/Tests/Ecore-Plugin/outputs/models/2.xmi new file mode 100644 index 00000000..e5a2408a --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/models/2.xmi @@ -0,0 +1,9 @@ + + + +
+
+
+ + + diff --git a/Tests/Ecore-Plugin/outputs/models/3.gml b/Tests/Ecore-Plugin/outputs/models/3.gml new file mode 100644 index 00000000..eb6046af --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/models/3.gml @@ -0,0 +1,2705 @@ +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 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 9 + 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 10 + 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 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 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 " + EModelElement class + ENamedElement class + EReference class + EStructuralFeature class + ETypedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 13 + 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 14 + 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 15 + 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 16 + 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 8 + 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 10 + 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 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eReferences reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eAllContainments reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eAllStructuralFeatures 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 12 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eStructuralFeatures reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 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 8 + 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 10 + 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 9 + 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 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 12 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eOpposite reference EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eReferenceType reference EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eContainingClass reference EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eType reference ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + 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 10 + 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 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 1 + 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 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 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 7 + 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 11 + 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 9 + 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 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 7 + 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 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "containment attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "container attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "resolveProxies attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "changeable attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "volatile attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "transient attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "defaultValueLiteral attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "unsettable attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "derived attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ordered attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + 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 12 + target 4 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "lowerBound attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "upperBound attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "many attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "required attribute ETypedElement" + 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 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 13 + 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 14 + 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 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 " + EEnumLiteral 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 13 + 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 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 14 + target 15 + 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 15 + target 14 + 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 13 + 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 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 13 + target 9 + 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 12 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 14 + 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 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 14 + 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 15 + target 8 + 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 11 + 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 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 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" + ] + ] +] diff --git a/Tests/Ecore-Plugin/outputs/models/3.png b/Tests/Ecore-Plugin/outputs/models/3.png new file mode 100644 index 00000000..7044ba5e Binary files /dev/null and b/Tests/Ecore-Plugin/outputs/models/3.png differ diff --git a/Tests/Ecore-Plugin/outputs/models/3.xmi b/Tests/Ecore-Plugin/outputs/models/3.xmi new file mode 100644 index 00000000..fcf98122 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/models/3.xmi @@ -0,0 +1,9 @@ + + + +
+
+
+ + + diff --git a/Tests/Ecore-Plugin/outputs/models/4.gml b/Tests/Ecore-Plugin/outputs/models/4.gml new file mode 100644 index 00000000..5a17812b --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/models/4.gml @@ -0,0 +1,2743 @@ +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 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 9 + 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 10 + 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 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 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 " + EModelElement class + ENamedElement class + EReference class + EStructuralFeature class + ETypedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 13 + 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 14 + 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 15 + 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 16 + 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 8 + 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 10 + 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 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eAllReferences reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eReferences reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eAllContainments reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eAllStructuralFeatures 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 12 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eStructuralFeatures reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 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 8 + 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 10 + 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 9 + 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 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 12 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eOpposite reference EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eReferenceType reference EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eContainingClass reference EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eType reference ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + 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 10 + 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 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 1 + 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 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 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 7 + 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 11 + 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 9 + 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 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 7 + 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 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "containment attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "container attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "resolveProxies attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "changeable attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "volatile attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "transient attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "defaultValueLiteral attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "unsettable attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "derived attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ordered attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + 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 12 + target 4 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "lowerBound attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "upperBound attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "many attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "required attribute ETypedElement" + 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 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 13 + 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 14 + 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 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 " + EEnumLiteral 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 13 + 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 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 14 + target 15 + 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 15 + target 14 + 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 13 + 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 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 13 + target 9 + 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 12 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 14 + 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 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 14 + 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 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 15 + target 8 + 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 11 + 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 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 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" + ] + ] +] diff --git a/Tests/Ecore-Plugin/outputs/models/4.png b/Tests/Ecore-Plugin/outputs/models/4.png new file mode 100644 index 00000000..ae461ce6 Binary files /dev/null and b/Tests/Ecore-Plugin/outputs/models/4.png differ diff --git a/Tests/Ecore-Plugin/outputs/models/4.xmi b/Tests/Ecore-Plugin/outputs/models/4.xmi new file mode 100644 index 00000000..dba5a3f6 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/models/4.xmi @@ -0,0 +1,9 @@ + + + +
+
+
+ + + diff --git a/Tests/Ecore-Plugin/outputs/models/5.gml b/Tests/Ecore-Plugin/outputs/models/5.gml new file mode 100644 index 00000000..7eedbcf9 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/models/5.gml @@ -0,0 +1,2781 @@ +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 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 9 + 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 10 + 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 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 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 " + EModelElement class + ENamedElement class + EReference class + EStructuralFeature class + ETypedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 13 + 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 14 + 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 15 + 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 16 + 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 8 + 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 10 + 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 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eAllReferences reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eReferences reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eAllContainments reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eAllStructuralFeatures 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 12 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eStructuralFeatures reference EClass" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 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 8 + 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 10 + 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 9 + 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 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 12 + target 12 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eOpposite reference EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eReferenceType reference EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eContainingClass reference EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eType reference ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + 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 10 + 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 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 1 + 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 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + 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 7 + 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 11 + 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 9 + 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 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 7 + 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 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "containment attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "container attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "resolveProxies attribute EReference" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "changeable attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "volatile attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "transient attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "defaultValueLiteral attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "unsettable attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "derived attribute EStructuralFeature" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ordered attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + 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 12 + target 4 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "lowerBound attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "upperBound attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "many attribute ETypedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "required attribute ETypedElement" + 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 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 13 + 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 14 + 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 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 " + EEnumLiteral 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 13 + 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 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 14 + target 15 + 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 15 + target 14 + 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 13 + 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 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 13 + target 9 + 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 12 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 14 + 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 11 + target 7 + 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 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "serializable attribute EDataType" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 14 + 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 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 15 + target 8 + 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 11 + 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 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 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" + ] + ] +] diff --git a/Tests/Ecore-Plugin/outputs/models/5.png b/Tests/Ecore-Plugin/outputs/models/5.png new file mode 100644 index 00000000..e29bebfa Binary files /dev/null and b/Tests/Ecore-Plugin/outputs/models/5.png differ diff --git a/Tests/Ecore-Plugin/outputs/models/5.xmi b/Tests/Ecore-Plugin/outputs/models/5.xmi new file mode 100644 index 00000000..a2bb293b --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/models/5.xmi @@ -0,0 +1,9 @@ + + + +
+
+
+ + + diff --git a/Tests/Ecore-Plugin/outputs/statistics.csv b/Tests/Ecore-Plugin/outputs/statistics.csv new file mode 100644 index 00000000..2b912cc5 --- /dev/null +++ b/Tests/Ecore-Plugin/outputs/statistics.csv @@ -0,0 +1,64 @@ +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 +1;1;ModelResultImpl;963;10981;20587;28028267344;944;963;974;985;998;675;331;46;0;41 +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;1485;7933;16659;19719216169;660;682;697;715;728;533;354;29;0;55 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;Answer0Time;Answer1Time;Answer2Time;Answer3Time;Answer4Time;Alloy2KodKodTransformationTime;warnings +2;1;ModelResultImpl;1032;4928;-1;660853711;1387;1438;1485;1539;1580;859;[== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String}] +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;Answer0Time;Answer1Time;Answer2Time;Answer3Time;Answer4Time;Alloy2KodKodTransformationTime;warnings +2;1;ModelResultImpl;62;1991;-1;403150236;187;206;224;249;269;180;[== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String}] +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;Answer0Time;Answer1Time;Answer2Time;Answer3Time;Answer4Time;Alloy2KodKodTransformationTime;warnings +2;1;ModelResultImpl;1370;5611;-1;106059204862;983;1046;1085;1150;1184;481;[== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String}] +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;Answer0Time;Answer1Time;Answer2Time;Answer3Time;Answer4Time;Alloy2KodKodTransformationTime;warnings +2;1;ModelResultImpl;82;2461;-1;254200930176;282;310;343;374;403;169;[== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String}] +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;Answer0Time;Answer1Time;Answer2Time;Answer3Time;Answer4Time;Alloy2KodKodTransformationTime;warnings +2;1;ModelResultImpl;1159;5901;-1;200731387125;1011;1099;1186;1269;1371;365;[== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String},== is redundant, because the left and right expressions always have the same value. +Left type = {String} +Right type = {String}] -- cgit v1.2.3-70-g09d2