From f1d9a50a3be2bfabc6091d51e120ca63ac1ab2d4 Mon Sep 17 00:00:00 2001 From: ArenBabikian Date: Fri, 15 Feb 2019 12:42:15 -0500 Subject: Set up #19 --- .../.classpath | 8 + .../.gitignore | 1 + .../.project | 34 + .../.settings/org.eclipse.jdt.core.prefs | 7 + .../META-INF/MANIFEST.MF | 28 + .../build.properties | 7 + .../configurations/ecore.vsconfig | 33 + .../configurations/fam.vsconfig | 25 + .../configurations/fileSystem.vsconfig | 25 + .../configurations/yakindu.vsconfig | 25 + .../instanceModels/ecoreInstance.xmi | 6 + .../instanceModels/famInstance.xmi | 4 + .../instanceModels/filesystemInstance.xmi | 3 + .../instanceModels/yakinduInstance.xmi | 3 + .../metamodels/fam.ecore | 68 + .../metamodels/fam.genmodel | 49 + .../metamodels/filesystem.ecore | 32 + .../metamodels/filesystem.genmodel | 26 + .../metamodels/yakindu.ecore | 26 + .../metamodels/yakindu.genmodel | 34 + .../outputs/fam/debug/errors.txt | 195 + .../fam/debug/generated3valued.vql_deactivated | 31733 +++++++++++++++++++ .../outputs/fam/debug/generation.logicproblem | 2059 ++ .../outputs/fam/debug/init.partialmodel | 497 + .../outputs/fam/log.txt | 1 + .../outputs/fam/models/1.gml | 7641 +++++ .../outputs/fam/models/1.png | Bin 0 -> 141462 bytes .../outputs/fam/models/1.xmi | 9 + .../outputs/fam/models/2.gml | 4762 +++ .../outputs/fam/models/2.png | Bin 0 -> 151601 bytes .../outputs/fam/models/2.xmi | 9 + .../outputs/fam/models/3.gml | 2069 ++ .../outputs/fam/models/3.png | Bin 0 -> 157309 bytes .../outputs/fam/models/3.xmi | 9 + .../outputs/fam/models/4.gml | 1184 + .../outputs/fam/models/4.png | Bin 0 -> 162587 bytes .../outputs/fam/models/4.xmi | 9 + .../outputs/fam/models/5.gml | 1203 + .../outputs/fam/models/5.png | Bin 0 -> 168585 bytes .../outputs/fam/models/5.xmi | 9 + .../outputs/fam/statistics.csv | 32 + .../outputs/yakindu/debug/errors.txt | 21 + .../yakindu/debug/generated3valued.vql_deactivated | 1472 + .../outputs/yakindu/debug/generation.logicproblem | 171 + .../outputs/yakindu/debug/init.partialmodel | 106 + .../outputs/yakindu/log.txt | 1 + .../outputs/yakindu/models/1.gml | 479 + .../outputs/yakindu/models/1.png | Bin 0 -> 30880 bytes .../outputs/yakindu/models/1.xmi | 9 + .../outputs/yakindu/models/2.gml | 479 + .../outputs/yakindu/models/2.png | Bin 0 -> 36094 bytes .../outputs/yakindu/models/2.xmi | 9 + .../outputs/yakindu/statistics.csv | 2 + .../plugin.properties | 4 + .../plugin.xml | 26 + .../standalone/test/ecore/queries/Ecore.vql | 29 + .../standalone/test/fam/FAMTerminator.java | 52 + .../dslreasoner/standalone/test/fam/Function.java | 61 + .../standalone/test/fam/FunctionType.java | 241 + .../test/fam/FunctionalArchitectureModel.java | 42 + .../standalone/test/fam/FunctionalData.java | 81 + .../standalone/test/fam/FunctionalElement.java | 109 + .../standalone/test/fam/FunctionalInput.java | 42 + .../standalone/test/fam/FunctionalInterface.java | 73 + .../standalone/test/fam/FunctionalOutput.java | 42 + .../standalone/test/fam/InformationLink.java | 81 + .../standalone/test/fam/famFactory.java | 96 + .../standalone/test/fam/famPackage.java | 1032 + .../test/fam/impl/FAMTerminatorImpl.java | 196 + .../standalone/test/fam/impl/FunctionImpl.java | 191 + .../fam/impl/FunctionalArchitectureModelImpl.java | 152 + .../test/fam/impl/FunctionalDataImpl.java | 267 + .../test/fam/impl/FunctionalElementImpl.java | 318 + .../test/fam/impl/FunctionalInputImpl.java | 165 + .../test/fam/impl/FunctionalInterfaceImpl.java | 243 + .../test/fam/impl/FunctionalOutputImpl.java | 165 + .../test/fam/impl/InformationLinkImpl.java | 285 + .../standalone/test/fam/impl/famFactoryImpl.java | 219 + .../standalone/test/fam/impl/famPackageImpl.java | 574 + .../standalone/test/fam/queries/famPatterns.vql | 103 + .../test/fam/util/famAdapterFactory.java | 271 + .../standalone/test/fam/util/famSwitch.java | 289 + .../standalone/test/filesystem/Dir.java | 42 + .../standalone/test/filesystem/FSObject.java | 52 + .../standalone/test/filesystem/File.java | 17 + .../standalone/test/filesystem/FileSystem.java | 70 + .../standalone/test/filesystem/Model.java | 69 + .../test/filesystem/filesystemFactory.java | 69 + .../test/filesystem/filesystemPackage.java | 511 + .../standalone/test/filesystem/impl/DirImpl.java | 165 + .../test/filesystem/impl/FSObjectImpl.java | 196 + .../standalone/test/filesystem/impl/FileImpl.java | 37 + .../test/filesystem/impl/FileSystemImpl.java | 205 + .../standalone/test/filesystem/impl/ModelImpl.java | 221 + .../filesystem/impl/filesystemFactoryImpl.java | 128 + .../filesystem/impl/filesystemPackageImpl.java | 356 + .../test/filesystem/queries/FileSystem.vql | 24 + .../filesystem/util/filesystemAdapterFactory.java | 192 + .../test/filesystem/util/filesystemSwitch.java | 196 + .../standalone/test/yakindu/Choice.java | 17 + .../standalone/test/yakindu/CompositeElement.java | 42 + .../dslreasoner/standalone/test/yakindu/Entry.java | 17 + .../dslreasoner/standalone/test/yakindu/Exit.java | 17 + .../standalone/test/yakindu/FinalState.java | 17 + .../standalone/test/yakindu/Pseudostate.java | 17 + .../standalone/test/yakindu/Region.java | 42 + .../standalone/test/yakindu/RegularState.java | 17 + .../dslreasoner/standalone/test/yakindu/State.java | 17 + .../standalone/test/yakindu/Statechart.java | 17 + .../standalone/test/yakindu/Synchronization.java | 17 + .../standalone/test/yakindu/Transition.java | 81 + .../standalone/test/yakindu/Vertex.java | 63 + .../standalone/test/yakindu/impl/ChoiceImpl.java | 37 + .../test/yakindu/impl/CompositeElementImpl.java | 152 + .../standalone/test/yakindu/impl/EntryImpl.java | 37 + .../standalone/test/yakindu/impl/ExitImpl.java | 37 + .../test/yakindu/impl/FinalStateImpl.java | 37 + .../test/yakindu/impl/PseudostateImpl.java | 37 + .../standalone/test/yakindu/impl/RegionImpl.java | 152 + .../test/yakindu/impl/RegularStateImpl.java | 37 + .../standalone/test/yakindu/impl/StateImpl.java | 183 + .../test/yakindu/impl/StatechartImpl.java | 37 + .../test/yakindu/impl/SynchronizationImpl.java | 37 + .../test/yakindu/impl/TransitionImpl.java | 284 + .../standalone/test/yakindu/impl/VertexImpl.java | 206 + .../test/yakindu/impl/yakinduFactoryImpl.java | 183 + .../test/yakindu/impl/yakinduPackageImpl.java | 494 + .../yakindu/queries/yakinduMutatedPatterns.vql | 270 + .../test/yakindu/queries/yakinduPatterns.vql | 227 + .../test/yakindu/util/yakinduAdapterFactory.java | 336 + .../test/yakindu/util/yakinduSwitch.java | 378 + .../standalone/test/yakindu/yakinduFactory.java | 114 + .../standalone/test/yakindu/yakinduPackage.java | 1038 + 133 files changed, 67307 insertions(+) create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.classpath create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.gitignore create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.project create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.settings/org.eclipse.jdt.core.prefs create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/META-INF/MANIFEST.MF create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/build.properties create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/ecore.vsconfig create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fam.vsconfig create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fileSystem.vsconfig create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/yakindu.vsconfig create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/ecoreInstance.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/famInstance.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/filesystemInstance.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/yakinduInstance.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.ecore create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.genmodel create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.ecore create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.genmodel create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/yakindu.ecore create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/yakindu.genmodel create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/init.partialmodel create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/errors.txt create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generation.logicproblem create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/init.partialmodel create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/log.txt create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.gml create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.png create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.gml create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.png create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.xmi create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/statistics.csv create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.properties create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FAMTerminator.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/Function.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionType.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalArchitectureModel.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalData.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalElement.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalInput.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalInterface.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalOutput.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/InformationLink.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/famFactory.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/famPackage.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FAMTerminatorImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalArchitectureModelImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalDataImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalElementImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalInputImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalInterfaceImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalOutputImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/InformationLinkImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famFactoryImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famPackageImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/util/famAdapterFactory.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/util/famSwitch.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Dir.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FSObject.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/File.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FileSystem.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Model.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemFactory.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemPackage.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemAdapterFactory.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemSwitch.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Choice.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/CompositeElement.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Entry.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Exit.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/FinalState.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Pseudostate.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Region.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/RegularState.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/State.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Statechart.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Synchronization.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Transition.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Vertex.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ChoiceImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/CompositeElementImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/EntryImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ExitImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/FinalStateImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/PseudostateImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegionImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegularStateImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StatechartImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/SynchronizationImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/TransitionImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/VertexImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduFactoryImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduPackageImpl.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduMutatedPatterns.vql create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/util/yakinduAdapterFactory.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/util/yakinduSwitch.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/yakinduFactory.java create mode 100644 Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/yakinduPackage.java diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.classpath b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.classpath new file mode 100644 index 00000000..d8bd95f6 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.classpath @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.gitignore b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.gitignore new file mode 100644 index 00000000..ae3c1726 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.project b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.project new file mode 100644 index 00000000..c2212771 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.project @@ -0,0 +1,34 @@ + + + ca.mcgill.ecse.dslreasoner.standalone.test + + + + + + org.eclipse.viatra.query.tooling.ui.projectbuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.viatra.query.projectnature + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.settings/org.eclipse.jdt.core.prefs b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..295926d9 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/.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/ca.mcgill.ecse.dslreasoner.standalone.test/META-INF/MANIFEST.MF b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/META-INF/MANIFEST.MF new file mode 100644 index 00000000..ca7ad11c --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/META-INF/MANIFEST.MF @@ -0,0 +1,28 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: ca.mcgill.ecse.dslreasoner.standalone.test;singleton:=true +Bundle-Version: 1.0.0.qualifier +Bundle-ClassPath: . +Bundle-Vendor: %providerName +Bundle-Localization: plugin +Export-Package: ca.mcgill.ecse.dslreasoner.standalone.test.fam, + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl, + ca.mcgill.ecse.dslreasoner.standalone.test.fam.util, + ca.mcgill.ecse.dslreasoner.standalone.test.yakindu, + ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl, + ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.util, + ca.mcgill.ecse.dslreasoner.standalone.test.filesystem, + ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl, + ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.util +Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime, + org.eclipse.core.runtime;bundle-version="3.13.0", + org.eclipse.emf.ecore;bundle-version="2.13.0";visibility:=reexport, + org.eclipse.viatra.query.runtime;bundle-version="2.1.0", + org.eclipse.viatra.query.runtime.rete;bundle-version="2.1.0", + org.eclipse.viatra.query.runtime.localsearch;bundle-version="2.1.0", + org.eclipse.xtext.xbase.lib;bundle-version="2.12.0" +Import-Package: org.apache.log4j +Automatic-Module-Name: ca.mcgill.ecse.dslreasoner.standalone.test +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/build.properties b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/build.properties new file mode 100644 index 00000000..8ae35ddd --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/build.properties @@ -0,0 +1,7 @@ +bin.includes = META-INF/,\ + plugin.xml,\ + plugin.properties + +jars.compile.order = . +source.. = src/ +output.. = bin/ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/ecore.vsconfig b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/ecore.vsconfig new file mode 100644 index 00000000..e5873211 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/ecore.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 = ViatraSolver + scope = { + #node += 5, + #string += { "A", "B" }, + #int += {0,1,-1} + } + + config = { + runtime = 10000, + log-level = normal + } + + number = 5 + runs = 1 + + debug = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug" + log = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt" + output = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models" + statistics = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv" +} \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fam.vsconfig b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fam.vsconfig new file mode 100644 index 00000000..f4f29089 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fam.vsconfig @@ -0,0 +1,25 @@ +import epackage "FamMetamodel" +//import viatra "ca.mcgill.ecse.dslreasoner.standalone.test.queries.fam.FamPatterns" + +generate { + metamodel = { package fam } +// constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.xyz } + partial-model = { "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/famInstance.xmi"} + solver = ViatraSolver + scope = { + #node = 5 + } + + config = { + runtime = 10000, + log-level = normal + } + + number = 2 + runs = 1 + + debug = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug" + log = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt" + output = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models" + statistics = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv" +} \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fileSystem.vsconfig b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fileSystem.vsconfig new file mode 100644 index 00000000..64775e8d --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/fileSystem.vsconfig @@ -0,0 +1,25 @@ +import epackage "FileSystemMetamodel" +//import viatra "" + +generate { + metamodel = { package filesystem } +// constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.xyz } + partial-model = { "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/filesystemInstance.xmi"} + solver = ViatraSolver + scope = { + #node = 5 + } + + config = { + runtime = 10000, + log-level = normal + } + + number = 2 + runs = 1 + + debug = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug" + log = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/log.txt" + output = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models" + statistics = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/statistics.csv" +} \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/yakindu.vsconfig b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/yakindu.vsconfig new file mode 100644 index 00000000..246337de --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configurations/yakindu.vsconfig @@ -0,0 +1,25 @@ +import epackage "YakinduMetamodel" +//import viatra "" + +generate { + metamodel = { package yakindu } +// constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.xyz } + partial-model = { "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/yakinduInstance.xmi"} + solver = ViatraSolver + scope = { + #node = 5 + } + + config = { + runtime = 10000, + log-level = normal + } + + number = 2 + runs = 1 + + debug = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug" + log = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/log.txt" + output = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models" + statistics = "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/statistics.csv" +} \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/ecoreInstance.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/ecoreInstance.xmi new file mode 100644 index 00000000..867e5049 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/ecoreInstance.xmi @@ -0,0 +1,6 @@ + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/famInstance.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/famInstance.xmi new file mode 100644 index 00000000..1ae86782 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/famInstance.xmi @@ -0,0 +1,4 @@ + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/filesystemInstance.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/filesystemInstance.xmi new file mode 100644 index 00000000..06d5d6d1 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/filesystemInstance.xmi @@ -0,0 +1,3 @@ + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/yakinduInstance.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/yakinduInstance.xmi new file mode 100644 index 00000000..e5f1099f --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/yakinduInstance.xmi @@ -0,0 +1,3 @@ + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.ecore b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.ecore new file mode 100644 index 00000000..498e9838 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.ecore @@ -0,0 +1,68 @@ + + + +
+ + + + + +
+ + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.genmodel b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.genmodel new file mode 100644 index 00000000..3d26d5c4 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/fam.genmodel @@ -0,0 +1,49 @@ + + + fam.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.ecore b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.ecore new file mode 100644 index 00000000..3dd2061b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.ecore @@ -0,0 +1,32 @@ + + + +
+ + + + + +
+ + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.genmodel b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.genmodel new file mode 100644 index 00000000..712533fe --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/filesystem.genmodel @@ -0,0 +1,26 @@ + + + filesystem.ecore + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/yakindu.ecore b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/yakindu.ecore new file mode 100644 index 00000000..0c944db8 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/yakindu.ecore @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/yakindu.genmodel b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/yakindu.genmodel new file mode 100644 index 00000000..b1f75d76 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/metamodels/yakindu.genmodel @@ -0,0 +1,34 @@ + + + yakindu.ecore + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt new file mode 100644 index 00000000..94b0f4e3 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt @@ -0,0 +1,195 @@ +Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (NullPointerException): + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.lambda$8(QueryLoader.java:108) + org.eclipse.xtext.xbase.lib.internal.BooleanFunctionDelegate.apply(BooleanFunctionDelegate.java:41) + com.google.common.collect.Iterators$6.computeNext(Iterators.java:617) + com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145) + com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140) + com.google.common.collect.Iterators.addAll(Iterators.java:366) + com.google.common.collect.Iterables.addAll(Iterables.java:332) + com.google.common.collect.Sets.newLinkedHashSet(Sets.java:383) + org.eclipse.xtext.xbase.lib.IterableExtensions.toSet(IterableExtensions.java:592) + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader._getPatterns(QueryLoader.java:84) + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.getPatterns(QueryLoader.java:213) + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.loadQueries(QueryLoader.java:54) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:167) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.fam.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.xyz.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalStateException): Query ca.mcgill.ecse.dslreasoner.standalone.test.xyz.terminatorAndInformation contains errors. + org.eclipse.viatra.query.runtime.matchers.util.Preconditions.checkState(Preconditions.java:144) + org.eclipse.viatra.query.patternlanguage.emf.specification.GenericEMFPatternPQuery.getDisjunctBodies(GenericEMFPatternPQuery.java:161) + org.eclipse.viatra.query.runtime.matchers.psystem.rewriters.PDisjunctionRewriter.rewrite(PDisjunctionRewriter.java:26) + hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic.transformQueries(Viatra2Logic.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:196) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (NullPointerException): + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.lambda$8(QueryLoader.java:108) + org.eclipse.xtext.xbase.lib.internal.BooleanFunctionDelegate.apply(BooleanFunctionDelegate.java:41) + com.google.common.collect.Iterators$6.computeNext(Iterators.java:617) + com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145) + com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140) + com.google.common.collect.Iterators.addAll(Iterators.java:366) + com.google.common.collect.Iterables.addAll(Iterables.java:332) + com.google.common.collect.Sets.newLinkedHashSet(Sets.java:383) + org.eclipse.xtext.xbase.lib.IterableExtensions.toSet(IterableExtensions.java:592) + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader._getPatterns(QueryLoader.java:84) + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.getPatterns(QueryLoader.java:213) + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.loadQueries(QueryLoader.java:54) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:167) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (NullPointerException): + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.lambda$8(QueryLoader.java:108) + org.eclipse.xtext.xbase.lib.internal.BooleanFunctionDelegate.apply(BooleanFunctionDelegate.java:41) + com.google.common.collect.Iterators$6.computeNext(Iterators.java:617) + com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:145) + com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:140) + com.google.common.collect.Iterators.addAll(Iterators.java:366) + com.google.common.collect.Iterables.addAll(Iterables.java:332) + com.google.common.collect.Sets.newLinkedHashSet(Sets.java:383) + org.eclipse.xtext.xbase.lib.IterableExtensions.toSet(IterableExtensions.java:592) + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader._getPatterns(QueryLoader.java:84) + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.getPatterns(QueryLoader.java:213) + hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader.loadQueries(QueryLoader.java:54) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:167) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (UnsupportedOperationException): Unsupported attribute type: EJavaClass of org.eclipse.emf.ecore.impl.EcorePackageImpl@eddc9bb (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:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated new file mode 100644 index 00000000..88497c64 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated @@ -0,0 +1,31733 @@ +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } + +////////// +// 1.3 Relation Definition Indexers +////////// +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_I); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_In); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Root); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Par); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// +pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); +} + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// +pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); +} + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +}import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } + +////////// +// 1.3 Relation Definition Indexers +////////// +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_I); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_In); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Root); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Par); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// +pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); +} + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// +pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); +} + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } + +////////// +// 1.3 Relation Definition Indexers +////////// +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_I); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_In); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Root); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Par); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 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 mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } + +////////// +// 1.3 Relation Definition Indexers +////////// +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_I); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_In); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Root); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Par); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 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 mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } + +////////// +// 1.3 Relation Definition Indexers +////////// +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_I); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_In); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Root); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Par); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type(problem,interpretation,source,target); + } + +////////// +// 1.3 Relation Definition Indexers +////////// +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam terminatorAndInformation +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_I); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_In); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam type +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,var_This,_var__Par); + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam rootElements +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Root); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam parent +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Par); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam model +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// +pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); +} + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// +pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_terminatorAndInformation(problem,interpretation,var_T,var_I); +} + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ + private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_model(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_type(problem,interpretation,source,target); + } +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ + private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) + { + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_type(problem,interpretation,source,target); + } + +////////// +// 1.3 Relation Definition Indexers +////////// +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test xyz terminatorAndInformation +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mayInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_I); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mayInstanceOfInformationLink_class(problem,interpretation,var_I); + find mayInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_In); + find mayInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mayInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_T); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation( + problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,var_Out,var_virtual0); + find mustInstanceOfInformationLink_class(problem,interpretation,var_virtual0); + var_virtual0 == var_I; + find mustInstanceOfFunctionalOutput_class(problem,interpretation,var_Out); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_Out,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_T); + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + // T is exported + // I is exported + find mustInstanceOfInformationLink_class(problem,interpretation,var_I); + find mustInRelationto_reference_InformationLink(problem,interpretation,var_I,var_virtual0); + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_virtual0); + var_virtual0 == var_In; + find mustInstanceOfFunctionalInput_class(problem,interpretation,var_In); + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,var_In,var_virtual1); + find mustInstanceOfFAMTerminator_class(problem,interpretation,var_virtual1); + var_virtual1 == var_T; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test xyz type +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); + neg find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,var_This,_var__Par); + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); + neg find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +}or{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,var_This,_var__Par); + find mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + find mayEquivalent(problem, interpretation, var_Target, var_virtual0); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_type( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Root_FunctionType;DefinedElement.name(const_Root_FunctionType,"Root FunctionType"); //LogicProblem.elements(problem,const_Root_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); + neg find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements(problem,interpretation,_var__Model,var_This); + var_virtual0 == const_Leaf_FunctionType;DefinedElement.name(const_Leaf_FunctionType,"Leaf FunctionType"); //LogicProblem.elements(problem,const_Leaf_FunctionType); + var_Target == var_virtual0; +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_This); + // type constraint is enforced by construction + // This is exported + // Target is exported + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,var_This,_var__Par); + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent(problem,interpretation,_var__Child,var_This); + var_virtual0 == const_Intermediate_FunctionType;DefinedElement.name(const_Intermediate_FunctionType,"Intermediate FunctionType"); //LogicProblem.elements(problem,const_Intermediate_FunctionType); + var_Target == var_virtual0; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test xyz rootElements +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Root); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_rootElements( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Model, var_Root) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInstanceOfFunction_class(problem,interpretation,var_Root); + // Model is exported + // Root is exported + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Model); + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,var_Model,var_virtual0); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Root; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test xyz parent +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mayInstanceOfFunction_class(problem,interpretation,var_Func); + find mayInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mayInstanceOfFunction_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Par); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_parent( + problem:LogicProblem, interpretation:PartialInterpretation, + var_Func, var_Par) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInstanceOfFunction_class(problem,interpretation,var_Par); + // Func is exported + // Par is exported + find mustInstanceOfFunction_class(problem,interpretation,var_Func); + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,var_Func,var_virtual0); + find mustInstanceOfFunction_class(problem,interpretation,var_virtual0); + var_virtual0 == var_Par; +} +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test xyz model +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern mayInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mayInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} +private pattern currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_model( + problem:LogicProblem, interpretation:PartialInterpretation, + var_This, var_Target) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); + // This is exported + // Target is exported + find mustInstanceOfFunctionalElement_class(problem,interpretation,var_This); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,var_Target); +} + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// +pattern invalidatedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation(problem,interpretation,var_T,var_I); +} + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// +pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_xyz_terminatorAndInformation(problem,interpretation,var_T,var_I); +} + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "FunctionalElement class". + */ +private pattern mustInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalElement class"); +} + +/** + * An element may be an instance of type "FunctionalElement class". + */ +private pattern mayInstanceOfFunctionalElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfInformationLink_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInterface class". + */ +private pattern mustInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInterface class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInterface class"); +} + +/** + * An element may be an instance of type "FunctionalInterface class". + */ +private pattern mayInstanceOfFunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalData class". + */ +private pattern mustInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalData class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalData class"); +} + +/** + * An element may be an instance of type "FunctionalData class". + */ +private pattern mayInstanceOfFunctionalData_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalData_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunction_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFAMTerminator_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "EAttribute class". + */ +private pattern mustInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"EAttribute class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"EAttribute class"); +} + +/** + * An element may be an instance of type "EAttribute class". + */ +private pattern mayInstanceOfEAttribute_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEAnnotation_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEAnnotation_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfEAnnotation_class(problem,interpretation,element); } +/** + * An element must be an instance of type "EClass class". + */ +private pattern mustInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"EClass class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewEClass_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"EClass class"); +} + +/** + * An element may be an instance of type "EClass class". + */ +private pattern mayInstanceOfEClass_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEClass_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEClass_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfEClass_class(problem,interpretation,element); } +/** + * An element must be an instance of type "EClassifier class". + */ +private pattern mustInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"EClassifier class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"EClassifier class"); +} + +/** + * An element may be an instance of type "EClassifier class". + */ +private pattern mayInstanceOfEClassifier_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEClassifier_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find 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 mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find 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 mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEDataType_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfEDataType_class(problem,interpretation,element); } +/** + * An element must be an instance of type "EEnum class". + */ +private pattern mustInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"EEnum class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"EEnum class"); +} + +/** + * An element may be an instance of type "EEnum class". + */ +private pattern mayInstanceOfEEnum_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEModelElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEModelElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfEModelElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "ENamedElement class". + */ +private pattern mustInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"ENamedElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"ENamedElement class"); +} + +/** + * An element may be an instance of type "ENamedElement class". + */ +private pattern mayInstanceOfENamedElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find scopeDisallowsNewENamedElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find scopeDisallowsNewENamedElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfENamedElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "EObject class". + */ +private pattern mustInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"EObject class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewEObject_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"EObject class"); +} + +/** + * An element may be an instance of type "EObject class". + */ +private pattern mayInstanceOfEObject_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find 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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find scopeDisallowsNewEPackage_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find scopeDisallowsNewEPackage_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfEPackage_class(problem,interpretation,element); } +/** + * An element must be an instance of type "EParameter class". + */ +private pattern mustInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"EParameter class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"EParameter class"); +} + +/** + * An element may be an instance of type "EParameter class". + */ +private pattern mayInstanceOfEParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find scopeDisallowsNewEGenericType_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEModelElement_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find scopeDisallowsNewEGenericType_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfEGenericType_class(problem,interpretation,element); } +/** + * An element must be an instance of type "ETypeParameter class". + */ +private pattern mustInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"ETypeParameter class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"ETypeParameter class"); +} + +/** + * An element may be an instance of type "ETypeParameter class". + */ +private pattern mayInstanceOfETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(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 mustInstanceOfETypedElement_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(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 mustInstanceOfETypedElement_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEModelElement_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfEModelElement_class_UndefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "ENamedElement class DefinedPart". + */ +private pattern mustInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"ENamedElement class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"ENamedElement class DefinedPart"); +} + +/** + * An element may be an instance of type "ENamedElement class DefinedPart". + */ +private pattern mayInstanceOfENamedElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfENamedElement_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "ENamedElement class UndefinedPart". + */ +private pattern mustInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"ENamedElement class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"ENamedElement class UndefinedPart"); +} + +/** + * An element may be an instance of type "ENamedElement class UndefinedPart". + */ +private pattern mayInstanceOfENamedElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); + neg find scopeDisallowsNewEPackage_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find 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 mustInstanceOfEModelElement_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 mustInstanceOfEAttribute_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfEObject_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfEClass_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 mustInstanceOfEEnumLiteral_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 mustInstanceOfEOperation_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 mustInstanceOfEReference_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 mustInstanceOfETypedElement_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 mustInstanceOfEDataType_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 mustInstanceOfENamedElement_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_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_EAnnotation_class_by_eAnnotations_reference_EModelElement_with_eModelElement_reference_EAnnotation( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eAnnotations reference EModelElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eModelElement reference EAnnotation"); + find mustInstanceOfEModelElement_class(problem,interpretation,container); + find mayInstanceOfEAnnotation_class(problem,interpretation,newObject); + find mayInRelationeAnnotations_reference_EModelElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_EAnnotation_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EAnnotation class"); + find mayInstanceOfEAnnotation_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_EReference_class_by_eStructuralFeatures_reference_EClass_with_eContainingClass_reference_EStructuralFeature( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eStructuralFeatures reference EClass"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eContainingClass reference EStructuralFeature"); + find mustInstanceOfEClass_class(problem,interpretation,container); + find mayInstanceOfEReference_class(problem,interpretation,newObject); + find mayInRelationeStructuralFeatures_reference_EClass(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_EReference_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EReference class"); + find mayInstanceOfEReference_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_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_EParameter_class_by_eParameters_reference_EOperation_with_eOperation_reference_EParameter( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eParameters reference EOperation"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eOperation reference EParameter"); + find mustInstanceOfEOperation_class(problem,interpretation,container); + find mayInstanceOfEParameter_class(problem,interpretation,newObject); + find mayInRelationeParameters_reference_EOperation(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_EParameter_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EParameter class"); + find mayInstanceOfEParameter_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_EPackage_class_UndefinedPart_by_eSubpackages_reference_EPackage_with_eSuperPackage_reference_EPackage( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eSubpackages reference EPackage"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"eSuperPackage reference EPackage"); + find mustInstanceOfEPackage_class(problem,interpretation,container); + find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject); + find mayInRelationeSubpackages_reference_EPackage(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_EPackage_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EPackage class UndefinedPart"); + find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_EStringToStringMapEntry_class_by_details_reference_EAnnotation( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"details reference EAnnotation"); + find mustInstanceOfEAnnotation_class(problem,interpretation,container); + find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject); + find mayInRelationdetails_reference_EAnnotation(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_EStringToStringMapEntry_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EStringToStringMapEntry class"); + find mayInstanceOfEStringToStringMapEntry_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_EEnum_class_by_eClassifiers_reference_EPackage_with_ePackage_reference_EClassifier( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"eClassifiers reference EPackage"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"ePackage reference EClassifier"); + find mustInstanceOfEPackage_class(problem,interpretation,container); + find mayInstanceOfEEnum_class(problem,interpretation,newObject); + find mayInRelationeClassifiers_reference_EPackage(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_EEnum_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"EEnum class"); + find mayInstanceOfEEnum_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_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_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_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_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); +} + +////////// +// 4.2 Type refinement +////////// +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 mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); +} +pattern refineTypeTo_EAnnotation_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfENamedElement_class(problem,interpretation,element); +} +pattern refineTypeTo_EReference_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEAttribute_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEReference_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); +} +pattern refineTypeTo_EParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); +} +pattern refineTypeTo_EPackage_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEPackage_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_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 mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEStringToStringMapEntry_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_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 mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEOperation_class(problem,interpretation,element); + neg find mustInstanceOfEStructuralFeature_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfEParameter_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 mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEEnum_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); +} +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 mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEDataType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfEClass_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); +} +pattern refineTypeTo_ETypeParameter_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,element); + neg find mustInstanceOfEAnnotation_class(problem,interpretation,element); + neg find mustInstanceOfEEnumLiteral_class(problem,interpretation,element); + neg find mustInstanceOfEGenericType_class(problem,interpretation,element); + neg find mustInstanceOfEPackage_class(problem,interpretation,element); + neg find mustInstanceOfETypeParameter_class(problem,interpretation,element); + neg find mustInstanceOfEObject_class(problem,interpretation,element); + neg find mustInstanceOfETypedElement_class(problem,interpretation,element); + neg find mustInstanceOfEClassifier_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_eAttributeType_reference_EAttribute( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributeType reference EAttribute"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEAttribute_class(problem,interpretation,from); + find mustInstanceOfEDataType_class(problem,interpretation,to); + find mayInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to); + neg find mustInRelationeAttributeType_reference_EAttribute(problem,interpretation,from,to); +} +pattern refineRelation_references_reference_EAnnotation( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"references reference EAnnotation"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEAnnotation_class(problem,interpretation,from); + find mustInstanceOfEObject_class(problem,interpretation,to); + find mayInRelationreferences_reference_EAnnotation(problem,interpretation,from,to); + neg find mustInRelationreferences_reference_EAnnotation(problem,interpretation,from,to); +} +pattern refineRelation_eSuperTypes_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eSuperTypes reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEClass_class(problem,interpretation,to); + find mayInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeSuperTypes_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eAllAttributes_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllAttributes reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEAttribute_class(problem,interpretation,to); + find mayInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeAllAttributes_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eAllReferences_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllReferences reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEReference_class(problem,interpretation,to); + find mayInRelationeAllReferences_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeAllReferences_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eReferences_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferences reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEReference_class(problem,interpretation,to); + find mayInRelationeReferences_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeReferences_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eAttributes_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAttributes reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEAttribute_class(problem,interpretation,to); + find mayInRelationeAttributes_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeAttributes_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eAllContainments_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllContainments reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEReference_class(problem,interpretation,to); + find mayInRelationeAllContainments_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeAllContainments_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eAllOperations_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllOperations reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEOperation_class(problem,interpretation,to); + find mayInRelationeAllOperations_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeAllOperations_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eAllStructuralFeatures_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllStructuralFeatures reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEStructuralFeature_class(problem,interpretation,to); + find mayInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeAllStructuralFeatures_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eAllSuperTypes_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllSuperTypes reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEClass_class(problem,interpretation,to); + find mayInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeAllSuperTypes_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eIDAttribute_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eIDAttribute reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEAttribute_class(problem,interpretation,to); + find mayInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeIDAttribute_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eAllGenericSuperTypes_reference_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eAllGenericSuperTypes reference EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + find mustInstanceOfEGenericType_class(problem,interpretation,to); + find mayInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to); + neg find mustInRelationeAllGenericSuperTypes_reference_EClass(problem,interpretation,from,to); +} +pattern refineRelation_eExceptions_reference_EOperation( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eExceptions reference EOperation"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEOperation_class(problem,interpretation,from); + find mustInstanceOfEClassifier_class(problem,interpretation,to); + find mayInRelationeExceptions_reference_EOperation(problem,interpretation,from,to); + neg find mustInRelationeExceptions_reference_EOperation(problem,interpretation,from,to); +} +pattern refineRelation_eOpposite_reference_EReference( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eOpposite reference EReference"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEReference_class(problem,interpretation,from); + find mustInstanceOfEReference_class(problem,interpretation,to); + find mayInRelationeOpposite_reference_EReference(problem,interpretation,from,to); + neg find mustInRelationeOpposite_reference_EReference(problem,interpretation,from,to); +} +pattern refineRelation_eReferenceType_reference_EReference( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eReferenceType reference EReference"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEReference_class(problem,interpretation,from); + find mustInstanceOfEClass_class(problem,interpretation,to); + find mayInRelationeReferenceType_reference_EReference(problem,interpretation,from,to); + neg find mustInRelationeReferenceType_reference_EReference(problem,interpretation,from,to); +} +pattern refineRelation_eKeys_reference_EReference( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eKeys reference EReference"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEReference_class(problem,interpretation,from); + find mustInstanceOfEAttribute_class(problem,interpretation,to); + find mayInRelationeKeys_reference_EReference(problem,interpretation,from,to); + neg find mustInRelationeKeys_reference_EReference(problem,interpretation,from,to); +} +pattern refineRelation_eType_reference_ETypedElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eType reference ETypedElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfETypedElement_class(problem,interpretation,from); + find mustInstanceOfEClassifier_class(problem,interpretation,to); + find mayInRelationeType_reference_ETypedElement(problem,interpretation,from,to); + neg find mustInRelationeType_reference_ETypedElement(problem,interpretation,from,to); +} +pattern refineRelation_eRawType_reference_EGenericType( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eRawType reference EGenericType"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEGenericType_class(problem,interpretation,from); + find mustInstanceOfEClassifier_class(problem,interpretation,to); + find mayInRelationeRawType_reference_EGenericType(problem,interpretation,from,to); + neg find mustInRelationeRawType_reference_EGenericType(problem,interpretation,from,to); +} +pattern refineRelation_eTypeParameter_reference_EGenericType( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eTypeParameter reference EGenericType"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEGenericType_class(problem,interpretation,from); + find mustInstanceOfETypeParameter_class(problem,interpretation,to); + find mayInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to); + neg find mustInRelationeTypeParameter_reference_EGenericType(problem,interpretation,from,to); +} +pattern refineRelation_eClassifier_reference_EGenericType( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"eClassifier reference EGenericType"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEGenericType_class(problem,interpretation,from); + find mustInstanceOfEClassifier_class(problem,interpretation,to); + find mayInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to); + neg find mustInRelationeClassifier_reference_EGenericType(problem,interpretation,from,to); +} +pattern refineRelation_iD_attribute_EAttribute( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"iD attribute EAttribute"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEAttribute_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationiD_attribute_EAttribute(problem,interpretation,from,to); + neg find mustInRelationiD_attribute_EAttribute(problem,interpretation,from,to); +} +pattern refineRelation_source_attribute_EAnnotation( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source attribute EAnnotation"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEAnnotation_class(problem,interpretation,from); + StringElement(to); + find mayInRelationsource_attribute_EAnnotation(problem,interpretation,from,to); + neg find mustInRelationsource_attribute_EAnnotation(problem,interpretation,from,to); +} +pattern refineRelation_abstract_attribute_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"abstract attribute EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationabstract_attribute_EClass(problem,interpretation,from,to); + neg find mustInRelationabstract_attribute_EClass(problem,interpretation,from,to); +} +pattern refineRelation_interface_attribute_EClass( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface attribute EClass"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClass_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationinterface_attribute_EClass(problem,interpretation,from,to); + neg find mustInRelationinterface_attribute_EClass(problem,interpretation,from,to); +} +pattern refineRelation_instanceClassName_attribute_EClassifier( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceClassName attribute EClassifier"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClassifier_class(problem,interpretation,from); + StringElement(to); + find mayInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to); + neg find mustInRelationinstanceClassName_attribute_EClassifier(problem,interpretation,from,to); +} +pattern refineRelation_instanceTypeName_attribute_EClassifier( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"instanceTypeName attribute EClassifier"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEClassifier_class(problem,interpretation,from); + StringElement(to); + find mayInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to); + neg find mustInRelationinstanceTypeName_attribute_EClassifier(problem,interpretation,from,to); +} +pattern refineRelation_serializable_attribute_EDataType( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"serializable attribute EDataType"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEDataType_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationserializable_attribute_EDataType(problem,interpretation,from,to); + neg find mustInRelationserializable_attribute_EDataType(problem,interpretation,from,to); +} +pattern refineRelation_value_attribute_EEnumLiteral( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EEnumLiteral"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEEnumLiteral_class(problem,interpretation,from); + IntegerElement(to); + find mayInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to); + neg find mustInRelationvalue_attribute_EEnumLiteral(problem,interpretation,from,to); +} +pattern refineRelation_literal_attribute_EEnumLiteral( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"literal attribute EEnumLiteral"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEEnumLiteral_class(problem,interpretation,from); + StringElement(to); + find mayInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to); + neg find mustInRelationliteral_attribute_EEnumLiteral(problem,interpretation,from,to); +} +pattern refineRelation_name_attribute_ENamedElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"name attribute ENamedElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfENamedElement_class(problem,interpretation,from); + StringElement(to); + find mayInRelationname_attribute_ENamedElement(problem,interpretation,from,to); + neg find mustInRelationname_attribute_ENamedElement(problem,interpretation,from,to); +} +pattern refineRelation_nsURI_attribute_EPackage( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsURI attribute EPackage"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEPackage_class(problem,interpretation,from); + StringElement(to); + find mayInRelationnsURI_attribute_EPackage(problem,interpretation,from,to); + neg find mustInRelationnsURI_attribute_EPackage(problem,interpretation,from,to); +} +pattern refineRelation_nsPrefix_attribute_EPackage( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"nsPrefix attribute EPackage"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEPackage_class(problem,interpretation,from); + StringElement(to); + find mayInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to); + neg find mustInRelationnsPrefix_attribute_EPackage(problem,interpretation,from,to); +} +pattern refineRelation_containment_attribute_EReference( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"containment attribute EReference"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEReference_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationcontainment_attribute_EReference(problem,interpretation,from,to); + neg find mustInRelationcontainment_attribute_EReference(problem,interpretation,from,to); +} +pattern refineRelation_container_attribute_EReference( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"container attribute EReference"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEReference_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationcontainer_attribute_EReference(problem,interpretation,from,to); + neg find mustInRelationcontainer_attribute_EReference(problem,interpretation,from,to); +} +pattern refineRelation_resolveProxies_attribute_EReference( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"resolveProxies attribute EReference"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEReference_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to); + neg find mustInRelationresolveProxies_attribute_EReference(problem,interpretation,from,to); +} +pattern refineRelation_changeable_attribute_EStructuralFeature( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"changeable attribute EStructuralFeature"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to); + neg find mustInRelationchangeable_attribute_EStructuralFeature(problem,interpretation,from,to); +} +pattern refineRelation_volatile_attribute_EStructuralFeature( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"volatile attribute EStructuralFeature"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to); + neg find mustInRelationvolatile_attribute_EStructuralFeature(problem,interpretation,from,to); +} +pattern refineRelation_transient_attribute_EStructuralFeature( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"transient attribute EStructuralFeature"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to); + neg find mustInRelationtransient_attribute_EStructuralFeature(problem,interpretation,from,to); +} +pattern refineRelation_defaultValueLiteral_attribute_EStructuralFeature( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"defaultValueLiteral attribute EStructuralFeature"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); + StringElement(to); + find mayInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to); + neg find mustInRelationdefaultValueLiteral_attribute_EStructuralFeature(problem,interpretation,from,to); +} +pattern refineRelation_unsettable_attribute_EStructuralFeature( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unsettable attribute EStructuralFeature"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to); + neg find mustInRelationunsettable_attribute_EStructuralFeature(problem,interpretation,from,to); +} +pattern refineRelation_derived_attribute_EStructuralFeature( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"derived attribute EStructuralFeature"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEStructuralFeature_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to); + neg find mustInRelationderived_attribute_EStructuralFeature(problem,interpretation,from,to); +} +pattern refineRelation_ordered_attribute_ETypedElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"ordered attribute ETypedElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfETypedElement_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationordered_attribute_ETypedElement(problem,interpretation,from,to); + neg find mustInRelationordered_attribute_ETypedElement(problem,interpretation,from,to); +} +pattern refineRelation_unique_attribute_ETypedElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"unique attribute ETypedElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfETypedElement_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationunique_attribute_ETypedElement(problem,interpretation,from,to); + neg find mustInRelationunique_attribute_ETypedElement(problem,interpretation,from,to); +} +pattern refineRelation_lowerBound_attribute_ETypedElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"lowerBound attribute ETypedElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfETypedElement_class(problem,interpretation,from); + IntegerElement(to); + find mayInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to); + neg find mustInRelationlowerBound_attribute_ETypedElement(problem,interpretation,from,to); +} +pattern refineRelation_upperBound_attribute_ETypedElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"upperBound attribute ETypedElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfETypedElement_class(problem,interpretation,from); + IntegerElement(to); + find mayInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to); + neg find mustInRelationupperBound_attribute_ETypedElement(problem,interpretation,from,to); +} +pattern refineRelation_many_attribute_ETypedElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"many attribute ETypedElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfETypedElement_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationmany_attribute_ETypedElement(problem,interpretation,from,to); + neg find mustInRelationmany_attribute_ETypedElement(problem,interpretation,from,to); +} +pattern refineRelation_required_attribute_ETypedElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"required attribute ETypedElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfETypedElement_class(problem,interpretation,from); + BooleanElement(to); + find mayInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to); + neg find mustInRelationrequired_attribute_ETypedElement(problem,interpretation,from,to); +} +pattern refineRelation_key_attribute_EStringToStringMapEntry( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"key attribute EStringToStringMapEntry"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from); + StringElement(to); + find mayInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to); + neg find mustInRelationkey_attribute_EStringToStringMapEntry(problem,interpretation,from,to); +} +pattern refineRelation_value_attribute_EStringToStringMapEntry( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"value attribute EStringToStringMapEntry"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfEStringToStringMapEntry_class(problem,interpretation,from); + StringElement(to); + find mayInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to); + neg find mustInRelationvalue_attribute_EStringToStringMapEntry(problem,interpretation,from,to); +} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem new file mode 100644 index 00000000..ab657f0b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem @@ -0,0 +1,2059 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/init.partialmodel b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/init.partialmodel new file mode 100644 index 00000000..985e7346 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/init.partialmodel @@ -0,0 +1,497 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt new file mode 100644 index 00000000..69222b92 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt @@ -0,0 +1 @@ +Model generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, 3 models are generated!Models: [1.xmi][2.xmi][3.xmi]Visualisations: [1.gml][2.gml][3.gml]Visualisations: [1.png][2.png][3.png]Model generation finishedModel generation startedProblem is consistent, 3 models are generated!Models: [1.xmi][2.xmi][3.xmi]Visualisations: [1.gml][2.gml][3.gml]Visualisations: [1.png][2.png][3.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, a model is generatedModels: [1.xmi]Visualisations: [1.gml]Visualisations: [1.png]Model generation finishedModel generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finished \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml new file mode 100644 index 00000000..c55209f7 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml @@ -0,0 +1,7641 @@ +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 254.10000000000002 + h 110 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EModelElement class DefinedPart + ENamedElement class DefinedPart + EPackage class DefinedPart + EModelElement class + ENamedElement class + EPackage class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 24.200000000000003 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "-1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 15.400000000000002 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "0" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 15.400000000000002 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 33.0 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""A"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 33.0 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""B"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 94.60000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""nsPrefix"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 68.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""nsUri"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 121.00000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""packageName"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 269.5 + h 124 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EClassifier class + EDataType class + EEnum class + EModelElement class + ENamedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + graphics + [ + w 269.5 + h 124 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EClassifier class + EDataType class + EEnum class + EModelElement class + ENamedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 13 + graphics + [ + w 269.5 + h 110 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EModelElement class + ENamedElement class + EPackage class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + EPackage class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 14 + graphics + [ + w 269.5 + h 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 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 16 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 17 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 18 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 19 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 11 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ePackage reference EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 15 + target 13 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ePackage reference EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 15 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eClassifiers reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 13 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eSubpackages reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eSuperPackage reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 10 + 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 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 13 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsURI attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsPrefix attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png new file mode 100644 index 00000000..c1d6f49f Binary files /dev/null and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi new file mode 100644 index 00000000..d9529633 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml new file mode 100644 index 00000000..f6242732 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml @@ -0,0 +1,4762 @@ +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 254.10000000000002 + h 110 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EModelElement class DefinedPart + ENamedElement class DefinedPart + EPackage class DefinedPart + EModelElement class + ENamedElement class + EPackage class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 24.200000000000003 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "-1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 15.400000000000002 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "0" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 15.400000000000002 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 33.0 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""A"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 33.0 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""B"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 94.60000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""nsPrefix"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 68.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""nsUri"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 121.00000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""packageName"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 269.5 + h 124 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EClassifier class + EDataType class + EEnum class + EModelElement class + ENamedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + graphics + [ + w 269.5 + h 124 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EClassifier class + EDataType class + EEnum class + EModelElement class + ENamedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 13 + graphics + [ + w 269.5 + h 110 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EModelElement class + ENamedElement class + EPackage class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + EPackage class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 14 + graphics + [ + w 269.5 + h 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 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 16 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 17 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 18 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 19 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 11 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ePackage reference EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 15 + target 13 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ePackage reference EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 15 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eClassifiers reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 13 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eSubpackages reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eSuperPackage reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 10 + 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 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 13 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsURI attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsURI attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsPrefix attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png new file mode 100644 index 00000000..e01ca46b Binary files /dev/null and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi new file mode 100644 index 00000000..c6287127 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml new file mode 100644 index 00000000..05f41ccb --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml @@ -0,0 +1,2069 @@ +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 2 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 361.90000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalArchitectureModel class DefinedPart + FunctionalArchitectureModel class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 192.50000000000003 + h 54 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionalElement class + Function class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 6 + target 3 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "model reference FunctionalElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "rootElements reference FunctionalArchitectureModel" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "type attribute Function" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] +graph +[ + node + [ + id 0 + graphics + [ + w 254.10000000000002 + h 110 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EModelElement class DefinedPart + ENamedElement class DefinedPart + EPackage class DefinedPart + EModelElement class + ENamedElement class + EPackage class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 24.200000000000003 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "-1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 15.400000000000002 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "0" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 15.400000000000002 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 33.0 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""A"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 33.0 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""B"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 94.60000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""nsPrefix"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 68.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""nsUri"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 121.00000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""packageName"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 269.5 + h 124 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EClassifier class + EDataType class + EEnum class + EModelElement class + ENamedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + graphics + [ + w 269.5 + h 124 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EClassifier class + EDataType class + EEnum class + EModelElement class + ENamedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 13 + graphics + [ + w 269.5 + h 110 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EModelElement class + ENamedElement class + EPackage class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + EPackage class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 14 + graphics + [ + w 269.5 + h 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 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 16 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 17 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 18 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 19 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 11 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ePackage reference EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 15 + target 13 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ePackage reference EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 15 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eClassifiers reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 13 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eSubpackages reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eSuperPackage reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 10 + 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 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 13 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsURI attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsURI attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsPrefix attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsPrefix attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png new file mode 100644 index 00000000..afaa28c2 Binary files /dev/null and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi new file mode 100644 index 00000000..ef8e8e65 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml new file mode 100644 index 00000000..d61b14d0 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml @@ -0,0 +1,1184 @@ +graph +[ + node + [ + id 0 + graphics + [ + w 254.10000000000002 + h 110 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EModelElement class DefinedPart + ENamedElement class DefinedPart + EPackage class DefinedPart + EModelElement class + ENamedElement class + EPackage class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 24.200000000000003 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "-1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 15.400000000000002 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "0" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 15.400000000000002 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 33.0 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""A"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 33.0 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""B"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 94.60000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""nsPrefix"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 68.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""nsUri"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 121.00000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""packageName"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 269.5 + h 124 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EClassifier class + EDataType class + EEnum class + EModelElement class + ENamedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + graphics + [ + w 269.5 + h 124 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EClassifier class + EDataType class + EEnum class + EModelElement class + ENamedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 13 + graphics + [ + w 269.5 + h 110 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EModelElement class + ENamedElement class + EPackage class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + EPackage class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 14 + graphics + [ + w 269.5 + h 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 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 16 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 17 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 18 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 19 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 11 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ePackage reference EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 15 + target 13 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ePackage reference EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 15 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eClassifiers reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 13 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eSubpackages reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eSuperPackage reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 10 + 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 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceTypeName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 13 + 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 14 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsURI attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsURI attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsPrefix attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsPrefix attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png new file mode 100644 index 00000000..72ccb4b6 Binary files /dev/null and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi new file mode 100644 index 00000000..1a10e5b6 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml new file mode 100644 index 00000000..f071f63e --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml @@ -0,0 +1,1203 @@ +graph +[ + node + [ + id 0 + graphics + [ + w 254.10000000000002 + h 110 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EModelElement class DefinedPart + ENamedElement class DefinedPart + EPackage class DefinedPart + EModelElement class + ENamedElement class + EPackage class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 24.200000000000003 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "-1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 15.400000000000002 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "0" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 15.400000000000002 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 33.0 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""A"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 33.0 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""B"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 94.60000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""nsPrefix"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 68.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""nsUri"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 121.00000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text ""packageName"" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 269.5 + h 124 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EClassifier class + EDataType class + EEnum class + EModelElement class + ENamedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + graphics + [ + w 269.5 + h 124 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EClassifier class + EDataType class + EEnum class + EModelElement class + ENamedElement class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 13 + graphics + [ + w 269.5 + h 110 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + EModelElement class + ENamedElement class + EPackage class + EModelElement class UndefinedPart + ENamedElement class UndefinedPart + EPackage class UndefinedPart + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 14 + graphics + [ + w 269.5 + h 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 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 16 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 17 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 18 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 19 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 11 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ePackage reference EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 15 + target 13 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "ePackage reference EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 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 15 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eClassifiers reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 13 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "eSubpackages reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 0 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "eSuperPackage reference EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "instanceClassName attribute EClassifier" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 10 + 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 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 1 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "serializable attribute EDataType" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 12 + target 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 13 + 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 14 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "name attribute ENamedElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsURI attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsURI attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsPrefix attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 13 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "nsPrefix attribute EPackage" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png new file mode 100644 index 00000000..bb835587 Binary files /dev/null and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi new file mode 100644 index 00000000..1a10e5b6 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv new file mode 100644 index 00000000..0c19baf2 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv @@ -0,0 +1,32 @@ +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;441;2068;2486;3217702419;62;29;140;4;0;2 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;463;2860;2654;3199911479;74;37;138;5;0;3 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;499;2201;2467;3339884626;68;36;141;4;0;2 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;452;2821;2223;3526490298;59;27;122;5;0;2 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;11;1529;1717;4396467206;87;94;100;54;17;4;0;3 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;15;1411;1457;4222415279;54;68;77;36;10;4;0;5 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;9;1335;1288;2769089958;64;74;31;12;1;0;2 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;4;1180;1189;2923747093;50;58;26;10;1;0;1 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;839;2519;2455;3266543842;68;33;193;5;0;3 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;11;2019;1948;3337962573;91;104;53;16;2;0;3 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;1719;3345;2829;7904668959;235;261;107;497;53;0;6 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;13;1736;1740;2852471270;62;73;37;19;1;0;2 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;529;2502;2857;3681787432;68;30;125;4;0;2 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;788;2572;2188;3322713636;67;30;148;5;0;4 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;443;2849;2573;4906642931;151;171;75;124;7;0;8 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;_Solution3FoundAt;_Solution4FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +2;1;ModelResultImpl;19;4315;9042;20459725100;239;247;252;257;261;217;19;6;0;11 diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/errors.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/errors.txt new file mode 100644 index 00000000..2086fece --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/errors.txt @@ -0,0 +1,21 @@ +Error occured (IllegalArgumentException): Class FunctionalArchitectureModel is not translated to logic! + hu.bme.mit.inf.dslreasoner.ecore2logic.EClassMapper_AllElementAsObject.TypeofEClass(EClassMapper_AllElementAsObject.java:63) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.TypeofEClass(Ecore2Logic.java:96) + hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2PartialInterpretation.transform(InstanceModel2PartialInterpretation.java:99) + hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic.transform(InstanceModel2Logic.java:19) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:192) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (IllegalArgumentException): Class FunctionalArchitectureModel is not translated to logic! + hu.bme.mit.inf.dslreasoner.ecore2logic.EClassMapper_AllElementAsObject.TypeofEClass(EClassMapper_AllElementAsObject.java:63) + hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic.TypeofEClass(Ecore2Logic.java:96) + hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2PartialInterpretation.transform(InstanceModel2PartialInterpretation.java:99) + hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic.transform(InstanceModel2Logic.java:19) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:192) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:130) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:339) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:111) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56) \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated new file mode 100644 index 00000000..6d8fc404 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generated3valued.vql_deactivated @@ -0,0 +1,1472 @@ +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "Pseudostate class". + */ +private pattern mustInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Pseudostate class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Pseudostate class"); +} + +/** + * An element may be an instance of type "Pseudostate class". + */ +private pattern mayInstanceOfPseudostate_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); + neg find scopeDisallowsNewPseudostate_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); + neg find scopeDisallowsNewPseudostate_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfPseudostate_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Vertex class". + */ +private pattern mustInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Vertex class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewVertex_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Vertex class"); +} + +/** + * An element may be an instance of type "Vertex class". + */ +private pattern mayInstanceOfVertex_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfPseudostate_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find scopeDisallowsNewVertex_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfPseudostate_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find scopeDisallowsNewVertex_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfVertex_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Region class". + */ +private pattern mustInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Region class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewRegion_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Region class"); +} + +/** + * An element may be an instance of type "Region class". + */ +private pattern mayInstanceOfRegion_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find scopeDisallowsNewRegion_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find scopeDisallowsNewRegion_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfRegion_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Transition class". + */ +private pattern mustInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Transition class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewTransition_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Transition class"); +} + +/** + * An element may be an instance of type "Transition class". + */ +private pattern mayInstanceOfTransition_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find scopeDisallowsNewTransition_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find scopeDisallowsNewTransition_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfTransition_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Statechart class". + */ +private pattern mustInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Statechart class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Statechart class"); +} + +/** + * An element may be an instance of type "Statechart class". + */ +private pattern mayInstanceOfStatechart_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); + neg find scopeDisallowsNewStatechart_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); + neg find scopeDisallowsNewStatechart_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfStatechart_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Entry class". + */ +private pattern mustInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Entry class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewEntry_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Entry class"); +} + +/** + * An element may be an instance of type "Entry class". + */ +private pattern mayInstanceOfEntry_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEntry_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find scopeDisallowsNewEntry_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfEntry_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Synchronization class". + */ +private pattern mustInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Synchronization class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Synchronization class"); +} + +/** + * An element may be an instance of type "Synchronization class". + */ +private pattern mayInstanceOfSynchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); + neg find scopeDisallowsNewSynchronization_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); + neg find scopeDisallowsNewSynchronization_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfSynchronization_class(problem,interpretation,element); } +/** + * An element must be an instance of type "State class". + */ +private pattern mustInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"State class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewState_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"State class"); +} + +/** + * An element may be an instance of type "State class". + */ +private pattern mayInstanceOfState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFinalState_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfPseudostate_class(problem,interpretation,element); + neg find mustInstanceOfStatechart_class(problem,interpretation,element); + neg find scopeDisallowsNewState_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFinalState_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfPseudostate_class(problem,interpretation,element); + neg find mustInstanceOfStatechart_class(problem,interpretation,element); + neg find scopeDisallowsNewState_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfState_class(problem,interpretation,element); } +/** + * An element must be an instance of type "RegularState class". + */ +private pattern mustInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"RegularState class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"RegularState class"); +} + +/** + * An element may be an instance of type "RegularState class". + */ +private pattern mayInstanceOfRegularState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFinalState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfPseudostate_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find scopeDisallowsNewRegularState_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFinalState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfPseudostate_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find scopeDisallowsNewRegularState_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfRegularState_class(problem,interpretation,element); } +/** + * An element must be an instance of type "CompositeElement class". + */ +private pattern mustInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"CompositeElement class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"CompositeElement class"); +} + +/** + * An element may be an instance of type "CompositeElement class". + */ +private pattern mayInstanceOfCompositeElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfStatechart_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfStatechart_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find scopeDisallowsNewCompositeElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfCompositeElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Choice class". + */ +private pattern mustInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Choice class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewChoice_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Choice class"); +} + +/** + * An element may be an instance of type "Choice class". + */ +private pattern mayInstanceOfChoice_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); + neg find scopeDisallowsNewChoice_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); + neg find scopeDisallowsNewChoice_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfChoice_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Exit class". + */ +private pattern mustInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Exit class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewExit_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Exit class"); +} + +/** + * An element may be an instance of type "Exit class". + */ +private pattern mayInstanceOfExit_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); + neg find scopeDisallowsNewExit_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); + neg find scopeDisallowsNewExit_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfExit_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FinalState class". + */ +private pattern mustInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FinalState class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FinalState class"); +} + +/** + * An element may be an instance of type "FinalState class". + */ +private pattern mayInstanceOfFinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfPseudostate_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFinalState_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfPseudostate_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find scopeDisallowsNewFinalState_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFinalState_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Statechart class DefinedPart". + */ +private pattern mustInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Statechart class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Statechart class DefinedPart"); +} + +/** + * An element may be an instance of type "Statechart class DefinedPart". + */ +private pattern mayInstanceOfStatechart_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "Statechart class UndefinedPart". + */ +private pattern mustInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Statechart class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Statechart class UndefinedPart"); +} + +/** + * An element may be an instance of type "Statechart class UndefinedPart". + */ +private pattern mayInstanceOfStatechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find scopeDisallowsNewStatechart_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "CompositeElement class DefinedPart". + */ +private pattern mustInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"CompositeElement class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"CompositeElement class DefinedPart"); +} + +/** + * An element may be an instance of type "CompositeElement class DefinedPart". + */ +private pattern mayInstanceOfCompositeElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "CompositeElement class UndefinedPart". + */ +private pattern mustInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"CompositeElement class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"CompositeElement class UndefinedPart"); +} + +/** + * An element may be an instance of type "CompositeElement class UndefinedPart". + */ +private pattern mayInstanceOfCompositeElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfStatechart_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfStatechart_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); + neg find scopeDisallowsNewCompositeElement_class_UndefinedPart(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,element); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []incomingTransitions reference Vertex(source,target) + */ +private pattern mustInRelationincomingTransitions_reference_Vertex( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>incomingTransitions reference Vertex(source,target) + */ +private pattern mayInRelationincomingTransitions_reference_Vertex( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfVertex_class(problem,interpretation,source); + find mayInstanceOfTransition_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingTransitions reference Vertex(source,target) + */ +private pattern mustInRelationoutgoingTransitions_reference_Vertex( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingTransitions reference Vertex"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingTransitions reference Vertex(source,target) + */ +private pattern mayInRelationoutgoingTransitions_reference_Vertex( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfVertex_class(problem,interpretation,source); + find mayInstanceOfTransition_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []vertices reference Region(source,target) + */ +private pattern mustInRelationvertices_reference_Region( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"vertices reference Region"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>vertices reference Region(source,target) + */ +private pattern mayInRelationvertices_reference_Region( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfRegion_class(problem,interpretation,source); + find mayInstanceOfVertex_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationvertices_reference_Region(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []target reference Transition(source,target) + */ +private pattern mustInRelationtarget_reference_Transition( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>target reference Transition(source,target) + */ +private pattern mayInRelationtarget_reference_Transition( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfTransition_class(problem,interpretation,source); + find mayInstanceOfVertex_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtarget_reference_Transition(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []source reference Transition(source,target) + */ +private pattern mustInRelationsource_reference_Transition( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"source reference Transition"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>source reference Transition(source,target) + */ +private pattern mayInRelationsource_reference_Transition( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfTransition_class(problem,interpretation,source); + find mayInstanceOfVertex_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationsource_reference_Transition(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsource_reference_Transition(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []regions reference CompositeElement(source,target) + */ +private pattern mustInRelationregions_reference_CompositeElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"regions reference CompositeElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>regions reference CompositeElement(source,target) + */ +private pattern mayInRelationregions_reference_CompositeElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfCompositeElement_class(problem,interpretation,source); + find mayInstanceOfRegion_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,source,target); }or + + { find mustInRelationvertices_reference_Region(problem,interpretation,source,target); }or + + { find mustInRelationregions_reference_CompositeElement(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_target_reference_Transition(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference Transition"); + find mustInstanceOfTransition_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtarget_reference_Transition(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfPseudostate_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfCompositeElement_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfTransition_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfState_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfSynchronization_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfEntry_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfRegularState_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfChoice_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfVertex_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfStatechart_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfExit_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfFinalState_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfRegion_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfStatechart_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfCompositeElement_class_DefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find mustInstanceOfCompositeElement_class_UndefinedPart(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_Exit_class_by_vertices_reference_Region( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); + find mustInstanceOfRegion_class(problem,interpretation,container); + find mayInstanceOfExit_class(problem,interpretation,newObject); + find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Exit_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Exit class"); + find mayInstanceOfExit_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FinalState_class_by_vertices_reference_Region( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); + find mustInstanceOfRegion_class(problem,interpretation,container); + find mayInstanceOfFinalState_class(problem,interpretation,newObject); + find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FinalState_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FinalState class"); + find mayInstanceOfFinalState_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Transition_class_by_outgoingTransitions_reference_Vertex_with_source_reference_Transition( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingTransitions reference Vertex"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"source reference Transition"); + find mustInstanceOfVertex_class(problem,interpretation,container); + find mayInstanceOfTransition_class(problem,interpretation,newObject); + find mayInRelationoutgoingTransitions_reference_Vertex(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Transition_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Transition class"); + find mayInstanceOfTransition_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Region_class_by_regions_reference_CompositeElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"regions reference CompositeElement"); + find mustInstanceOfCompositeElement_class(problem,interpretation,container); + find mayInstanceOfRegion_class(problem,interpretation,newObject); + find mayInRelationregions_reference_CompositeElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Region_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Region class"); + find mayInstanceOfRegion_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Choice_class_by_vertices_reference_Region( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); + find mustInstanceOfRegion_class(problem,interpretation,container); + find mayInstanceOfChoice_class(problem,interpretation,newObject); + find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Choice_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Choice class"); + find mayInstanceOfChoice_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Synchronization_class_by_vertices_reference_Region( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); + find mustInstanceOfRegion_class(problem,interpretation,container); + find mayInstanceOfSynchronization_class(problem,interpretation,newObject); + find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Synchronization_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Synchronization class"); + find mayInstanceOfSynchronization_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Statechart_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Statechart class UndefinedPart"); + find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Entry_class_by_vertices_reference_Region( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); + find mustInstanceOfRegion_class(problem,interpretation,container); + find mayInstanceOfEntry_class(problem,interpretation,newObject); + find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Entry_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Entry class"); + find mayInstanceOfEntry_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_State_class_by_vertices_reference_Region( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"vertices reference Region"); + find mustInstanceOfRegion_class(problem,interpretation,container); + find mayInstanceOfState_class(problem,interpretation,newObject); + find mayInRelationvertices_reference_Region(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_State_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"State class"); + find mayInstanceOfState_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_Exit_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); +} +pattern refineTypeTo_FinalState_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFinalState_class(problem,interpretation,element); + neg find mustInstanceOfFinalState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfPseudostate_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); +} +pattern refineTypeTo_Transition_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); +} +pattern refineTypeTo_Region_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); +} +pattern refineTypeTo_Choice_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); +} +pattern refineTypeTo_Synchronization_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); +} +pattern refineTypeTo_Statechart_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfStatechart_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfVertex_class(problem,interpretation,element); +} +pattern refineTypeTo_Entry_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfEntry_class(problem,interpretation,element); + neg find mustInstanceOfExit_class(problem,interpretation,element); + neg find mustInstanceOfRegularState_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfChoice_class(problem,interpretation,element); + neg find mustInstanceOfSynchronization_class(problem,interpretation,element); + neg find mustInstanceOfCompositeElement_class(problem,interpretation,element); + neg find mustInstanceOfEntry_class(problem,interpretation,element); +} +pattern refineTypeTo_State_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfState_class(problem,interpretation,element); + neg find mustInstanceOfFinalState_class(problem,interpretation,element); + neg find mustInstanceOfRegion_class(problem,interpretation,element); + neg find mustInstanceOfTransition_class(problem,interpretation,element); + neg find mustInstanceOfPseudostate_class(problem,interpretation,element); + neg find mustInstanceOfStatechart_class(problem,interpretation,element); + neg find mustInstanceOfState_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_incomingTransitions_reference_Vertex_and_target_reference_Transition( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"incomingTransitions reference Vertex"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"target reference Transition"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfVertex_class(problem,interpretation,from); + find mustInstanceOfTransition_class(problem,interpretation,to); + find mayInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); + neg find mustInRelationincomingTransitions_reference_Vertex(problem,interpretation,from,to); +} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generation.logicproblem b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generation.logicproblem new file mode 100644 index 00000000..b744bf95 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/generation.logicproblem @@ -0,0 +1,171 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/init.partialmodel b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/init.partialmodel new file mode 100644 index 00000000..ead2b44e --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/debug/init.partialmodel @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/log.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/log.txt new file mode 100644 index 00000000..4d22da6b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/log.txt @@ -0,0 +1 @@ +Model generation startedProblem is consistent, 2 models are generated!Models: [1.xmi][2.xmi]Visualisations: [1.gml][2.gml]Visualisations: [1.png][2.png]Model generation finished \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.gml new file mode 100644 index 00000000..4c5b2e7d --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.gml @@ -0,0 +1,479 @@ +graph +[ + node + [ + id 0 + graphics + [ + w 277.20000000000005 + h 82 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + Statechart class DefinedPart + CompositeElement class DefinedPart + Statechart class + CompositeElement class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 107.80000000000001 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + Region class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 107.80000000000001 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + Region class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 154.0 + h 68 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + Vertex class + RegularState class + FinalState class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 154.0 + h 68 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + Vertex class + RegularState class + FinalState class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 4 + target 5 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "vertices reference Region" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "vertices reference Region" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 3 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "regions reference CompositeElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 4 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "regions reference CompositeElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.png new file mode 100644 index 00000000..d9b7c988 Binary files /dev/null and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.xmi new file mode 100644 index 00000000..f6b5a41e --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/1.xmi @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.gml new file mode 100644 index 00000000..f07ae0db --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.gml @@ -0,0 +1,479 @@ +graph +[ + node + [ + id 0 + graphics + [ + w 277.20000000000005 + h 82 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "o 1" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + Statechart class DefinedPart + CompositeElement class DefinedPart + Statechart class + CompositeElement class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 41.800000000000004 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "true" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 50.6 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "false" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 107.80000000000001 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + Region class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 4 + graphics + [ + w 107.80000000000001 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + Region class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 5 + graphics + [ + w 154.0 + h 68 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + Vertex class + RegularState class + FinalState class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + h 68 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + Pseudostate class + Vertex class + Synchronization class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 112.2 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Integers" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 85.80000000000001 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Reals" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Strings" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 4 + target 5 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "vertices reference Region" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 3 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "vertices reference Region" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 3 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "regions reference CompositeElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 0 + target 4 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "regions reference CompositeElement" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.png new file mode 100644 index 00000000..38dadff8 Binary files /dev/null and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.xmi new file mode 100644 index 00000000..bc0e55cc --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/models/2.xmi @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/statistics.csv b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/statistics.csv new file mode 100644 index 00000000..ee8829e5 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/yakindu/statistics.csv @@ -0,0 +1,2 @@ +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;335;2777;2544;7194393100;105;140;61;186;9;0;3 diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.properties b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.properties new file mode 100644 index 00000000..58c2dbb6 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.properties @@ -0,0 +1,4 @@ +# + +pluginName = FAM Model +providerName = www.example.org diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml new file mode 100644 index 00000000..efdbb9b2 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/plugin.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql new file mode 100644 index 00000000..9af35b50 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/ecore/queries/Ecore.vql @@ -0,0 +1,29 @@ +package ca.mcgill.ecse.dslreasoner.standalone.test.ecore.queries + +import epackage "http://www.eclipse.org/emf/2002/Ecore" + +pattern directSupertype(a: EClass, b:EClass) { + EClass.eSuperTypes(a,b); +} + +@Constraint(key={a}, severity="error", message="error") +pattern loopInInheritence(a: EClass) { + find directSupertype+(a,a); +} + +pattern opposite(a:EReference, b: EReference) { + EReference.eOpposite(a,b); +} +@Constraint(key={a}, severity="error", message="error") +pattern oppositeDifferentClass(a:EReference) { + EReference.eOpposite(a,b); + EReference.eContainingClass(a,aContaining); + EReference.eType(b,bTarget); + aContaining != bTarget; +} + +@Constraint(key={a}, severity="error", message="error") +pattern nonSymmetricOpposite(a:EReference, b:EReference) { + find opposite(a,b); + neg find opposite(b,a); +} \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FAMTerminator.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FAMTerminator.java new file mode 100644 index 00000000..686af44b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FAMTerminator.java @@ -0,0 +1,52 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'FAM Terminator'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator#getData Data}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFAMTerminator() + * @model + * @generated + */ +public interface FAMTerminator extends EObject { + /** + * Returns the value of the 'Data' container reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getTerminator Terminator}'. + * + *

+ * If the meaning of the 'Data' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Data' container reference. + * @see #setData(FunctionalData) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFAMTerminator_Data() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getTerminator + * @model opposite="terminator" transient="false" + * @generated + */ + FunctionalData getData(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator#getData Data}' container reference. + * + * + * @param value the new value of the 'Data' container reference. + * @see #getData() + * @generated + */ + void setData(FunctionalData value); + +} // FAMTerminator diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/Function.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/Function.java new file mode 100644 index 00000000..1fed3a2d --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/Function.java @@ -0,0 +1,61 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Function'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function#getSubElements Sub Elements}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function#getType Type}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunction() + * @model + * @generated + */ +public interface Function extends FunctionalElement { + /** + * Returns the value of the 'Sub Elements' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement}. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getParent Parent}'. + * + *

+ * If the meaning of the 'Sub Elements' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Sub Elements' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunction_SubElements() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getParent + * @model opposite="parent" containment="true" + * @generated + */ + EList getSubElements(); + + /** + * Returns the value of the 'Type' attribute. + * The literals are from the enumeration {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType}. + * + *

+ * If the meaning of the 'Type' attribute isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Type' attribute. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunction_Type() + * @model required="true" transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='ca.mcgill.ecse.dslreasoner.standalone.test.xyz.type'" + * @generated + */ + FunctionType getType(); + +} // Function diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionType.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionType.java new file mode 100644 index 00000000..71e3062d --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionType.java @@ -0,0 +1,241 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.eclipse.emf.common.util.Enumerator; + +/** + * + * A representation of the literals of the enumeration 'Function Type', + * and utility methods for working with them. + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionType() + * @model + * @generated + */ +public enum FunctionType implements Enumerator { + /** + * The 'Root' literal object. + * + * + * @see #ROOT_VALUE + * @generated + * @ordered + */ + ROOT(0, "Root", "Root"), + + /** + * The 'Intermediate' literal object. + * + * + * @see #INTERMEDIATE_VALUE + * @generated + * @ordered + */ + INTERMEDIATE(1, "Intermediate", "Intermediate"), + + /** + * The 'Leaf' literal object. + * + * + * @see #LEAF_VALUE + * @generated + * @ordered + */ + LEAF(2, "Leaf", "Leaf"); + + /** + * The 'Root' literal value. + * + *

+ * If the meaning of 'Root' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #ROOT + * @model name="Root" + * @generated + * @ordered + */ + public static final int ROOT_VALUE = 0; + + /** + * The 'Intermediate' literal value. + * + *

+ * If the meaning of 'Intermediate' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #INTERMEDIATE + * @model name="Intermediate" + * @generated + * @ordered + */ + public static final int INTERMEDIATE_VALUE = 1; + + /** + * The 'Leaf' literal value. + * + *

+ * If the meaning of 'Leaf' literal object isn't clear, + * there really should be more of a description here... + *

+ * + * @see #LEAF + * @model name="Leaf" + * @generated + * @ordered + */ + public static final int LEAF_VALUE = 2; + + /** + * An array of all the 'Function Type' enumerators. + * + * + * @generated + */ + private static final FunctionType[] VALUES_ARRAY = + new FunctionType[] { + ROOT, + INTERMEDIATE, + LEAF, + }; + + /** + * A public read-only list of all the 'Function Type' enumerators. + * + * + * @generated + */ + public static final List VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); + + /** + * Returns the 'Function Type' literal with the specified literal value. + * + * + * @param literal the literal. + * @return the matching enumerator or null. + * @generated + */ + public static FunctionType get(String literal) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + FunctionType result = VALUES_ARRAY[i]; + if (result.toString().equals(literal)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Function Type' literal with the specified name. + * + * + * @param name the name. + * @return the matching enumerator or null. + * @generated + */ + public static FunctionType getByName(String name) { + for (int i = 0; i < VALUES_ARRAY.length; ++i) { + FunctionType result = VALUES_ARRAY[i]; + if (result.getName().equals(name)) { + return result; + } + } + return null; + } + + /** + * Returns the 'Function Type' literal with the specified integer value. + * + * + * @param value the integer value. + * @return the matching enumerator or null. + * @generated + */ + public static FunctionType get(int value) { + switch (value) { + case ROOT_VALUE: return ROOT; + case INTERMEDIATE_VALUE: return INTERMEDIATE; + case LEAF_VALUE: return LEAF; + } + return null; + } + + /** + * + * + * @generated + */ + private final int value; + + /** + * + * + * @generated + */ + private final String name; + + /** + * + * + * @generated + */ + private final String literal; + + /** + * Only this class can construct instances. + * + * + * @generated + */ + private FunctionType(int value, String name, String literal) { + this.value = value; + this.name = name; + this.literal = literal; + } + + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public String getName() { + return name; + } + + /** + * + * + * @generated + */ + public String getLiteral() { + return literal; + } + + /** + * Returns the literal value of the enumerator, which is its string representation. + * + * + * @generated + */ + @Override + public String toString() { + return literal; + } + +} //FunctionType diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalArchitectureModel.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalArchitectureModel.java new file mode 100644 index 00000000..d1717a9f --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalArchitectureModel.java @@ -0,0 +1,42 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Functional Architecture Model'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel#getRootElements Root Elements}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalArchitectureModel() + * @model + * @generated + */ +public interface FunctionalArchitectureModel extends EObject { + /** + * Returns the value of the 'Root Elements' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement}. + * + *

+ * If the meaning of the 'Root Elements' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Root Elements' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalArchitectureModel_RootElements() + * @model containment="true" + * @generated + */ + EList getRootElements(); + +} // FunctionalArchitectureModel diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalData.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalData.java new file mode 100644 index 00000000..675318a8 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalData.java @@ -0,0 +1,81 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Functional Data'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getTerminator Terminator}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getInterface Interface}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalData() + * @model abstract="true" + * @generated + */ +public interface FunctionalData extends EObject { + /** + * Returns the value of the 'Terminator' containment reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator#getData Data}'. + * + *

+ * If the meaning of the 'Terminator' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Terminator' containment reference. + * @see #setTerminator(FAMTerminator) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalData_Terminator() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator#getData + * @model opposite="data" containment="true" + * @generated + */ + FAMTerminator getTerminator(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getTerminator Terminator}' containment reference. + * + * + * @param value the new value of the 'Terminator' containment reference. + * @see #getTerminator() + * @generated + */ + void setTerminator(FAMTerminator value); + + /** + * Returns the value of the 'Interface' container reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getData Data}'. + * + *

+ * If the meaning of the 'Interface' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Interface' container reference. + * @see #setInterface(FunctionalInterface) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalData_Interface() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getData + * @model opposite="data" transient="false" + * @generated + */ + FunctionalInterface getInterface(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getInterface Interface}' container reference. + * + * + * @param value the new value of the 'Interface' container reference. + * @see #getInterface() + * @generated + */ + void setInterface(FunctionalInterface value); + +} // FunctionalData diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalElement.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalElement.java new file mode 100644 index 00000000..c3ed76d6 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalElement.java @@ -0,0 +1,109 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Functional Element'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getInterface Interface}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getModel Model}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getParent Parent}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalElement() + * @model abstract="true" + * @generated + */ +public interface FunctionalElement extends EObject { + /** + * Returns the value of the 'Interface' containment reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getElement Element}'. + * + *

+ * If the meaning of the 'Interface' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Interface' containment reference. + * @see #setInterface(FunctionalInterface) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalElement_Interface() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getElement + * @model opposite="element" containment="true" + * @generated + */ + FunctionalInterface getInterface(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getInterface Interface}' containment reference. + * + * + * @param value the new value of the 'Interface' containment reference. + * @see #getInterface() + * @generated + */ + void setInterface(FunctionalInterface value); + + /** + * Returns the value of the 'Model' reference. + * + *

+ * If the meaning of the 'Model' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Model' reference. + * @see #setModel(FunctionalArchitectureModel) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalElement_Model() + * @model required="true" transient="true" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='ca.mcgill.ecse.dslreasoner.standalone.test.xyz.model'" + * @generated + */ + FunctionalArchitectureModel getModel(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getModel Model}' reference. + * + * + * @param value the new value of the 'Model' reference. + * @see #getModel() + * @generated + */ + void setModel(FunctionalArchitectureModel value); + + /** + * Returns the value of the 'Parent' container reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function#getSubElements Sub Elements}'. + * + *

+ * If the meaning of the 'Parent' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Parent' container reference. + * @see #setParent(Function) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalElement_Parent() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function#getSubElements + * @model opposite="subElements" transient="false" + * @generated + */ + Function getParent(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getParent Parent}' container reference. + * + * + * @param value the new value of the 'Parent' container reference. + * @see #getParent() + * @generated + */ + void setParent(Function value); + +} // FunctionalElement diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalInput.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalInput.java new file mode 100644 index 00000000..de629b29 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalInput.java @@ -0,0 +1,42 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Functional Input'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput#getIncomingLinks Incoming Links}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalInput() + * @model + * @generated + */ +public interface FunctionalInput extends FunctionalData { + /** + * Returns the value of the 'Incoming Links' reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink}. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getTo To}'. + * + *

+ * If the meaning of the 'Incoming Links' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Incoming Links' reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalInput_IncomingLinks() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getTo + * @model opposite="to" + * @generated + */ + EList getIncomingLinks(); + +} // FunctionalInput diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalInterface.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalInterface.java new file mode 100644 index 00000000..732f3cc6 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalInterface.java @@ -0,0 +1,73 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Functional Interface'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getData Data}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getElement Element}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalInterface() + * @model + * @generated + */ +public interface FunctionalInterface extends EObject { + /** + * Returns the value of the 'Data' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData}. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getInterface Interface}'. + * + *

+ * If the meaning of the 'Data' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Data' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalInterface_Data() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getInterface + * @model opposite="interface" containment="true" + * @generated + */ + EList getData(); + + /** + * Returns the value of the 'Element' container reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getInterface Interface}'. + * + *

+ * If the meaning of the 'Element' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Element' container reference. + * @see #setElement(FunctionalElement) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalInterface_Element() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getInterface + * @model opposite="interface" transient="false" + * @generated + */ + FunctionalElement getElement(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getElement Element}' container reference. + * + * + * @param value the new value of the 'Element' container reference. + * @see #getElement() + * @generated + */ + void setElement(FunctionalElement value); + +} // FunctionalInterface diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalOutput.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalOutput.java new file mode 100644 index 00000000..51194777 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/FunctionalOutput.java @@ -0,0 +1,42 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Functional Output'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput#getOutgoingLinks Outgoing Links}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalOutput() + * @model + * @generated + */ +public interface FunctionalOutput extends FunctionalData { + /** + * Returns the value of the 'Outgoing Links' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink}. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getFrom From}'. + * + *

+ * If the meaning of the 'Outgoing Links' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Outgoing Links' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getFunctionalOutput_OutgoingLinks() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getFrom + * @model opposite="from" containment="true" + * @generated + */ + EList getOutgoingLinks(); + +} // FunctionalOutput diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/InformationLink.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/InformationLink.java new file mode 100644 index 00000000..26946d01 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/InformationLink.java @@ -0,0 +1,81 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Information Link'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getFrom From}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getTo To}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getInformationLink() + * @model + * @generated + */ +public interface InformationLink extends EObject { + /** + * Returns the value of the 'From' container reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput#getOutgoingLinks Outgoing Links}'. + * + *

+ * If the meaning of the 'From' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'From' container reference. + * @see #setFrom(FunctionalOutput) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getInformationLink_From() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput#getOutgoingLinks + * @model opposite="outgoingLinks" transient="false" + * @generated + */ + FunctionalOutput getFrom(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getFrom From}' container reference. + * + * + * @param value the new value of the 'From' container reference. + * @see #getFrom() + * @generated + */ + void setFrom(FunctionalOutput value); + + /** + * Returns the value of the 'To' reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput#getIncomingLinks Incoming Links}'. + * + *

+ * If the meaning of the 'To' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'To' reference. + * @see #setTo(FunctionalInput) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#getInformationLink_To() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput#getIncomingLinks + * @model opposite="IncomingLinks" required="true" + * @generated + */ + FunctionalInput getTo(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getTo To}' reference. + * + * + * @param value the new value of the 'To' reference. + * @see #getTo() + * @generated + */ + void setTo(FunctionalInput value); + +} // InformationLink diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/famFactory.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/famFactory.java new file mode 100644 index 00000000..cdab0041 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/famFactory.java @@ -0,0 +1,96 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage + * @generated + */ +public interface famFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + famFactory eINSTANCE = ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.init(); + + /** + * Returns a new object of class 'Functional Architecture Model'. + * + * + * @return a new object of class 'Functional Architecture Model'. + * @generated + */ + FunctionalArchitectureModel createFunctionalArchitectureModel(); + + /** + * Returns a new object of class 'Function'. + * + * + * @return a new object of class 'Function'. + * @generated + */ + Function createFunction(); + + /** + * Returns a new object of class 'FAM Terminator'. + * + * + * @return a new object of class 'FAM Terminator'. + * @generated + */ + FAMTerminator createFAMTerminator(); + + /** + * Returns a new object of class 'Information Link'. + * + * + * @return a new object of class 'Information Link'. + * @generated + */ + InformationLink createInformationLink(); + + /** + * Returns a new object of class 'Functional Interface'. + * + * + * @return a new object of class 'Functional Interface'. + * @generated + */ + FunctionalInterface createFunctionalInterface(); + + /** + * Returns a new object of class 'Functional Input'. + * + * + * @return a new object of class 'Functional Input'. + * @generated + */ + FunctionalInput createFunctionalInput(); + + /** + * Returns a new object of class 'Functional Output'. + * + * + * @return a new object of class 'Functional Output'. + * @generated + */ + FunctionalOutput createFunctionalOutput(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + famPackage getfamPackage(); + +} //famFactory diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/famPackage.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/famPackage.java new file mode 100644 index 00000000..9b876f8b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/famPackage.java @@ -0,0 +1,1032 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/Ecore settingDelegates='org.eclipse.viatra.query.querybasedfeature'" + * @generated + */ +public interface famPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "fam"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "FamMetamodel"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "fam"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + famPackage eINSTANCE = ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl.init(); + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl Functional Element}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalElement() + * @generated + */ + int FUNCTIONAL_ELEMENT = 0; + + /** + * The feature id for the 'Interface' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ELEMENT__INTERFACE = 0; + + /** + * The feature id for the 'Model' reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ELEMENT__MODEL = 1; + + /** + * The feature id for the 'Parent' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ELEMENT__PARENT = 2; + + /** + * The number of structural features of the 'Functional Element' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ELEMENT_FEATURE_COUNT = 3; + + /** + * The number of operations of the 'Functional Element' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ELEMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalArchitectureModelImpl Functional Architecture Model}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalArchitectureModelImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalArchitectureModel() + * @generated + */ + int FUNCTIONAL_ARCHITECTURE_MODEL = 1; + + /** + * The feature id for the 'Root Elements' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS = 0; + + /** + * The number of structural features of the 'Functional Architecture Model' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ARCHITECTURE_MODEL_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Functional Architecture Model' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_ARCHITECTURE_MODEL_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl Function}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunction() + * @generated + */ + int FUNCTION = 2; + + /** + * The feature id for the 'Interface' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTION__INTERFACE = FUNCTIONAL_ELEMENT__INTERFACE; + + /** + * The feature id for the 'Model' reference. + * + * + * @generated + * @ordered + */ + int FUNCTION__MODEL = FUNCTIONAL_ELEMENT__MODEL; + + /** + * The feature id for the 'Parent' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTION__PARENT = FUNCTIONAL_ELEMENT__PARENT; + + /** + * The feature id for the 'Sub Elements' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTION__SUB_ELEMENTS = FUNCTIONAL_ELEMENT_FEATURE_COUNT + 0; + + /** + * The feature id for the 'Type' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTION__TYPE = FUNCTIONAL_ELEMENT_FEATURE_COUNT + 1; + + /** + * The number of structural features of the 'Function' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_FEATURE_COUNT = FUNCTIONAL_ELEMENT_FEATURE_COUNT + 2; + + /** + * The number of operations of the 'Function' class. + * + * + * @generated + * @ordered + */ + int FUNCTION_OPERATION_COUNT = FUNCTIONAL_ELEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FAMTerminatorImpl FAM Terminator}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FAMTerminatorImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFAMTerminator() + * @generated + */ + int FAM_TERMINATOR = 3; + + /** + * The feature id for the 'Data' container reference. + * + * + * @generated + * @ordered + */ + int FAM_TERMINATOR__DATA = 0; + + /** + * The number of structural features of the 'FAM Terminator' class. + * + * + * @generated + * @ordered + */ + int FAM_TERMINATOR_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'FAM Terminator' class. + * + * + * @generated + * @ordered + */ + int FAM_TERMINATOR_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.InformationLinkImpl Information Link}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.InformationLinkImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getInformationLink() + * @generated + */ + int INFORMATION_LINK = 4; + + /** + * The feature id for the 'From' container reference. + * + * + * @generated + * @ordered + */ + int INFORMATION_LINK__FROM = 0; + + /** + * The feature id for the 'To' reference. + * + * + * @generated + * @ordered + */ + int INFORMATION_LINK__TO = 1; + + /** + * The number of structural features of the 'Information Link' class. + * + * + * @generated + * @ordered + */ + int INFORMATION_LINK_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Information Link' class. + * + * + * @generated + * @ordered + */ + int INFORMATION_LINK_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInterfaceImpl Functional Interface}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInterfaceImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalInterface() + * @generated + */ + int FUNCTIONAL_INTERFACE = 5; + + /** + * The feature id for the 'Data' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INTERFACE__DATA = 0; + + /** + * The feature id for the 'Element' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INTERFACE__ELEMENT = 1; + + /** + * The number of structural features of the 'Functional Interface' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INTERFACE_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Functional Interface' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INTERFACE_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalDataImpl Functional Data}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalDataImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalData() + * @generated + */ + int FUNCTIONAL_DATA = 8; + + /** + * The feature id for the 'Terminator' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_DATA__TERMINATOR = 0; + + /** + * The feature id for the 'Interface' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_DATA__INTERFACE = 1; + + /** + * The number of structural features of the 'Functional Data' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_DATA_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Functional Data' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_DATA_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInputImpl Functional Input}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInputImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalInput() + * @generated + */ + int FUNCTIONAL_INPUT = 6; + + /** + * The feature id for the 'Terminator' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT__TERMINATOR = FUNCTIONAL_DATA__TERMINATOR; + + /** + * The feature id for the 'Interface' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT__INTERFACE = FUNCTIONAL_DATA__INTERFACE; + + /** + * The feature id for the 'Incoming Links' reference list. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT__INCOMING_LINKS = FUNCTIONAL_DATA_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Functional Input' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT_FEATURE_COUNT = FUNCTIONAL_DATA_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Functional Input' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT_OPERATION_COUNT = FUNCTIONAL_DATA_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalOutputImpl Functional Output}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalOutputImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalOutput() + * @generated + */ + int FUNCTIONAL_OUTPUT = 7; + + /** + * The feature id for the 'Terminator' containment reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT__TERMINATOR = FUNCTIONAL_DATA__TERMINATOR; + + /** + * The feature id for the 'Interface' container reference. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT__INTERFACE = FUNCTIONAL_DATA__INTERFACE; + + /** + * The feature id for the 'Outgoing Links' containment reference list. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT__OUTGOING_LINKS = FUNCTIONAL_DATA_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Functional Output' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT_FEATURE_COUNT = FUNCTIONAL_DATA_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Functional Output' class. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT_OPERATION_COUNT = FUNCTIONAL_DATA_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType Function Type}' enum. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionType() + * @generated + */ + int FUNCTION_TYPE = 9; + + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement Functional Element}'. + * + * + * @return the meta object for class 'Functional Element'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement + * @generated + */ + EClass getFunctionalElement(); + + /** + * Returns the meta object for the containment reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getInterface Interface}'. + * + * + * @return the meta object for the containment reference 'Interface'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getInterface() + * @see #getFunctionalElement() + * @generated + */ + EReference getFunctionalElement_Interface(); + + /** + * Returns the meta object for the reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getModel Model}'. + * + * + * @return the meta object for the reference 'Model'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getModel() + * @see #getFunctionalElement() + * @generated + */ + EReference getFunctionalElement_Model(); + + /** + * Returns the meta object for the container reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getParent Parent}'. + * + * + * @return the meta object for the container reference 'Parent'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement#getParent() + * @see #getFunctionalElement() + * @generated + */ + EReference getFunctionalElement_Parent(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel Functional Architecture Model}'. + * + * + * @return the meta object for class 'Functional Architecture Model'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel + * @generated + */ + EClass getFunctionalArchitectureModel(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel#getRootElements Root Elements}'. + * + * + * @return the meta object for the containment reference list 'Root Elements'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel#getRootElements() + * @see #getFunctionalArchitectureModel() + * @generated + */ + EReference getFunctionalArchitectureModel_RootElements(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function Function}'. + * + * + * @return the meta object for class 'Function'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function + * @generated + */ + EClass getFunction(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function#getSubElements Sub Elements}'. + * + * + * @return the meta object for the containment reference list 'Sub Elements'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function#getSubElements() + * @see #getFunction() + * @generated + */ + EReference getFunction_SubElements(); + + /** + * Returns the meta object for the attribute '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function#getType Type}'. + * + * + * @return the meta object for the attribute 'Type'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function#getType() + * @see #getFunction() + * @generated + */ + EAttribute getFunction_Type(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator FAM Terminator}'. + * + * + * @return the meta object for class 'FAM Terminator'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator + * @generated + */ + EClass getFAMTerminator(); + + /** + * Returns the meta object for the container reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator#getData Data}'. + * + * + * @return the meta object for the container reference 'Data'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator#getData() + * @see #getFAMTerminator() + * @generated + */ + EReference getFAMTerminator_Data(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink Information Link}'. + * + * + * @return the meta object for class 'Information Link'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink + * @generated + */ + EClass getInformationLink(); + + /** + * Returns the meta object for the container reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getFrom From}'. + * + * + * @return the meta object for the container reference 'From'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getFrom() + * @see #getInformationLink() + * @generated + */ + EReference getInformationLink_From(); + + /** + * Returns the meta object for the reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getTo To}'. + * + * + * @return the meta object for the reference 'To'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink#getTo() + * @see #getInformationLink() + * @generated + */ + EReference getInformationLink_To(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface Functional Interface}'. + * + * + * @return the meta object for class 'Functional Interface'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface + * @generated + */ + EClass getFunctionalInterface(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getData Data}'. + * + * + * @return the meta object for the containment reference list 'Data'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getData() + * @see #getFunctionalInterface() + * @generated + */ + EReference getFunctionalInterface_Data(); + + /** + * Returns the meta object for the container reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getElement Element}'. + * + * + * @return the meta object for the container reference 'Element'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface#getElement() + * @see #getFunctionalInterface() + * @generated + */ + EReference getFunctionalInterface_Element(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput Functional Input}'. + * + * + * @return the meta object for class 'Functional Input'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput + * @generated + */ + EClass getFunctionalInput(); + + /** + * Returns the meta object for the reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput#getIncomingLinks Incoming Links}'. + * + * + * @return the meta object for the reference list 'Incoming Links'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput#getIncomingLinks() + * @see #getFunctionalInput() + * @generated + */ + EReference getFunctionalInput_IncomingLinks(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput Functional Output}'. + * + * + * @return the meta object for class 'Functional Output'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput + * @generated + */ + EClass getFunctionalOutput(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput#getOutgoingLinks Outgoing Links}'. + * + * + * @return the meta object for the containment reference list 'Outgoing Links'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput#getOutgoingLinks() + * @see #getFunctionalOutput() + * @generated + */ + EReference getFunctionalOutput_OutgoingLinks(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData Functional Data}'. + * + * + * @return the meta object for class 'Functional Data'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData + * @generated + */ + EClass getFunctionalData(); + + /** + * Returns the meta object for the containment reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getTerminator Terminator}'. + * + * + * @return the meta object for the containment reference 'Terminator'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getTerminator() + * @see #getFunctionalData() + * @generated + */ + EReference getFunctionalData_Terminator(); + + /** + * Returns the meta object for the container reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getInterface Interface}'. + * + * + * @return the meta object for the container reference 'Interface'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData#getInterface() + * @see #getFunctionalData() + * @generated + */ + EReference getFunctionalData_Interface(); + + /** + * Returns the meta object for enum '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType Function Type}'. + * + * + * @return the meta object for enum 'Function Type'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType + * @generated + */ + EEnum getFunctionType(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + famFactory getfamFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl Functional Element}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalElement() + * @generated + */ + EClass FUNCTIONAL_ELEMENT = eINSTANCE.getFunctionalElement(); + + /** + * The meta object literal for the 'Interface' containment reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_ELEMENT__INTERFACE = eINSTANCE.getFunctionalElement_Interface(); + + /** + * The meta object literal for the 'Model' reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_ELEMENT__MODEL = eINSTANCE.getFunctionalElement_Model(); + + /** + * The meta object literal for the 'Parent' container reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_ELEMENT__PARENT = eINSTANCE.getFunctionalElement_Parent(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalArchitectureModelImpl Functional Architecture Model}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalArchitectureModelImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalArchitectureModel() + * @generated + */ + EClass FUNCTIONAL_ARCHITECTURE_MODEL = eINSTANCE.getFunctionalArchitectureModel(); + + /** + * The meta object literal for the 'Root Elements' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS = eINSTANCE.getFunctionalArchitectureModel_RootElements(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl Function}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunction() + * @generated + */ + EClass FUNCTION = eINSTANCE.getFunction(); + + /** + * The meta object literal for the 'Sub Elements' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTION__SUB_ELEMENTS = eINSTANCE.getFunction_SubElements(); + + /** + * The meta object literal for the 'Type' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTION__TYPE = eINSTANCE.getFunction_Type(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FAMTerminatorImpl FAM Terminator}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FAMTerminatorImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFAMTerminator() + * @generated + */ + EClass FAM_TERMINATOR = eINSTANCE.getFAMTerminator(); + + /** + * The meta object literal for the 'Data' container reference feature. + * + * + * @generated + */ + EReference FAM_TERMINATOR__DATA = eINSTANCE.getFAMTerminator_Data(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.InformationLinkImpl Information Link}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.InformationLinkImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getInformationLink() + * @generated + */ + EClass INFORMATION_LINK = eINSTANCE.getInformationLink(); + + /** + * The meta object literal for the 'From' container reference feature. + * + * + * @generated + */ + EReference INFORMATION_LINK__FROM = eINSTANCE.getInformationLink_From(); + + /** + * The meta object literal for the 'To' reference feature. + * + * + * @generated + */ + EReference INFORMATION_LINK__TO = eINSTANCE.getInformationLink_To(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInterfaceImpl Functional Interface}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInterfaceImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalInterface() + * @generated + */ + EClass FUNCTIONAL_INTERFACE = eINSTANCE.getFunctionalInterface(); + + /** + * The meta object literal for the 'Data' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTIONAL_INTERFACE__DATA = eINSTANCE.getFunctionalInterface_Data(); + + /** + * The meta object literal for the 'Element' container reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_INTERFACE__ELEMENT = eINSTANCE.getFunctionalInterface_Element(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInputImpl Functional Input}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInputImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalInput() + * @generated + */ + EClass FUNCTIONAL_INPUT = eINSTANCE.getFunctionalInput(); + + /** + * The meta object literal for the 'Incoming Links' reference list feature. + * + * + * @generated + */ + EReference FUNCTIONAL_INPUT__INCOMING_LINKS = eINSTANCE.getFunctionalInput_IncomingLinks(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalOutputImpl Functional Output}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalOutputImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalOutput() + * @generated + */ + EClass FUNCTIONAL_OUTPUT = eINSTANCE.getFunctionalOutput(); + + /** + * The meta object literal for the 'Outgoing Links' containment reference list feature. + * + * + * @generated + */ + EReference FUNCTIONAL_OUTPUT__OUTGOING_LINKS = eINSTANCE.getFunctionalOutput_OutgoingLinks(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalDataImpl Functional Data}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalDataImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionalData() + * @generated + */ + EClass FUNCTIONAL_DATA = eINSTANCE.getFunctionalData(); + + /** + * The meta object literal for the 'Terminator' containment reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_DATA__TERMINATOR = eINSTANCE.getFunctionalData_Terminator(); + + /** + * The meta object literal for the 'Interface' container reference feature. + * + * + * @generated + */ + EReference FUNCTIONAL_DATA__INTERFACE = eINSTANCE.getFunctionalData_Interface(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType Function Type}' enum. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famPackageImpl#getFunctionType() + * @generated + */ + EEnum FUNCTION_TYPE = eINSTANCE.getFunctionType(); + + } + +} //famPackage diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FAMTerminatorImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FAMTerminatorImpl.java new file mode 100644 index 00000000..6eba60f6 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FAMTerminatorImpl.java @@ -0,0 +1,196 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'FAM Terminator'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FAMTerminatorImpl#getData Data}
  • + *
+ * + * @generated + */ +public class FAMTerminatorImpl extends MinimalEObjectImpl.Container implements FAMTerminator { + /** + * + * + * @generated + */ + protected FAMTerminatorImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return famPackage.Literals.FAM_TERMINATOR; + } + + /** + * + * + * @generated + */ + public FunctionalData getData() { + if (eContainerFeatureID() != famPackage.FAM_TERMINATOR__DATA) return null; + return (FunctionalData)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetData(FunctionalData newData, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newData, famPackage.FAM_TERMINATOR__DATA, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setData(FunctionalData newData) { + if (newData != eInternalContainer() || (eContainerFeatureID() != famPackage.FAM_TERMINATOR__DATA && newData != null)) { + if (EcoreUtil.isAncestor(this, newData)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newData != null) + msgs = ((InternalEObject)newData).eInverseAdd(this, famPackage.FUNCTIONAL_DATA__TERMINATOR, FunctionalData.class, msgs); + msgs = basicSetData(newData, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, famPackage.FAM_TERMINATOR__DATA, newData, newData)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FAM_TERMINATOR__DATA: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetData((FunctionalData)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FAM_TERMINATOR__DATA: + return basicSetData(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case famPackage.FAM_TERMINATOR__DATA: + return eInternalContainer().eInverseRemove(this, famPackage.FUNCTIONAL_DATA__TERMINATOR, FunctionalData.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case famPackage.FAM_TERMINATOR__DATA: + return getData(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case famPackage.FAM_TERMINATOR__DATA: + setData((FunctionalData)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case famPackage.FAM_TERMINATOR__DATA: + setData((FunctionalData)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case famPackage.FAM_TERMINATOR__DATA: + return getData() != null; + } + return super.eIsSet(featureID); + } + +} //FAMTerminatorImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionImpl.java new file mode 100644 index 00000000..ec3e884e --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionImpl.java @@ -0,0 +1,191 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Function'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl#getSubElements Sub Elements}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl#getType Type}
  • + *
+ * + * @generated + */ +public class FunctionImpl extends FunctionalElementImpl implements Function { + /** + * The cached value of the '{@link #getSubElements() Sub Elements}' containment reference list. + * + * + * @see #getSubElements() + * @generated + * @ordered + */ + protected EList subElements; + + /** + * The cached setting delegate for the '{@link #getType() Type}' attribute. + * + * + * @see #getType() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate TYPE__ESETTING_DELEGATE = ((EStructuralFeature.Internal)famPackage.Literals.FUNCTION__TYPE).getSettingDelegate(); + + /** + * + * + * @generated + */ + protected FunctionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return famPackage.Literals.FUNCTION; + } + + /** + * + * + * @generated + */ + public EList getSubElements() { + if (subElements == null) { + subElements = new EObjectContainmentWithInverseEList(FunctionalElement.class, this, famPackage.FUNCTION__SUB_ELEMENTS, famPackage.FUNCTIONAL_ELEMENT__PARENT); + } + return subElements; + } + + /** + * + * + * @generated + */ + public FunctionType getType() { + return (FunctionType)TYPE__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTION__SUB_ELEMENTS: + return ((InternalEList)(InternalEList)getSubElements()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTION__SUB_ELEMENTS: + return ((InternalEList)getSubElements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case famPackage.FUNCTION__SUB_ELEMENTS: + return getSubElements(); + case famPackage.FUNCTION__TYPE: + return getType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case famPackage.FUNCTION__SUB_ELEMENTS: + getSubElements().clear(); + getSubElements().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case famPackage.FUNCTION__SUB_ELEMENTS: + getSubElements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case famPackage.FUNCTION__SUB_ELEMENTS: + return subElements != null && !subElements.isEmpty(); + case famPackage.FUNCTION__TYPE: + return TYPE__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + } + return super.eIsSet(featureID); + } + +} //FunctionImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalArchitectureModelImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalArchitectureModelImpl.java new file mode 100644 index 00000000..1b45df44 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalArchitectureModelImpl.java @@ -0,0 +1,152 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Functional Architecture Model'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalArchitectureModelImpl#getRootElements Root Elements}
  • + *
+ * + * @generated + */ +public class FunctionalArchitectureModelImpl extends MinimalEObjectImpl.Container implements FunctionalArchitectureModel { + /** + * The cached value of the '{@link #getRootElements() Root Elements}' containment reference list. + * + * + * @see #getRootElements() + * @generated + * @ordered + */ + protected EList rootElements; + + /** + * + * + * @generated + */ + protected FunctionalArchitectureModelImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return famPackage.Literals.FUNCTIONAL_ARCHITECTURE_MODEL; + } + + /** + * + * + * @generated + */ + public EList getRootElements() { + if (rootElements == null) { + rootElements = new EObjectContainmentEList(FunctionalElement.class, this, famPackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS); + } + return rootElements; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS: + return ((InternalEList)getRootElements()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case famPackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS: + return getRootElements(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case famPackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS: + getRootElements().clear(); + getRootElements().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS: + getRootElements().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS: + return rootElements != null && !rootElements.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //FunctionalArchitectureModelImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalDataImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalDataImpl.java new file mode 100644 index 00000000..069d53d4 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalDataImpl.java @@ -0,0 +1,267 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'Functional Data'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalDataImpl#getTerminator Terminator}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalDataImpl#getInterface Interface}
  • + *
+ * + * @generated + */ +public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container implements FunctionalData { + /** + * The cached value of the '{@link #getTerminator() Terminator}' containment reference. + * + * + * @see #getTerminator() + * @generated + * @ordered + */ + protected FAMTerminator terminator; + + /** + * + * + * @generated + */ + protected FunctionalDataImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return famPackage.Literals.FUNCTIONAL_DATA; + } + + /** + * + * + * @generated + */ + public FAMTerminator getTerminator() { + return terminator; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetTerminator(FAMTerminator newTerminator, NotificationChain msgs) { + FAMTerminator oldTerminator = terminator; + terminator = newTerminator; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, famPackage.FUNCTIONAL_DATA__TERMINATOR, oldTerminator, newTerminator); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTerminator(FAMTerminator newTerminator) { + if (newTerminator != terminator) { + NotificationChain msgs = null; + if (terminator != null) + msgs = ((InternalEObject)terminator).eInverseRemove(this, famPackage.FAM_TERMINATOR__DATA, FAMTerminator.class, msgs); + if (newTerminator != null) + msgs = ((InternalEObject)newTerminator).eInverseAdd(this, famPackage.FAM_TERMINATOR__DATA, FAMTerminator.class, msgs); + msgs = basicSetTerminator(newTerminator, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, famPackage.FUNCTIONAL_DATA__TERMINATOR, newTerminator, newTerminator)); + } + + /** + * + * + * @generated + */ + public FunctionalInterface getInterface() { + if (eContainerFeatureID() != famPackage.FUNCTIONAL_DATA__INTERFACE) return null; + return (FunctionalInterface)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetInterface(FunctionalInterface newInterface, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newInterface, famPackage.FUNCTIONAL_DATA__INTERFACE, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setInterface(FunctionalInterface newInterface) { + if (newInterface != eInternalContainer() || (eContainerFeatureID() != famPackage.FUNCTIONAL_DATA__INTERFACE && newInterface != null)) { + if (EcoreUtil.isAncestor(this, newInterface)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newInterface != null) + msgs = ((InternalEObject)newInterface).eInverseAdd(this, famPackage.FUNCTIONAL_INTERFACE__DATA, FunctionalInterface.class, msgs); + msgs = basicSetInterface(newInterface, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, famPackage.FUNCTIONAL_DATA__INTERFACE, newInterface, newInterface)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_DATA__TERMINATOR: + if (terminator != null) + msgs = ((InternalEObject)terminator).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - famPackage.FUNCTIONAL_DATA__TERMINATOR, null, msgs); + return basicSetTerminator((FAMTerminator)otherEnd, msgs); + case famPackage.FUNCTIONAL_DATA__INTERFACE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetInterface((FunctionalInterface)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_DATA__TERMINATOR: + return basicSetTerminator(null, msgs); + case famPackage.FUNCTIONAL_DATA__INTERFACE: + return basicSetInterface(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case famPackage.FUNCTIONAL_DATA__INTERFACE: + return eInternalContainer().eInverseRemove(this, famPackage.FUNCTIONAL_INTERFACE__DATA, FunctionalInterface.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case famPackage.FUNCTIONAL_DATA__TERMINATOR: + return getTerminator(); + case famPackage.FUNCTIONAL_DATA__INTERFACE: + return getInterface(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case famPackage.FUNCTIONAL_DATA__TERMINATOR: + setTerminator((FAMTerminator)newValue); + return; + case famPackage.FUNCTIONAL_DATA__INTERFACE: + setInterface((FunctionalInterface)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_DATA__TERMINATOR: + setTerminator((FAMTerminator)null); + return; + case famPackage.FUNCTIONAL_DATA__INTERFACE: + setInterface((FunctionalInterface)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_DATA__TERMINATOR: + return terminator != null; + case famPackage.FUNCTIONAL_DATA__INTERFACE: + return getInterface() != null; + } + return super.eIsSet(featureID); + } + +} //FunctionalDataImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalElementImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalElementImpl.java new file mode 100644 index 00000000..318a8706 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalElementImpl.java @@ -0,0 +1,318 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'Functional Element'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl#getInterface Interface}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl#getModel Model}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl#getParent Parent}
  • + *
+ * + * @generated + */ +public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container implements FunctionalElement { + /** + * The cached value of the '{@link #getInterface() Interface}' containment reference. + * + * + * @see #getInterface() + * @generated + * @ordered + */ + protected FunctionalInterface interface_; + + /** + * The cached setting delegate for the '{@link #getModel() Model}' reference. + * + * + * @see #getModel() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate MODEL__ESETTING_DELEGATE = ((EStructuralFeature.Internal)famPackage.Literals.FUNCTIONAL_ELEMENT__MODEL).getSettingDelegate(); + + /** + * + * + * @generated + */ + protected FunctionalElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return famPackage.Literals.FUNCTIONAL_ELEMENT; + } + + /** + * + * + * @generated + */ + public FunctionalInterface getInterface() { + return interface_; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetInterface(FunctionalInterface newInterface, NotificationChain msgs) { + FunctionalInterface oldInterface = interface_; + interface_ = newInterface; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, famPackage.FUNCTIONAL_ELEMENT__INTERFACE, oldInterface, newInterface); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setInterface(FunctionalInterface newInterface) { + if (newInterface != interface_) { + NotificationChain msgs = null; + if (interface_ != null) + msgs = ((InternalEObject)interface_).eInverseRemove(this, famPackage.FUNCTIONAL_INTERFACE__ELEMENT, FunctionalInterface.class, msgs); + if (newInterface != null) + msgs = ((InternalEObject)newInterface).eInverseAdd(this, famPackage.FUNCTIONAL_INTERFACE__ELEMENT, FunctionalInterface.class, msgs); + msgs = basicSetInterface(newInterface, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, famPackage.FUNCTIONAL_ELEMENT__INTERFACE, newInterface, newInterface)); + } + + /** + * + * + * @generated + */ + public FunctionalArchitectureModel getModel() { + return (FunctionalArchitectureModel)MODEL__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + public FunctionalArchitectureModel basicGetModel() { + return (FunctionalArchitectureModel)MODEL__ESETTING_DELEGATE.dynamicGet(this, null, 0, false, false); + } + + /** + * + * + * @generated + */ + public void setModel(FunctionalArchitectureModel newModel) { + MODEL__ESETTING_DELEGATE.dynamicSet(this, null, 0, newModel); + } + + /** + * + * + * @generated + */ + public Function getParent() { + if (eContainerFeatureID() != famPackage.FUNCTIONAL_ELEMENT__PARENT) return null; + return (Function)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetParent(Function newParent, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newParent, famPackage.FUNCTIONAL_ELEMENT__PARENT, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setParent(Function newParent) { + if (newParent != eInternalContainer() || (eContainerFeatureID() != famPackage.FUNCTIONAL_ELEMENT__PARENT && newParent != null)) { + if (EcoreUtil.isAncestor(this, newParent)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newParent != null) + msgs = ((InternalEObject)newParent).eInverseAdd(this, famPackage.FUNCTION__SUB_ELEMENTS, Function.class, msgs); + msgs = basicSetParent(newParent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, famPackage.FUNCTIONAL_ELEMENT__PARENT, newParent, newParent)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_ELEMENT__INTERFACE: + if (interface_ != null) + msgs = ((InternalEObject)interface_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - famPackage.FUNCTIONAL_ELEMENT__INTERFACE, null, msgs); + return basicSetInterface((FunctionalInterface)otherEnd, msgs); + case famPackage.FUNCTIONAL_ELEMENT__PARENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetParent((Function)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_ELEMENT__INTERFACE: + return basicSetInterface(null, msgs); + case famPackage.FUNCTIONAL_ELEMENT__PARENT: + return basicSetParent(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case famPackage.FUNCTIONAL_ELEMENT__PARENT: + return eInternalContainer().eInverseRemove(this, famPackage.FUNCTION__SUB_ELEMENTS, Function.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case famPackage.FUNCTIONAL_ELEMENT__INTERFACE: + return getInterface(); + case famPackage.FUNCTIONAL_ELEMENT__MODEL: + if (resolve) return getModel(); + return basicGetModel(); + case famPackage.FUNCTIONAL_ELEMENT__PARENT: + return getParent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case famPackage.FUNCTIONAL_ELEMENT__INTERFACE: + setInterface((FunctionalInterface)newValue); + return; + case famPackage.FUNCTIONAL_ELEMENT__MODEL: + setModel((FunctionalArchitectureModel)newValue); + return; + case famPackage.FUNCTIONAL_ELEMENT__PARENT: + setParent((Function)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_ELEMENT__INTERFACE: + setInterface((FunctionalInterface)null); + return; + case famPackage.FUNCTIONAL_ELEMENT__MODEL: + setModel((FunctionalArchitectureModel)null); + return; + case famPackage.FUNCTIONAL_ELEMENT__PARENT: + setParent((Function)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_ELEMENT__INTERFACE: + return interface_ != null; + case famPackage.FUNCTIONAL_ELEMENT__MODEL: + return MODEL__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + case famPackage.FUNCTIONAL_ELEMENT__PARENT: + return getParent() != null; + } + return super.eIsSet(featureID); + } + +} //FunctionalElementImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalInputImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalInputImpl.java new file mode 100644 index 00000000..b62e9742 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalInputImpl.java @@ -0,0 +1,165 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Functional Input'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInputImpl#getIncomingLinks Incoming Links}
  • + *
+ * + * @generated + */ +public class FunctionalInputImpl extends FunctionalDataImpl implements FunctionalInput { + /** + * The cached value of the '{@link #getIncomingLinks() Incoming Links}' reference list. + * + * + * @see #getIncomingLinks() + * @generated + * @ordered + */ + protected EList incomingLinks; + + /** + * + * + * @generated + */ + protected FunctionalInputImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return famPackage.Literals.FUNCTIONAL_INPUT; + } + + /** + * + * + * @generated + */ + public EList getIncomingLinks() { + if (incomingLinks == null) { + incomingLinks = new EObjectWithInverseResolvingEList(InformationLink.class, this, famPackage.FUNCTIONAL_INPUT__INCOMING_LINKS, famPackage.INFORMATION_LINK__TO); + } + return incomingLinks; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + return ((InternalEList)(InternalEList)getIncomingLinks()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + return ((InternalEList)getIncomingLinks()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case famPackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + return getIncomingLinks(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case famPackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + getIncomingLinks().clear(); + getIncomingLinks().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + getIncomingLinks().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_INPUT__INCOMING_LINKS: + return incomingLinks != null && !incomingLinks.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //FunctionalInputImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalInterfaceImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalInterfaceImpl.java new file mode 100644 index 00000000..b9417a23 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalInterfaceImpl.java @@ -0,0 +1,243 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EcoreUtil; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Functional Interface'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInterfaceImpl#getData Data}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalInterfaceImpl#getElement Element}
  • + *
+ * + * @generated + */ +public class FunctionalInterfaceImpl extends MinimalEObjectImpl.Container implements FunctionalInterface { + /** + * The cached value of the '{@link #getData() Data}' containment reference list. + * + * + * @see #getData() + * @generated + * @ordered + */ + protected EList data; + + /** + * + * + * @generated + */ + protected FunctionalInterfaceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return famPackage.Literals.FUNCTIONAL_INTERFACE; + } + + /** + * + * + * @generated + */ + public EList getData() { + if (data == null) { + data = new EObjectContainmentWithInverseEList(FunctionalData.class, this, famPackage.FUNCTIONAL_INTERFACE__DATA, famPackage.FUNCTIONAL_DATA__INTERFACE); + } + return data; + } + + /** + * + * + * @generated + */ + public FunctionalElement getElement() { + if (eContainerFeatureID() != famPackage.FUNCTIONAL_INTERFACE__ELEMENT) return null; + return (FunctionalElement)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetElement(FunctionalElement newElement, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newElement, famPackage.FUNCTIONAL_INTERFACE__ELEMENT, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setElement(FunctionalElement newElement) { + if (newElement != eInternalContainer() || (eContainerFeatureID() != famPackage.FUNCTIONAL_INTERFACE__ELEMENT && newElement != null)) { + if (EcoreUtil.isAncestor(this, newElement)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newElement != null) + msgs = ((InternalEObject)newElement).eInverseAdd(this, famPackage.FUNCTIONAL_ELEMENT__INTERFACE, FunctionalElement.class, msgs); + msgs = basicSetElement(newElement, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, famPackage.FUNCTIONAL_INTERFACE__ELEMENT, newElement, newElement)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_INTERFACE__DATA: + return ((InternalEList)(InternalEList)getData()).basicAdd(otherEnd, msgs); + case famPackage.FUNCTIONAL_INTERFACE__ELEMENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetElement((FunctionalElement)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_INTERFACE__DATA: + return ((InternalEList)getData()).basicRemove(otherEnd, msgs); + case famPackage.FUNCTIONAL_INTERFACE__ELEMENT: + return basicSetElement(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case famPackage.FUNCTIONAL_INTERFACE__ELEMENT: + return eInternalContainer().eInverseRemove(this, famPackage.FUNCTIONAL_ELEMENT__INTERFACE, FunctionalElement.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case famPackage.FUNCTIONAL_INTERFACE__DATA: + return getData(); + case famPackage.FUNCTIONAL_INTERFACE__ELEMENT: + return getElement(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case famPackage.FUNCTIONAL_INTERFACE__DATA: + getData().clear(); + getData().addAll((Collection)newValue); + return; + case famPackage.FUNCTIONAL_INTERFACE__ELEMENT: + setElement((FunctionalElement)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_INTERFACE__DATA: + getData().clear(); + return; + case famPackage.FUNCTIONAL_INTERFACE__ELEMENT: + setElement((FunctionalElement)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_INTERFACE__DATA: + return data != null && !data.isEmpty(); + case famPackage.FUNCTIONAL_INTERFACE__ELEMENT: + return getElement() != null; + } + return super.eIsSet(featureID); + } + +} //FunctionalInterfaceImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalOutputImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalOutputImpl.java new file mode 100644 index 00000000..30bde348 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/FunctionalOutputImpl.java @@ -0,0 +1,165 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Functional Output'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalOutputImpl#getOutgoingLinks Outgoing Links}
  • + *
+ * + * @generated + */ +public class FunctionalOutputImpl extends FunctionalDataImpl implements FunctionalOutput { + /** + * The cached value of the '{@link #getOutgoingLinks() Outgoing Links}' containment reference list. + * + * + * @see #getOutgoingLinks() + * @generated + * @ordered + */ + protected EList outgoingLinks; + + /** + * + * + * @generated + */ + protected FunctionalOutputImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return famPackage.Literals.FUNCTIONAL_OUTPUT; + } + + /** + * + * + * @generated + */ + public EList getOutgoingLinks() { + if (outgoingLinks == null) { + outgoingLinks = new EObjectContainmentWithInverseEList(InformationLink.class, this, famPackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, famPackage.INFORMATION_LINK__FROM); + } + return outgoingLinks; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + return ((InternalEList)(InternalEList)getOutgoingLinks()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + return ((InternalEList)getOutgoingLinks()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case famPackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + return getOutgoingLinks(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case famPackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + getOutgoingLinks().clear(); + getOutgoingLinks().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + getOutgoingLinks().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case famPackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS: + return outgoingLinks != null && !outgoingLinks.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //FunctionalOutputImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/InformationLinkImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/InformationLinkImpl.java new file mode 100644 index 00000000..b87f4201 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/InformationLinkImpl.java @@ -0,0 +1,285 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'Information Link'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.InformationLinkImpl#getFrom From}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.InformationLinkImpl#getTo To}
  • + *
+ * + * @generated + */ +public class InformationLinkImpl extends MinimalEObjectImpl.Container implements InformationLink { + /** + * The cached value of the '{@link #getTo() To}' reference. + * + * + * @see #getTo() + * @generated + * @ordered + */ + protected FunctionalInput to; + + /** + * + * + * @generated + */ + protected InformationLinkImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return famPackage.Literals.INFORMATION_LINK; + } + + /** + * + * + * @generated + */ + public FunctionalOutput getFrom() { + if (eContainerFeatureID() != famPackage.INFORMATION_LINK__FROM) return null; + return (FunctionalOutput)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetFrom(FunctionalOutput newFrom, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newFrom, famPackage.INFORMATION_LINK__FROM, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setFrom(FunctionalOutput newFrom) { + if (newFrom != eInternalContainer() || (eContainerFeatureID() != famPackage.INFORMATION_LINK__FROM && newFrom != null)) { + if (EcoreUtil.isAncestor(this, newFrom)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newFrom != null) + msgs = ((InternalEObject)newFrom).eInverseAdd(this, famPackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalOutput.class, msgs); + msgs = basicSetFrom(newFrom, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, famPackage.INFORMATION_LINK__FROM, newFrom, newFrom)); + } + + /** + * + * + * @generated + */ + public FunctionalInput getTo() { + if (to != null && to.eIsProxy()) { + InternalEObject oldTo = (InternalEObject)to; + to = (FunctionalInput)eResolveProxy(oldTo); + if (to != oldTo) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, famPackage.INFORMATION_LINK__TO, oldTo, to)); + } + } + return to; + } + + /** + * + * + * @generated + */ + public FunctionalInput basicGetTo() { + return to; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetTo(FunctionalInput newTo, NotificationChain msgs) { + FunctionalInput oldTo = to; + to = newTo; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, famPackage.INFORMATION_LINK__TO, oldTo, newTo); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTo(FunctionalInput newTo) { + if (newTo != to) { + NotificationChain msgs = null; + if (to != null) + msgs = ((InternalEObject)to).eInverseRemove(this, famPackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs); + if (newTo != null) + msgs = ((InternalEObject)newTo).eInverseAdd(this, famPackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs); + msgs = basicSetTo(newTo, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, famPackage.INFORMATION_LINK__TO, newTo, newTo)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.INFORMATION_LINK__FROM: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetFrom((FunctionalOutput)otherEnd, msgs); + case famPackage.INFORMATION_LINK__TO: + if (to != null) + msgs = ((InternalEObject)to).eInverseRemove(this, famPackage.FUNCTIONAL_INPUT__INCOMING_LINKS, FunctionalInput.class, msgs); + return basicSetTo((FunctionalInput)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case famPackage.INFORMATION_LINK__FROM: + return basicSetFrom(null, msgs); + case famPackage.INFORMATION_LINK__TO: + return basicSetTo(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case famPackage.INFORMATION_LINK__FROM: + return eInternalContainer().eInverseRemove(this, famPackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalOutput.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case famPackage.INFORMATION_LINK__FROM: + return getFrom(); + case famPackage.INFORMATION_LINK__TO: + if (resolve) return getTo(); + return basicGetTo(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case famPackage.INFORMATION_LINK__FROM: + setFrom((FunctionalOutput)newValue); + return; + case famPackage.INFORMATION_LINK__TO: + setTo((FunctionalInput)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case famPackage.INFORMATION_LINK__FROM: + setFrom((FunctionalOutput)null); + return; + case famPackage.INFORMATION_LINK__TO: + setTo((FunctionalInput)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case famPackage.INFORMATION_LINK__FROM: + return getFrom() != null; + case famPackage.INFORMATION_LINK__TO: + return to != null; + } + return super.eIsSet(featureID); + } + +} //InformationLinkImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famFactoryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famFactoryImpl.java new file mode 100644 index 00000000..5c2a9c51 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famFactoryImpl.java @@ -0,0 +1,219 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.impl.EFactoryImpl; +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famFactory; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class famFactoryImpl extends EFactoryImpl implements famFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static famFactory init() { + try { + famFactory thefamFactory = (famFactory)EPackage.Registry.INSTANCE.getEFactory(famPackage.eNS_URI); + if (thefamFactory != null) { + return thefamFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new famFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public famFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case famPackage.FUNCTIONAL_ARCHITECTURE_MODEL: return createFunctionalArchitectureModel(); + case famPackage.FUNCTION: return createFunction(); + case famPackage.FAM_TERMINATOR: return createFAMTerminator(); + case famPackage.INFORMATION_LINK: return createInformationLink(); + case famPackage.FUNCTIONAL_INTERFACE: return createFunctionalInterface(); + case famPackage.FUNCTIONAL_INPUT: return createFunctionalInput(); + case famPackage.FUNCTIONAL_OUTPUT: return createFunctionalOutput(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public Object createFromString(EDataType eDataType, String initialValue) { + switch (eDataType.getClassifierID()) { + case famPackage.FUNCTION_TYPE: + return createFunctionTypeFromString(eDataType, initialValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + @Override + public String convertToString(EDataType eDataType, Object instanceValue) { + switch (eDataType.getClassifierID()) { + case famPackage.FUNCTION_TYPE: + return convertFunctionTypeToString(eDataType, instanceValue); + default: + throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public FunctionalArchitectureModel createFunctionalArchitectureModel() { + FunctionalArchitectureModelImpl functionalArchitectureModel = new FunctionalArchitectureModelImpl(); + return functionalArchitectureModel; + } + + /** + * + * + * @generated + */ + public Function createFunction() { + FunctionImpl function = new FunctionImpl(); + return function; + } + + /** + * + * + * @generated + */ + public FAMTerminator createFAMTerminator() { + FAMTerminatorImpl famTerminator = new FAMTerminatorImpl(); + return famTerminator; + } + + /** + * + * + * @generated + */ + public InformationLink createInformationLink() { + InformationLinkImpl informationLink = new InformationLinkImpl(); + return informationLink; + } + + /** + * + * + * @generated + */ + public FunctionalInterface createFunctionalInterface() { + FunctionalInterfaceImpl functionalInterface = new FunctionalInterfaceImpl(); + return functionalInterface; + } + + /** + * + * + * @generated + */ + public FunctionalInput createFunctionalInput() { + FunctionalInputImpl functionalInput = new FunctionalInputImpl(); + return functionalInput; + } + + /** + * + * + * @generated + */ + public FunctionalOutput createFunctionalOutput() { + FunctionalOutputImpl functionalOutput = new FunctionalOutputImpl(); + return functionalOutput; + } + + /** + * + * + * @generated + */ + public FunctionType createFunctionTypeFromString(EDataType eDataType, String initialValue) { + FunctionType result = FunctionType.get(initialValue); + if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); + return result; + } + + /** + * + * + * @generated + */ + public String convertFunctionTypeToString(EDataType eDataType, Object instanceValue) { + return instanceValue == null ? null : instanceValue.toString(); + } + + /** + * + * + * @generated + */ + public famPackage getfamPackage() { + return (famPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static famPackage getPackage() { + return famPackage.eINSTANCE; + } + +} //famFactoryImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famPackageImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famPackageImpl.java new file mode 100644 index 00000000..74efeeeb --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/impl/famPackageImpl.java @@ -0,0 +1,574 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionType; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famFactory; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class famPackageImpl extends EPackageImpl implements famPackage { + /** + * + * + * @generated + */ + private EClass functionalElementEClass = null; + + /** + * + * + * @generated + */ + private EClass functionalArchitectureModelEClass = null; + + /** + * + * + * @generated + */ + private EClass functionEClass = null; + + /** + * + * + * @generated + */ + private EClass famTerminatorEClass = null; + + /** + * + * + * @generated + */ + private EClass informationLinkEClass = null; + + /** + * + * + * @generated + */ + private EClass functionalInterfaceEClass = null; + + /** + * + * + * @generated + */ + private EClass functionalInputEClass = null; + + /** + * + * + * @generated + */ + private EClass functionalOutputEClass = null; + + /** + * + * + * @generated + */ + private EClass functionalDataEClass = null; + + /** + * + * + * @generated + */ + private EEnum functionTypeEEnum = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage#eNS_URI + * @see #init() + * @generated + */ + private famPackageImpl() { + super(eNS_URI, famFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link famPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static famPackage init() { + if (isInited) return (famPackage)EPackage.Registry.INSTANCE.getEPackage(famPackage.eNS_URI); + + // Obtain or create and register package + famPackageImpl thefamPackage = (famPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof famPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new famPackageImpl()); + + isInited = true; + + // Create package meta-data objects + thefamPackage.createPackageContents(); + + // Initialize created meta-data + thefamPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + thefamPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(famPackage.eNS_URI, thefamPackage); + return thefamPackage; + } + + /** + * + * + * @generated + */ + public EClass getFunctionalElement() { + return functionalElementEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalElement_Interface() { + return (EReference)functionalElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFunctionalElement_Model() { + return (EReference)functionalElementEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EReference getFunctionalElement_Parent() { + return (EReference)functionalElementEClass.getEStructuralFeatures().get(2); + } + + /** + * + * + * @generated + */ + public EClass getFunctionalArchitectureModel() { + return functionalArchitectureModelEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalArchitectureModel_RootElements() { + return (EReference)functionalArchitectureModelEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFunction() { + return functionEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunction_SubElements() { + return (EReference)functionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EAttribute getFunction_Type() { + return (EAttribute)functionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFAMTerminator() { + return famTerminatorEClass; + } + + /** + * + * + * @generated + */ + public EReference getFAMTerminator_Data() { + return (EReference)famTerminatorEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getInformationLink() { + return informationLinkEClass; + } + + /** + * + * + * @generated + */ + public EReference getInformationLink_From() { + return (EReference)informationLinkEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getInformationLink_To() { + return (EReference)informationLinkEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFunctionalInterface() { + return functionalInterfaceEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalInterface_Data() { + return (EReference)functionalInterfaceEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFunctionalInterface_Element() { + return (EReference)functionalInterfaceEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFunctionalInput() { + return functionalInputEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalInput_IncomingLinks() { + return (EReference)functionalInputEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFunctionalOutput() { + return functionalOutputEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalOutput_OutgoingLinks() { + return (EReference)functionalOutputEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFunctionalData() { + return functionalDataEClass; + } + + /** + * + * + * @generated + */ + public EReference getFunctionalData_Terminator() { + return (EReference)functionalDataEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFunctionalData_Interface() { + return (EReference)functionalDataEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EEnum getFunctionType() { + return functionTypeEEnum; + } + + /** + * + * + * @generated + */ + public famFactory getfamFactory() { + return (famFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + functionalElementEClass = createEClass(FUNCTIONAL_ELEMENT); + createEReference(functionalElementEClass, FUNCTIONAL_ELEMENT__INTERFACE); + createEReference(functionalElementEClass, FUNCTIONAL_ELEMENT__MODEL); + createEReference(functionalElementEClass, FUNCTIONAL_ELEMENT__PARENT); + + functionalArchitectureModelEClass = createEClass(FUNCTIONAL_ARCHITECTURE_MODEL); + createEReference(functionalArchitectureModelEClass, FUNCTIONAL_ARCHITECTURE_MODEL__ROOT_ELEMENTS); + + functionEClass = createEClass(FUNCTION); + createEReference(functionEClass, FUNCTION__SUB_ELEMENTS); + createEAttribute(functionEClass, FUNCTION__TYPE); + + famTerminatorEClass = createEClass(FAM_TERMINATOR); + createEReference(famTerminatorEClass, FAM_TERMINATOR__DATA); + + informationLinkEClass = createEClass(INFORMATION_LINK); + createEReference(informationLinkEClass, INFORMATION_LINK__FROM); + createEReference(informationLinkEClass, INFORMATION_LINK__TO); + + functionalInterfaceEClass = createEClass(FUNCTIONAL_INTERFACE); + createEReference(functionalInterfaceEClass, FUNCTIONAL_INTERFACE__DATA); + createEReference(functionalInterfaceEClass, FUNCTIONAL_INTERFACE__ELEMENT); + + functionalInputEClass = createEClass(FUNCTIONAL_INPUT); + createEReference(functionalInputEClass, FUNCTIONAL_INPUT__INCOMING_LINKS); + + functionalOutputEClass = createEClass(FUNCTIONAL_OUTPUT); + createEReference(functionalOutputEClass, FUNCTIONAL_OUTPUT__OUTGOING_LINKS); + + functionalDataEClass = createEClass(FUNCTIONAL_DATA); + createEReference(functionalDataEClass, FUNCTIONAL_DATA__TERMINATOR); + createEReference(functionalDataEClass, FUNCTIONAL_DATA__INTERFACE); + + // Create enums + functionTypeEEnum = createEEnum(FUNCTION_TYPE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + functionEClass.getESuperTypes().add(this.getFunctionalElement()); + functionalInputEClass.getESuperTypes().add(this.getFunctionalData()); + functionalOutputEClass.getESuperTypes().add(this.getFunctionalData()); + + // Initialize classes, features, and operations; add parameters + initEClass(functionalElementEClass, FunctionalElement.class, "FunctionalElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalElement_Interface(), this.getFunctionalInterface(), this.getFunctionalInterface_Element(), "interface", null, 0, 1, FunctionalElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFunctionalElement_Model(), this.getFunctionalArchitectureModel(), null, "model", null, 1, 1, FunctionalElement.class, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + initEReference(getFunctionalElement_Parent(), this.getFunction(), this.getFunction_SubElements(), "parent", null, 0, 1, FunctionalElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionalArchitectureModelEClass, FunctionalArchitectureModel.class, "FunctionalArchitectureModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalArchitectureModel_RootElements(), this.getFunctionalElement(), null, "rootElements", null, 0, -1, FunctionalArchitectureModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionEClass, Function.class, "Function", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunction_SubElements(), this.getFunctionalElement(), this.getFunctionalElement_Parent(), "subElements", null, 0, -1, Function.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getFunction_Type(), this.getFunctionType(), "type", null, 1, 1, Function.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + + initEClass(famTerminatorEClass, FAMTerminator.class, "FAMTerminator", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFAMTerminator_Data(), this.getFunctionalData(), this.getFunctionalData_Terminator(), "data", null, 0, 1, FAMTerminator.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(informationLinkEClass, InformationLink.class, "InformationLink", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getInformationLink_From(), this.getFunctionalOutput(), this.getFunctionalOutput_OutgoingLinks(), "from", null, 0, 1, InformationLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getInformationLink_To(), this.getFunctionalInput(), this.getFunctionalInput_IncomingLinks(), "to", null, 1, 1, InformationLink.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionalInterfaceEClass, FunctionalInterface.class, "FunctionalInterface", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalInterface_Data(), this.getFunctionalData(), this.getFunctionalData_Interface(), "data", null, 0, -1, FunctionalInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFunctionalInterface_Element(), this.getFunctionalElement(), this.getFunctionalElement_Interface(), "element", null, 0, 1, FunctionalInterface.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionalInputEClass, FunctionalInput.class, "FunctionalInput", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalInput_IncomingLinks(), this.getInformationLink(), this.getInformationLink_To(), "IncomingLinks", null, 0, -1, FunctionalInput.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionalOutputEClass, FunctionalOutput.class, "FunctionalOutput", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalOutput_OutgoingLinks(), this.getInformationLink(), this.getInformationLink_From(), "outgoingLinks", null, 0, -1, FunctionalOutput.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(functionalDataEClass, FunctionalData.class, "FunctionalData", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalData_Terminator(), this.getFAMTerminator(), this.getFAMTerminator_Data(), "terminator", null, 0, 1, FunctionalData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFunctionalData_Interface(), this.getFunctionalInterface(), this.getFunctionalInterface_Data(), "interface", null, 0, 1, FunctionalData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Initialize enums and add enum literals + initEEnum(functionTypeEEnum, FunctionType.class, "FunctionType"); + addEEnumLiteral(functionTypeEEnum, FunctionType.ROOT); + addEEnumLiteral(functionTypeEEnum, FunctionType.INTERMEDIATE); + addEEnumLiteral(functionTypeEEnum, FunctionType.LEAF); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2002/Ecore + createEcoreAnnotations(); + // org.eclipse.viatra.query.querybasedfeature + createOrgAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2002/Ecore. + * + * + * @generated + */ + protected void createEcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2002/Ecore"; + addAnnotation + (this, + source, + new String[] { + "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" + }); + } + + /** + * Initializes the annotations for org.eclipse.viatra.query.querybasedfeature. + * + * + * @generated + */ + protected void createOrgAnnotations() { + String source = "org.eclipse.viatra.query.querybasedfeature"; + addAnnotation + (getFunctionalElement_Model(), + source, + new String[] { + "patternFQN", "ca.mcgill.ecse.dslreasoner.standalone.test.xyz.model" + }); + addAnnotation + (getFunction_Type(), + source, + new String[] { + "patternFQN", "ca.mcgill.ecse.dslreasoner.standalone.test.xyz.type" + }); + } + +} //famPackageImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql new file mode 100644 index 00000000..02d34dcd --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/queries/famPatterns.vql @@ -0,0 +1,103 @@ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries + +import "FamMetamodel" + +@Constraint(message="terminatorAndInformation", severity="error", key={T}) +pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { + FunctionalOutput.outgoingLinks(Out,I); + FunctionalOutput.terminator(Out,T); +} or { + InformationLink.to(I,In); + FunctionalInput.terminator(In,T); +} + +@QueryBasedFeature +pattern type(This : Function, Target : FunctionType) = { + find rootElements(_Model, This); + Target == FunctionType::Root; +} or { + neg find parent(_Child, This); + neg find rootElements(_Model, This); + Target == FunctionType::Leaf; +} or { + find parent(This, _Par); + find parent(_Child, This); + Target == FunctionType::Intermediate; +} + +pattern rootElements(Model: FunctionalArchitectureModel, Root : Function) = { + FunctionalArchitectureModel.rootElements(Model, Root); +} + +pattern parent(Func : Function, Par : Function) = { + Function.parent(Func, Par); +} + +@QueryBasedFeature +pattern model(This:FunctionalElement, Target: FunctionalArchitectureModel) { + FunctionalElement(This); + FunctionalArchitectureModel(Target); +} + +/* +@Constraint(message="noRoot", severity="error", key={fam}) +pattern noRoot(fam: FunctionalArchitectureModel) { + FunctionalArchitectureModel(fam); + neg find hasRoot(_); +} +@Constraint(message="noIntermediate", severity="error", key={fam}) +pattern noInt(fam: FunctionalArchitectureModel) { + FunctionalArchitectureModel(fam); + neg find hasInt(_); +} +@Constraint(message="noLeaf", severity="error", key={fam}) +pattern noLeaf(fam: FunctionalArchitectureModel) { + FunctionalArchitectureModel(fam); + neg find hasLeaf(_); +} +*/ + +/* +@QueryBasedFeature +pattern model(This : FunctionalElement, Target : FunctionalArchitectureModel) = { + find parent+(This, Parent); + find rootElements(Target, Parent); +} or { + find rootElements(Target, This); +} + +pattern interfaceData(FI : FunctionalInterface, FD : FunctionalData) = { + FunctionalInterface.data(FI, FD); +} + +@QueryBasedFeature +pattern inputs(This : FunctionalInterface, Target : FunctionalInput) = { + find interfaceData(This, Target); +} + +@QueryBasedFeature +pattern outputs(This : FunctionalInterface, Target : FunctionalOutput) = { + find interfaceData(This, Target); +} + +@QueryBasedFeature +pattern outgoingLinks(This : FunctionalElement, Target : InformationLink) = { + FunctionalElement.interface.outputs(This, Output); + InformationLink.from(Target, Output); +} + +@QueryBasedFeature +pattern incomingLinks(This : FunctionalElement, Target : InformationLink) = { + FunctionalElement.interface.inputs(This, Input); + InformationLink.to(Target, Input); +} + +@QueryBasedFeature +pattern connects(This : FunctionalElement, Target : FunctionalElement) = { + FunctionalElement.outgoingLinks(This,Link); + FunctionalElement.incomingLinks(Target,Link); +}*/ + +/*pattern frequency(a: Function, b : EInt) { + Function.minimumFrequency(a,b); +}*/ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/util/famAdapterFactory.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/util/famAdapterFactory.java new file mode 100644 index 00000000..b5a4e37b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/util/famAdapterFactory.java @@ -0,0 +1,271 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.util; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; +import org.eclipse.emf.ecore.EObject; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage + * @generated + */ +public class famAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static famPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public famAdapterFactory() { + if (modelPackage == null) { + modelPackage = famPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected famSwitch modelSwitch = + new famSwitch() { + @Override + public Adapter caseFunctionalElement(FunctionalElement object) { + return createFunctionalElementAdapter(); + } + @Override + public Adapter caseFunctionalArchitectureModel(FunctionalArchitectureModel object) { + return createFunctionalArchitectureModelAdapter(); + } + @Override + public Adapter caseFunction(Function object) { + return createFunctionAdapter(); + } + @Override + public Adapter caseFAMTerminator(FAMTerminator object) { + return createFAMTerminatorAdapter(); + } + @Override + public Adapter caseInformationLink(InformationLink object) { + return createInformationLinkAdapter(); + } + @Override + public Adapter caseFunctionalInterface(FunctionalInterface object) { + return createFunctionalInterfaceAdapter(); + } + @Override + public Adapter caseFunctionalInput(FunctionalInput object) { + return createFunctionalInputAdapter(); + } + @Override + public Adapter caseFunctionalOutput(FunctionalOutput object) { + return createFunctionalOutputAdapter(); + } + @Override + public Adapter caseFunctionalData(FunctionalData object) { + return createFunctionalDataAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement Functional Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement + * @generated + */ + public Adapter createFunctionalElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel Functional Architecture Model}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel + * @generated + */ + public Adapter createFunctionalArchitectureModelAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function Function}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function + * @generated + */ + public Adapter createFunctionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator FAM Terminator}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator + * @generated + */ + public Adapter createFAMTerminatorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink Information Link}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink + * @generated + */ + public Adapter createInformationLinkAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface Functional Interface}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface + * @generated + */ + public Adapter createFunctionalInterfaceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput Functional Input}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput + * @generated + */ + public Adapter createFunctionalInputAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput Functional Output}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput + * @generated + */ + public Adapter createFunctionalOutputAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData Functional Data}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData + * @generated + */ + public Adapter createFunctionalDataAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //famAdapterFactory diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/util/famSwitch.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/util/famSwitch.java new file mode 100644 index 00000000..979bd3e9 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/fam/util/famSwitch.java @@ -0,0 +1,289 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.fam.util; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.util.Switch; + +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FAMTerminator; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.Function; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalArchitectureModel; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalData; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalElement; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalInterface; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.FunctionalOutput; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.InformationLink; +import ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.fam.famPackage + * @generated + */ +public class famSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static famPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public famSwitch() { + if (modelPackage == null) { + modelPackage = famPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case famPackage.FUNCTIONAL_ELEMENT: { + FunctionalElement functionalElement = (FunctionalElement)theEObject; + T result = caseFunctionalElement(functionalElement); + if (result == null) result = defaultCase(theEObject); + return result; + } + case famPackage.FUNCTIONAL_ARCHITECTURE_MODEL: { + FunctionalArchitectureModel functionalArchitectureModel = (FunctionalArchitectureModel)theEObject; + T result = caseFunctionalArchitectureModel(functionalArchitectureModel); + if (result == null) result = defaultCase(theEObject); + return result; + } + case famPackage.FUNCTION: { + Function function = (Function)theEObject; + T result = caseFunction(function); + if (result == null) result = caseFunctionalElement(function); + if (result == null) result = defaultCase(theEObject); + return result; + } + case famPackage.FAM_TERMINATOR: { + FAMTerminator famTerminator = (FAMTerminator)theEObject; + T result = caseFAMTerminator(famTerminator); + if (result == null) result = defaultCase(theEObject); + return result; + } + case famPackage.INFORMATION_LINK: { + InformationLink informationLink = (InformationLink)theEObject; + T result = caseInformationLink(informationLink); + if (result == null) result = defaultCase(theEObject); + return result; + } + case famPackage.FUNCTIONAL_INTERFACE: { + FunctionalInterface functionalInterface = (FunctionalInterface)theEObject; + T result = caseFunctionalInterface(functionalInterface); + if (result == null) result = defaultCase(theEObject); + return result; + } + case famPackage.FUNCTIONAL_INPUT: { + FunctionalInput functionalInput = (FunctionalInput)theEObject; + T result = caseFunctionalInput(functionalInput); + if (result == null) result = caseFunctionalData(functionalInput); + if (result == null) result = defaultCase(theEObject); + return result; + } + case famPackage.FUNCTIONAL_OUTPUT: { + FunctionalOutput functionalOutput = (FunctionalOutput)theEObject; + T result = caseFunctionalOutput(functionalOutput); + if (result == null) result = caseFunctionalData(functionalOutput); + if (result == null) result = defaultCase(theEObject); + return result; + } + case famPackage.FUNCTIONAL_DATA: { + FunctionalData functionalData = (FunctionalData)theEObject; + T result = caseFunctionalData(functionalData); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalElement(FunctionalElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Architecture Model'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Architecture Model'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalArchitectureModel(FunctionalArchitectureModel object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Function'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Function'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunction(Function object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'FAM Terminator'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'FAM Terminator'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFAMTerminator(FAMTerminator object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Information Link'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Information Link'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseInformationLink(InformationLink object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Interface'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Interface'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalInterface(FunctionalInterface object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Input'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Input'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalInput(FunctionalInput object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Output'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Output'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalOutput(FunctionalOutput object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Functional Data'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Functional Data'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFunctionalData(FunctionalData object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //famSwitch diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Dir.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Dir.java new file mode 100644 index 00000000..03290097 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Dir.java @@ -0,0 +1,42 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem; + +import org.eclipse.emf.common.util.EList; + +/** + * + * A representation of the model object 'Dir'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir#getContents Contents}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getDir() + * @model + * @generated + */ +public interface Dir extends FSObject { + /** + * Returns the value of the 'Contents' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject}. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject#getParent Parent}'. + * + *

+ * If the meaning of the 'Contents' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Contents' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getDir_Contents() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject#getParent + * @model opposite="parent" containment="true" + * @generated + */ + EList getContents(); + +} // Dir diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FSObject.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FSObject.java new file mode 100644 index 00000000..87e4e4df --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FSObject.java @@ -0,0 +1,52 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'FS Object'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject#getParent Parent}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getFSObject() + * @model abstract="true" + * @generated + */ +public interface FSObject extends EObject { + /** + * Returns the value of the 'Parent' container reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir#getContents Contents}'. + * + *

+ * If the meaning of the 'Parent' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Parent' container reference. + * @see #setParent(Dir) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getFSObject_Parent() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir#getContents + * @model opposite="contents" transient="false" + * @generated + */ + Dir getParent(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject#getParent Parent}' container reference. + * + * + * @param value the new value of the 'Parent' container reference. + * @see #getParent() + * @generated + */ + void setParent(Dir value); + +} // FSObject diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/File.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/File.java new file mode 100644 index 00000000..f829076c --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/File.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem; + + +/** + * + * A representation of the model object 'File'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getFile() + * @model + * @generated + */ +public interface File extends FSObject { +} // File diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FileSystem.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FileSystem.java new file mode 100644 index 00000000..c1c75043 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/FileSystem.java @@ -0,0 +1,70 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'File System'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem#getRoot Root}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem#getLive Live}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getFileSystem() + * @model + * @generated + */ +public interface FileSystem extends EObject { + /** + * Returns the value of the 'Root' containment reference. + * + *

+ * If the meaning of the 'Root' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Root' containment reference. + * @see #setRoot(Dir) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getFileSystem_Root() + * @model containment="true" required="true" + * @generated + */ + Dir getRoot(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem#getRoot Root}' containment reference. + * + * + * @param value the new value of the 'Root' containment reference. + * @see #getRoot() + * @generated + */ + void setRoot(Dir value); + + /** + * Returns the value of the 'Live' reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject}. + * + *

+ * If the meaning of the 'Live' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Live' reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getFileSystem_Live() + * @model transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live'" + * @generated + */ + EList getLive(); + +} // FileSystem diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Model.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Model.java new file mode 100644 index 00000000..e75bd41a --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/Model.java @@ -0,0 +1,69 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Model'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model#getFilesystems Filesystems}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model#getOtherFSObjects Other FS Objects}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getModel() + * @model + * @generated + */ +public interface Model extends EObject { + /** + * Returns the value of the 'Filesystems' containment reference. + * + *

+ * If the meaning of the 'Filesystems' containment reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Filesystems' containment reference. + * @see #setFilesystems(FileSystem) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getModel_Filesystems() + * @model containment="true" required="true" + * @generated + */ + FileSystem getFilesystems(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model#getFilesystems Filesystems}' containment reference. + * + * + * @param value the new value of the 'Filesystems' containment reference. + * @see #getFilesystems() + * @generated + */ + void setFilesystems(FileSystem value); + + /** + * Returns the value of the 'Other FS Objects' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject}. + * + *

+ * If the meaning of the 'Other FS Objects' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Other FS Objects' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#getModel_OtherFSObjects() + * @model containment="true" + * @generated + */ + EList getOtherFSObjects(); + +} // Model diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemFactory.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemFactory.java new file mode 100644 index 00000000..401becfb --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemFactory.java @@ -0,0 +1,69 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage + * @generated + */ +public interface filesystemFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + filesystemFactory eINSTANCE = ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemFactoryImpl.init(); + + /** + * Returns a new object of class 'File System'. + * + * + * @return a new object of class 'File System'. + * @generated + */ + FileSystem createFileSystem(); + + /** + * Returns a new object of class 'Dir'. + * + * + * @return a new object of class 'Dir'. + * @generated + */ + Dir createDir(); + + /** + * Returns a new object of class 'File'. + * + * + * @return a new object of class 'File'. + * @generated + */ + File createFile(); + + /** + * Returns a new object of class 'Model'. + * + * + * @return a new object of class 'Model'. + * @generated + */ + Model createModel(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + filesystemPackage getfilesystemPackage(); + +} //filesystemFactory diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemPackage.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemPackage.java new file mode 100644 index 00000000..08133f96 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/filesystemPackage.java @@ -0,0 +1,511 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemFactory + * @model kind="package" + * annotation="http://www.eclipse.org/emf/2002/Ecore settingDelegates='org.eclipse.viatra.query.querybasedfeature'" + * @generated + */ +public interface filesystemPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "filesystem"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "FileSystemMetamodel"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "filesystem"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + filesystemPackage eINSTANCE = ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl.init(); + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl File System}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getFileSystem() + * @generated + */ + int FILE_SYSTEM = 0; + + /** + * The feature id for the 'Root' containment reference. + * + * + * @generated + * @ordered + */ + int FILE_SYSTEM__ROOT = 0; + + /** + * The feature id for the 'Live' reference list. + * + * + * @generated + * @ordered + */ + int FILE_SYSTEM__LIVE = 1; + + /** + * The number of structural features of the 'File System' class. + * + * + * @generated + * @ordered + */ + int FILE_SYSTEM_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'File System' class. + * + * + * @generated + * @ordered + */ + int FILE_SYSTEM_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl FS Object}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getFSObject() + * @generated + */ + int FS_OBJECT = 1; + + /** + * The feature id for the 'Parent' container reference. + * + * + * @generated + * @ordered + */ + int FS_OBJECT__PARENT = 0; + + /** + * The number of structural features of the 'FS Object' class. + * + * + * @generated + * @ordered + */ + int FS_OBJECT_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'FS Object' class. + * + * + * @generated + * @ordered + */ + int FS_OBJECT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl Dir}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getDir() + * @generated + */ + int DIR = 2; + + /** + * The feature id for the 'Parent' container reference. + * + * + * @generated + * @ordered + */ + int DIR__PARENT = FS_OBJECT__PARENT; + + /** + * The feature id for the 'Contents' containment reference list. + * + * + * @generated + * @ordered + */ + int DIR__CONTENTS = FS_OBJECT_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'Dir' class. + * + * + * @generated + * @ordered + */ + int DIR_FEATURE_COUNT = FS_OBJECT_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'Dir' class. + * + * + * @generated + * @ordered + */ + int DIR_OPERATION_COUNT = FS_OBJECT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileImpl File}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getFile() + * @generated + */ + int FILE = 3; + + /** + * The feature id for the 'Parent' container reference. + * + * + * @generated + * @ordered + */ + int FILE__PARENT = FS_OBJECT__PARENT; + + /** + * The number of structural features of the 'File' class. + * + * + * @generated + * @ordered + */ + int FILE_FEATURE_COUNT = FS_OBJECT_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'File' class. + * + * + * @generated + * @ordered + */ + int FILE_OPERATION_COUNT = FS_OBJECT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl Model}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getModel() + * @generated + */ + int MODEL = 4; + + /** + * The feature id for the 'Filesystems' containment reference. + * + * + * @generated + * @ordered + */ + int MODEL__FILESYSTEMS = 0; + + /** + * The feature id for the 'Other FS Objects' containment reference list. + * + * + * @generated + * @ordered + */ + int MODEL__OTHER_FS_OBJECTS = 1; + + /** + * The number of structural features of the 'Model' class. + * + * + * @generated + * @ordered + */ + int MODEL_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Model' class. + * + * + * @generated + * @ordered + */ + int MODEL_OPERATION_COUNT = 0; + + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem File System}'. + * + * + * @return the meta object for class 'File System'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem + * @generated + */ + EClass getFileSystem(); + + /** + * Returns the meta object for the containment reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem#getRoot Root}'. + * + * + * @return the meta object for the containment reference 'Root'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem#getRoot() + * @see #getFileSystem() + * @generated + */ + EReference getFileSystem_Root(); + + /** + * Returns the meta object for the reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem#getLive Live}'. + * + * + * @return the meta object for the reference list 'Live'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem#getLive() + * @see #getFileSystem() + * @generated + */ + EReference getFileSystem_Live(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject FS Object}'. + * + * + * @return the meta object for class 'FS Object'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject + * @generated + */ + EClass getFSObject(); + + /** + * Returns the meta object for the container reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject#getParent Parent}'. + * + * + * @return the meta object for the container reference 'Parent'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject#getParent() + * @see #getFSObject() + * @generated + */ + EReference getFSObject_Parent(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir Dir}'. + * + * + * @return the meta object for class 'Dir'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir + * @generated + */ + EClass getDir(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir#getContents Contents}'. + * + * + * @return the meta object for the containment reference list 'Contents'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir#getContents() + * @see #getDir() + * @generated + */ + EReference getDir_Contents(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File File}'. + * + * + * @return the meta object for class 'File'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File + * @generated + */ + EClass getFile(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model Model}'. + * + * + * @return the meta object for class 'Model'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model + * @generated + */ + EClass getModel(); + + /** + * Returns the meta object for the containment reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model#getFilesystems Filesystems}'. + * + * + * @return the meta object for the containment reference 'Filesystems'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model#getFilesystems() + * @see #getModel() + * @generated + */ + EReference getModel_Filesystems(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model#getOtherFSObjects Other FS Objects}'. + * + * + * @return the meta object for the containment reference list 'Other FS Objects'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model#getOtherFSObjects() + * @see #getModel() + * @generated + */ + EReference getModel_OtherFSObjects(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + filesystemFactory getfilesystemFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl File System}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getFileSystem() + * @generated + */ + EClass FILE_SYSTEM = eINSTANCE.getFileSystem(); + + /** + * The meta object literal for the 'Root' containment reference feature. + * + * + * @generated + */ + EReference FILE_SYSTEM__ROOT = eINSTANCE.getFileSystem_Root(); + + /** + * The meta object literal for the 'Live' reference list feature. + * + * + * @generated + */ + EReference FILE_SYSTEM__LIVE = eINSTANCE.getFileSystem_Live(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl FS Object}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getFSObject() + * @generated + */ + EClass FS_OBJECT = eINSTANCE.getFSObject(); + + /** + * The meta object literal for the 'Parent' container reference feature. + * + * + * @generated + */ + EReference FS_OBJECT__PARENT = eINSTANCE.getFSObject_Parent(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl Dir}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getDir() + * @generated + */ + EClass DIR = eINSTANCE.getDir(); + + /** + * The meta object literal for the 'Contents' containment reference list feature. + * + * + * @generated + */ + EReference DIR__CONTENTS = eINSTANCE.getDir_Contents(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileImpl File}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getFile() + * @generated + */ + EClass FILE = eINSTANCE.getFile(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl Model}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.filesystemPackageImpl#getModel() + * @generated + */ + EClass MODEL = eINSTANCE.getModel(); + + /** + * The meta object literal for the 'Filesystems' containment reference feature. + * + * + * @generated + */ + EReference MODEL__FILESYSTEMS = eINSTANCE.getModel_Filesystems(); + + /** + * The meta object literal for the 'Other FS Objects' containment reference list feature. + * + * + * @generated + */ + EReference MODEL__OTHER_FS_OBJECTS = eINSTANCE.getModel_OtherFSObjects(); + + } + +} //filesystemPackage diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java new file mode 100644 index 00000000..2e2fbcba --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/DirImpl.java @@ -0,0 +1,165 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Dir'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.DirImpl#getContents Contents}
  • + *
+ * + * @generated + */ +public class DirImpl extends FSObjectImpl implements Dir { + /** + * The cached value of the '{@link #getContents() Contents}' containment reference list. + * + * + * @see #getContents() + * @generated + * @ordered + */ + protected EList contents; + + /** + * + * + * @generated + */ + protected DirImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return filesystemPackage.Literals.DIR; + } + + /** + * + * + * @generated + */ + public EList getContents() { + if (contents == null) { + contents = new EObjectContainmentWithInverseEList(FSObject.class, this, filesystemPackage.DIR__CONTENTS, filesystemPackage.FS_OBJECT__PARENT); + } + return contents; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case filesystemPackage.DIR__CONTENTS: + return ((InternalEList)(InternalEList)getContents()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case filesystemPackage.DIR__CONTENTS: + return ((InternalEList)getContents()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case filesystemPackage.DIR__CONTENTS: + return getContents(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case filesystemPackage.DIR__CONTENTS: + getContents().clear(); + getContents().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case filesystemPackage.DIR__CONTENTS: + getContents().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case filesystemPackage.DIR__CONTENTS: + return contents != null && !contents.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //DirImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java new file mode 100644 index 00000000..25ea1fbb --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FSObjectImpl.java @@ -0,0 +1,196 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'FS Object'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FSObjectImpl#getParent Parent}
  • + *
+ * + * @generated + */ +public abstract class FSObjectImpl extends MinimalEObjectImpl.Container implements FSObject { + /** + * + * + * @generated + */ + protected FSObjectImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return filesystemPackage.Literals.FS_OBJECT; + } + + /** + * + * + * @generated + */ + public Dir getParent() { + if (eContainerFeatureID() != filesystemPackage.FS_OBJECT__PARENT) return null; + return (Dir)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetParent(Dir newParent, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newParent, filesystemPackage.FS_OBJECT__PARENT, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setParent(Dir newParent) { + if (newParent != eInternalContainer() || (eContainerFeatureID() != filesystemPackage.FS_OBJECT__PARENT && newParent != null)) { + if (EcoreUtil.isAncestor(this, newParent)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newParent != null) + msgs = ((InternalEObject)newParent).eInverseAdd(this, filesystemPackage.DIR__CONTENTS, Dir.class, msgs); + msgs = basicSetParent(newParent, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.FS_OBJECT__PARENT, newParent, newParent)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case filesystemPackage.FS_OBJECT__PARENT: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetParent((Dir)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case filesystemPackage.FS_OBJECT__PARENT: + return basicSetParent(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case filesystemPackage.FS_OBJECT__PARENT: + return eInternalContainer().eInverseRemove(this, filesystemPackage.DIR__CONTENTS, Dir.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case filesystemPackage.FS_OBJECT__PARENT: + return getParent(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case filesystemPackage.FS_OBJECT__PARENT: + setParent((Dir)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case filesystemPackage.FS_OBJECT__PARENT: + setParent((Dir)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case filesystemPackage.FS_OBJECT__PARENT: + return getParent() != null; + } + return super.eIsSet(featureID); + } + +} //FSObjectImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java new file mode 100644 index 00000000..29eb47fd --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'File'. + * + * + * @generated + */ +public class FileImpl extends FSObjectImpl implements File { + /** + * + * + * @generated + */ + protected FileImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return filesystemPackage.Literals.FILE; + } + +} //FileImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java new file mode 100644 index 00000000..8bbc6a74 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/FileSystemImpl.java @@ -0,0 +1,205 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * + * An implementation of the model object 'File System'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl#getRoot Root}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.FileSystemImpl#getLive Live}
  • + *
+ * + * @generated + */ +public class FileSystemImpl extends MinimalEObjectImpl.Container implements FileSystem { + /** + * The cached value of the '{@link #getRoot() Root}' containment reference. + * + * + * @see #getRoot() + * @generated + * @ordered + */ + protected Dir root; + + /** + * The cached setting delegate for the '{@link #getLive() Live}' reference list. + * + * + * @see #getLive() + * @generated + * @ordered + */ + protected EStructuralFeature.Internal.SettingDelegate LIVE__ESETTING_DELEGATE = ((EStructuralFeature.Internal)filesystemPackage.Literals.FILE_SYSTEM__LIVE).getSettingDelegate(); + + /** + * + * + * @generated + */ + protected FileSystemImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return filesystemPackage.Literals.FILE_SYSTEM; + } + + /** + * + * + * @generated + */ + public Dir getRoot() { + return root; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetRoot(Dir newRoot, NotificationChain msgs) { + Dir oldRoot = root; + root = newRoot; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, filesystemPackage.FILE_SYSTEM__ROOT, oldRoot, newRoot); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setRoot(Dir newRoot) { + if (newRoot != root) { + NotificationChain msgs = null; + if (root != null) + msgs = ((InternalEObject)root).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.FILE_SYSTEM__ROOT, null, msgs); + if (newRoot != null) + msgs = ((InternalEObject)newRoot).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.FILE_SYSTEM__ROOT, null, msgs); + msgs = basicSetRoot(newRoot, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.FILE_SYSTEM__ROOT, newRoot, newRoot)); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + public EList getLive() { + return (EList)LIVE__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case filesystemPackage.FILE_SYSTEM__ROOT: + return basicSetRoot(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case filesystemPackage.FILE_SYSTEM__ROOT: + return getRoot(); + case filesystemPackage.FILE_SYSTEM__LIVE: + return getLive(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case filesystemPackage.FILE_SYSTEM__ROOT: + setRoot((Dir)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case filesystemPackage.FILE_SYSTEM__ROOT: + setRoot((Dir)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case filesystemPackage.FILE_SYSTEM__ROOT: + return root != null; + case filesystemPackage.FILE_SYSTEM__LIVE: + return LIVE__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); + } + return super.eIsSet(featureID); + } + +} //FileSystemImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java new file mode 100644 index 00000000..a21f5b6e --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/ModelImpl.java @@ -0,0 +1,221 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Model'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl#getFilesystems Filesystems}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl.ModelImpl#getOtherFSObjects Other FS Objects}
  • + *
+ * + * @generated + */ +public class ModelImpl extends MinimalEObjectImpl.Container implements Model { + /** + * The cached value of the '{@link #getFilesystems() Filesystems}' containment reference. + * + * + * @see #getFilesystems() + * @generated + * @ordered + */ + protected FileSystem filesystems; + + /** + * The cached value of the '{@link #getOtherFSObjects() Other FS Objects}' containment reference list. + * + * + * @see #getOtherFSObjects() + * @generated + * @ordered + */ + protected EList otherFSObjects; + + /** + * + * + * @generated + */ + protected ModelImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return filesystemPackage.Literals.MODEL; + } + + /** + * + * + * @generated + */ + public FileSystem getFilesystems() { + return filesystems; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetFilesystems(FileSystem newFilesystems, NotificationChain msgs) { + FileSystem oldFilesystems = filesystems; + filesystems = newFilesystems; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, filesystemPackage.MODEL__FILESYSTEMS, oldFilesystems, newFilesystems); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setFilesystems(FileSystem newFilesystems) { + if (newFilesystems != filesystems) { + NotificationChain msgs = null; + if (filesystems != null) + msgs = ((InternalEObject)filesystems).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.MODEL__FILESYSTEMS, null, msgs); + if (newFilesystems != null) + msgs = ((InternalEObject)newFilesystems).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - filesystemPackage.MODEL__FILESYSTEMS, null, msgs); + msgs = basicSetFilesystems(newFilesystems, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, filesystemPackage.MODEL__FILESYSTEMS, newFilesystems, newFilesystems)); + } + + /** + * + * + * @generated + */ + public EList getOtherFSObjects() { + if (otherFSObjects == null) { + otherFSObjects = new EObjectContainmentEList(FSObject.class, this, filesystemPackage.MODEL__OTHER_FS_OBJECTS); + } + return otherFSObjects; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case filesystemPackage.MODEL__FILESYSTEMS: + return basicSetFilesystems(null, msgs); + case filesystemPackage.MODEL__OTHER_FS_OBJECTS: + return ((InternalEList)getOtherFSObjects()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case filesystemPackage.MODEL__FILESYSTEMS: + return getFilesystems(); + case filesystemPackage.MODEL__OTHER_FS_OBJECTS: + return getOtherFSObjects(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case filesystemPackage.MODEL__FILESYSTEMS: + setFilesystems((FileSystem)newValue); + return; + case filesystemPackage.MODEL__OTHER_FS_OBJECTS: + getOtherFSObjects().clear(); + getOtherFSObjects().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case filesystemPackage.MODEL__FILESYSTEMS: + setFilesystems((FileSystem)null); + return; + case filesystemPackage.MODEL__OTHER_FS_OBJECTS: + getOtherFSObjects().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case filesystemPackage.MODEL__FILESYSTEMS: + return filesystems != null; + case filesystemPackage.MODEL__OTHER_FS_OBJECTS: + return otherFSObjects != null && !otherFSObjects.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //ModelImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java new file mode 100644 index 00000000..a3526e36 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemFactoryImpl.java @@ -0,0 +1,128 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class filesystemFactoryImpl extends EFactoryImpl implements filesystemFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static filesystemFactory init() { + try { + filesystemFactory thefilesystemFactory = (filesystemFactory)EPackage.Registry.INSTANCE.getEFactory(filesystemPackage.eNS_URI); + if (thefilesystemFactory != null) { + return thefilesystemFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new filesystemFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public filesystemFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case filesystemPackage.FILE_SYSTEM: return createFileSystem(); + case filesystemPackage.DIR: return createDir(); + case filesystemPackage.FILE: return createFile(); + case filesystemPackage.MODEL: return createModel(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public FileSystem createFileSystem() { + FileSystemImpl fileSystem = new FileSystemImpl(); + return fileSystem; + } + + /** + * + * + * @generated + */ + public Dir createDir() { + DirImpl dir = new DirImpl(); + return dir; + } + + /** + * + * + * @generated + */ + public File createFile() { + FileImpl file = new FileImpl(); + return file; + } + + /** + * + * + * @generated + */ + public Model createModel() { + ModelImpl model = new ModelImpl(); + return model; + } + + /** + * + * + * @generated + */ + public filesystemPackage getfilesystemPackage() { + return (filesystemPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static filesystemPackage getPackage() { + return filesystemPackage.eINSTANCE; + } + +} //filesystemFactoryImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java new file mode 100644 index 00000000..5c6dd21e --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/impl/filesystemPackageImpl.java @@ -0,0 +1,356 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemFactory; +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class filesystemPackageImpl extends EPackageImpl implements filesystemPackage { + /** + * + * + * @generated + */ + private EClass fileSystemEClass = null; + + /** + * + * + * @generated + */ + private EClass fsObjectEClass = null; + + /** + * + * + * @generated + */ + private EClass dirEClass = null; + + /** + * + * + * @generated + */ + private EClass fileEClass = null; + + /** + * + * + * @generated + */ + private EClass modelEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage#eNS_URI + * @see #init() + * @generated + */ + private filesystemPackageImpl() { + super(eNS_URI, filesystemFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link filesystemPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static filesystemPackage init() { + if (isInited) return (filesystemPackage)EPackage.Registry.INSTANCE.getEPackage(filesystemPackage.eNS_URI); + + // Obtain or create and register package + filesystemPackageImpl thefilesystemPackage = (filesystemPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof filesystemPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new filesystemPackageImpl()); + + isInited = true; + + // Create package meta-data objects + thefilesystemPackage.createPackageContents(); + + // Initialize created meta-data + thefilesystemPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + thefilesystemPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(filesystemPackage.eNS_URI, thefilesystemPackage); + return thefilesystemPackage; + } + + /** + * + * + * @generated + */ + public EClass getFileSystem() { + return fileSystemEClass; + } + + /** + * + * + * @generated + */ + public EReference getFileSystem_Root() { + return (EReference)fileSystemEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getFileSystem_Live() { + return (EReference)fileSystemEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getFSObject() { + return fsObjectEClass; + } + + /** + * + * + * @generated + */ + public EReference getFSObject_Parent() { + return (EReference)fsObjectEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getDir() { + return dirEClass; + } + + /** + * + * + * @generated + */ + public EReference getDir_Contents() { + return (EReference)dirEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getFile() { + return fileEClass; + } + + /** + * + * + * @generated + */ + public EClass getModel() { + return modelEClass; + } + + /** + * + * + * @generated + */ + public EReference getModel_Filesystems() { + return (EReference)modelEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getModel_OtherFSObjects() { + return (EReference)modelEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public filesystemFactory getfilesystemFactory() { + return (filesystemFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + fileSystemEClass = createEClass(FILE_SYSTEM); + createEReference(fileSystemEClass, FILE_SYSTEM__ROOT); + createEReference(fileSystemEClass, FILE_SYSTEM__LIVE); + + fsObjectEClass = createEClass(FS_OBJECT); + createEReference(fsObjectEClass, FS_OBJECT__PARENT); + + dirEClass = createEClass(DIR); + createEReference(dirEClass, DIR__CONTENTS); + + fileEClass = createEClass(FILE); + + modelEClass = createEClass(MODEL); + createEReference(modelEClass, MODEL__FILESYSTEMS); + createEReference(modelEClass, MODEL__OTHER_FS_OBJECTS); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + dirEClass.getESuperTypes().add(this.getFSObject()); + fileEClass.getESuperTypes().add(this.getFSObject()); + + // Initialize classes, features, and operations; add parameters + initEClass(fileSystemEClass, FileSystem.class, "FileSystem", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFileSystem_Root(), this.getDir(), null, "root", null, 1, 1, FileSystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getFileSystem_Live(), this.getFSObject(), null, "live", null, 0, -1, FileSystem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + + initEClass(fsObjectEClass, FSObject.class, "FSObject", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFSObject_Parent(), this.getDir(), this.getDir_Contents(), "parent", null, 0, 1, FSObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(dirEClass, Dir.class, "Dir", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDir_Contents(), this.getFSObject(), this.getFSObject_Parent(), "contents", null, 0, -1, Dir.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(fileEClass, File.class, "File", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(modelEClass, Model.class, "Model", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getModel_Filesystems(), this.getFileSystem(), null, "filesystems", null, 1, 1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getModel_OtherFSObjects(), this.getFSObject(), null, "otherFSObjects", null, 0, -1, Model.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + // Create resource + createResource(eNS_URI); + + // Create annotations + // http://www.eclipse.org/emf/2002/Ecore + createEcoreAnnotations(); + // org.eclipse.viatra.query.querybasedfeature + createOrgAnnotations(); + } + + /** + * Initializes the annotations for http://www.eclipse.org/emf/2002/Ecore. + * + * + * @generated + */ + protected void createEcoreAnnotations() { + String source = "http://www.eclipse.org/emf/2002/Ecore"; + addAnnotation + (this, + source, + new String[] { + "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" + }); + } + + /** + * Initializes the annotations for org.eclipse.viatra.query.querybasedfeature. + * + * + * @generated + */ + protected void createOrgAnnotations() { + String source = "org.eclipse.viatra.query.querybasedfeature"; + addAnnotation + (getFileSystem_Live(), + source, + new String[] { + "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.alloyexamples.live" + }); + } + +} //filesystemPackageImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql new file mode 100644 index 00000000..269a4242 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/queries/FileSystem.vql @@ -0,0 +1,24 @@ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.queries + +import epackage "FileSystemMetamodel" + +pattern patternContent(o1: FSObject, o2: FSObject) { + Dir.contents(o1,o2); +} + +@QueryBasedFeature +pattern live(this: FileSystem, l: FSObject) { + FileSystem.root(this,l); +} or { + FileSystem.root(this,root); + find patternContent+(root,l); +} + +@Constraint(key={child}, severity="error", message="error") +pattern contentInNotLive(parent : Dir, child: FSObject) { + Dir.contents(parent,child); + neg find live(_,parent); +} or { + Dir.contents(parent,child); + neg find live(_,child); +} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemAdapterFactory.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemAdapterFactory.java new file mode 100644 index 00000000..d9aed046 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemAdapterFactory.java @@ -0,0 +1,192 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.util; + +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage + * @generated + */ +public class filesystemAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static filesystemPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public filesystemAdapterFactory() { + if (modelPackage == null) { + modelPackage = filesystemPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected filesystemSwitch modelSwitch = + new filesystemSwitch() { + @Override + public Adapter caseFileSystem(FileSystem object) { + return createFileSystemAdapter(); + } + @Override + public Adapter caseFSObject(FSObject object) { + return createFSObjectAdapter(); + } + @Override + public Adapter caseDir(Dir object) { + return createDirAdapter(); + } + @Override + public Adapter caseFile(File object) { + return createFileAdapter(); + } + @Override + public Adapter caseModel(Model object) { + return createModelAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem File System}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FileSystem + * @generated + */ + public Adapter createFileSystemAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject FS Object}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.FSObject + * @generated + */ + public Adapter createFSObjectAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir Dir}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Dir + * @generated + */ + public Adapter createDirAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File File}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.File + * @generated + */ + public Adapter createFileAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model Model}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.Model + * @generated + */ + public Adapter createModelAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //filesystemAdapterFactory diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemSwitch.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemSwitch.java new file mode 100644 index 00000000..33f4c7a4 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/filesystem/util/filesystemSwitch.java @@ -0,0 +1,196 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.util; + +import ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.filesystem.filesystemPackage + * @generated + */ +public class filesystemSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static filesystemPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public filesystemSwitch() { + if (modelPackage == null) { + modelPackage = filesystemPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case filesystemPackage.FILE_SYSTEM: { + FileSystem fileSystem = (FileSystem)theEObject; + T result = caseFileSystem(fileSystem); + if (result == null) result = defaultCase(theEObject); + return result; + } + case filesystemPackage.FS_OBJECT: { + FSObject fsObject = (FSObject)theEObject; + T result = caseFSObject(fsObject); + if (result == null) result = defaultCase(theEObject); + return result; + } + case filesystemPackage.DIR: { + Dir dir = (Dir)theEObject; + T result = caseDir(dir); + if (result == null) result = caseFSObject(dir); + if (result == null) result = defaultCase(theEObject); + return result; + } + case filesystemPackage.FILE: { + File file = (File)theEObject; + T result = caseFile(file); + if (result == null) result = caseFSObject(file); + if (result == null) result = defaultCase(theEObject); + return result; + } + case filesystemPackage.MODEL: { + Model model = (Model)theEObject; + T result = caseModel(model); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'File System'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'File System'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFileSystem(FileSystem object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'FS Object'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'FS Object'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFSObject(FSObject object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Dir'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Dir'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDir(Dir object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'File'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'File'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFile(File object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Model'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Model'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseModel(Model object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //filesystemSwitch diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Choice.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Choice.java new file mode 100644 index 00000000..cc4049c4 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Choice.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + + +/** + * + * A representation of the model object 'Choice'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getChoice() + * @model + * @generated + */ +public interface Choice extends Pseudostate { +} // Choice diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/CompositeElement.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/CompositeElement.java new file mode 100644 index 00000000..037b1b3c --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/CompositeElement.java @@ -0,0 +1,42 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Composite Element'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement#getRegions Regions}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getCompositeElement() + * @model abstract="true" + * @generated + */ +public interface CompositeElement extends EObject { + /** + * Returns the value of the 'Regions' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region}. + * + *

+ * If the meaning of the 'Regions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Regions' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getCompositeElement_Regions() + * @model containment="true" + * @generated + */ + EList getRegions(); + +} // CompositeElement diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Entry.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Entry.java new file mode 100644 index 00000000..da40c481 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Entry.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + + +/** + * + * A representation of the model object 'Entry'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getEntry() + * @model + * @generated + */ +public interface Entry extends Pseudostate { +} // Entry diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Exit.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Exit.java new file mode 100644 index 00000000..9f8e12d3 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Exit.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + + +/** + * + * A representation of the model object 'Exit'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getExit() + * @model + * @generated + */ +public interface Exit extends Pseudostate { +} // Exit diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/FinalState.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/FinalState.java new file mode 100644 index 00000000..33703d36 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/FinalState.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + + +/** + * + * A representation of the model object 'Final State'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getFinalState() + * @model + * @generated + */ +public interface FinalState extends RegularState { +} // FinalState diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Pseudostate.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Pseudostate.java new file mode 100644 index 00000000..e6a003f9 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Pseudostate.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + + +/** + * + * A representation of the model object 'Pseudostate'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getPseudostate() + * @model abstract="true" + * @generated + */ +public interface Pseudostate extends Vertex { +} // Pseudostate diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Region.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Region.java new file mode 100644 index 00000000..f4c3f114 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Region.java @@ -0,0 +1,42 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Region'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region#getVertices Vertices}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getRegion() + * @model + * @generated + */ +public interface Region extends EObject { + /** + * Returns the value of the 'Vertices' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex}. + * + *

+ * If the meaning of the 'Vertices' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Vertices' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getRegion_Vertices() + * @model containment="true" ordered="false" + * @generated + */ + EList getVertices(); + +} // Region diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/RegularState.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/RegularState.java new file mode 100644 index 00000000..7db584e5 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/RegularState.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + + +/** + * + * A representation of the model object 'Regular State'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getRegularState() + * @model abstract="true" + * @generated + */ +public interface RegularState extends Vertex { +} // RegularState diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/State.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/State.java new file mode 100644 index 00000000..3c65be40 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/State.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + + +/** + * + * A representation of the model object 'State'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getState() + * @model + * @generated + */ +public interface State extends RegularState, CompositeElement { +} // State diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Statechart.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Statechart.java new file mode 100644 index 00000000..33a1dd7a --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Statechart.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + + +/** + * + * A representation of the model object 'Statechart'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getStatechart() + * @model + * @generated + */ +public interface Statechart extends CompositeElement { +} // Statechart diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Synchronization.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Synchronization.java new file mode 100644 index 00000000..f1294200 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Synchronization.java @@ -0,0 +1,17 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + + +/** + * + * A representation of the model object 'Synchronization'. + * + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getSynchronization() + * @model + * @generated + */ +public interface Synchronization extends Pseudostate { +} // Synchronization diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Transition.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Transition.java new file mode 100644 index 00000000..543cc73b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Transition.java @@ -0,0 +1,81 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Transition'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getTarget Target}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getSource Source}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getTransition() + * @model + * @generated + */ +public interface Transition extends EObject { + /** + * Returns the value of the 'Target' reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex#getIncomingTransitions Incoming Transitions}'. + * + *

+ * If the meaning of the 'Target' reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Target' reference. + * @see #setTarget(Vertex) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getTransition_Target() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex#getIncomingTransitions + * @model opposite="incomingTransitions" required="true" ordered="false" + * @generated + */ + Vertex getTarget(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getTarget Target}' reference. + * + * + * @param value the new value of the 'Target' reference. + * @see #getTarget() + * @generated + */ + void setTarget(Vertex value); + + /** + * Returns the value of the 'Source' container reference. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex#getOutgoingTransitions Outgoing Transitions}'. + * + *

+ * If the meaning of the 'Source' container reference isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Source' container reference. + * @see #setSource(Vertex) + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getTransition_Source() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex#getOutgoingTransitions + * @model opposite="outgoingTransitions" transient="false" ordered="false" + * @generated + */ + Vertex getSource(); + + /** + * Sets the value of the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getSource Source}' container reference. + * + * + * @param value the new value of the 'Source' container reference. + * @see #getSource() + * @generated + */ + void setSource(Vertex value); + +} // Transition diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Vertex.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Vertex.java new file mode 100644 index 00000000..6005a550 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/Vertex.java @@ -0,0 +1,63 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * A representation of the model object 'Vertex'. + * + * + *

+ * The following features are supported: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex#getIncomingTransitions Incoming Transitions}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex#getOutgoingTransitions Outgoing Transitions}
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getVertex() + * @model abstract="true" + * @generated + */ +public interface Vertex extends EObject { + /** + * Returns the value of the 'Incoming Transitions' reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition}. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getTarget Target}'. + * + *

+ * If the meaning of the 'Incoming Transitions' reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Incoming Transitions' reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getVertex_IncomingTransitions() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getTarget + * @model opposite="target" ordered="false" + * @generated + */ + EList getIncomingTransitions(); + + /** + * Returns the value of the 'Outgoing Transitions' containment reference list. + * The list contents are of type {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition}. + * It is bidirectional and its opposite is '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getSource Source}'. + * + *

+ * If the meaning of the 'Outgoing Transitions' containment reference list isn't clear, + * there really should be more of a description here... + *

+ * + * @return the value of the 'Outgoing Transitions' containment reference list. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#getVertex_OutgoingTransitions() + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getSource + * @model opposite="source" containment="true" ordered="false" + * @generated + */ + EList getOutgoingTransitions(); + +} // Vertex diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ChoiceImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ChoiceImpl.java new file mode 100644 index 00000000..8fc4883b --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ChoiceImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Choice'. + * + * + * @generated + */ +public class ChoiceImpl extends PseudostateImpl implements Choice { + /** + * + * + * @generated + */ + protected ChoiceImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.CHOICE; + } + +} //ChoiceImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/CompositeElementImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/CompositeElementImpl.java new file mode 100644 index 00000000..0218f9c7 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/CompositeElementImpl.java @@ -0,0 +1,152 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Composite Element'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.CompositeElementImpl#getRegions Regions}
  • + *
+ * + * @generated + */ +public abstract class CompositeElementImpl extends MinimalEObjectImpl.Container implements CompositeElement { + /** + * The cached value of the '{@link #getRegions() Regions}' containment reference list. + * + * + * @see #getRegions() + * @generated + * @ordered + */ + protected EList regions; + + /** + * + * + * @generated + */ + protected CompositeElementImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.COMPOSITE_ELEMENT; + } + + /** + * + * + * @generated + */ + public EList getRegions() { + if (regions == null) { + regions = new EObjectContainmentEList(Region.class, this, yakinduPackage.COMPOSITE_ELEMENT__REGIONS); + } + return regions; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: + return ((InternalEList)getRegions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: + return getRegions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: + getRegions().clear(); + getRegions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: + getRegions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: + return regions != null && !regions.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //CompositeElementImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/EntryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/EntryImpl.java new file mode 100644 index 00000000..d0334475 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/EntryImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Entry'. + * + * + * @generated + */ +public class EntryImpl extends PseudostateImpl implements Entry { + /** + * + * + * @generated + */ + protected EntryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.ENTRY; + } + +} //EntryImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ExitImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ExitImpl.java new file mode 100644 index 00000000..d1448776 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/ExitImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Exit'. + * + * + * @generated + */ +public class ExitImpl extends PseudostateImpl implements Exit { + /** + * + * + * @generated + */ + protected ExitImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.EXIT; + } + +} //ExitImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/FinalStateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/FinalStateImpl.java new file mode 100644 index 00000000..716c096e --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/FinalStateImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Final State'. + * + * + * @generated + */ +public class FinalStateImpl extends RegularStateImpl implements FinalState { + /** + * + * + * @generated + */ + protected FinalStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.FINAL_STATE; + } + +} //FinalStateImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/PseudostateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/PseudostateImpl.java new file mode 100644 index 00000000..b9fc27f3 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/PseudostateImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Pseudostate; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Pseudostate'. + * + * + * @generated + */ +public abstract class PseudostateImpl extends VertexImpl implements Pseudostate { + /** + * + * + * @generated + */ + protected PseudostateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.PSEUDOSTATE; + } + +} //PseudostateImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegionImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegionImpl.java new file mode 100644 index 00000000..fa873aeb --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegionImpl.java @@ -0,0 +1,152 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Region'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegionImpl#getVertices Vertices}
  • + *
+ * + * @generated + */ +public class RegionImpl extends MinimalEObjectImpl.Container implements Region { + /** + * The cached value of the '{@link #getVertices() Vertices}' containment reference list. + * + * + * @see #getVertices() + * @generated + * @ordered + */ + protected EList vertices; + + /** + * + * + * @generated + */ + protected RegionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.REGION; + } + + /** + * + * + * @generated + */ + public EList getVertices() { + if (vertices == null) { + vertices = new EObjectContainmentEList(Vertex.class, this, yakinduPackage.REGION__VERTICES); + } + return vertices; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case yakinduPackage.REGION__VERTICES: + return ((InternalEList)getVertices()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case yakinduPackage.REGION__VERTICES: + return getVertices(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case yakinduPackage.REGION__VERTICES: + getVertices().clear(); + getVertices().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case yakinduPackage.REGION__VERTICES: + getVertices().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case yakinduPackage.REGION__VERTICES: + return vertices != null && !vertices.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //RegionImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegularStateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegularStateImpl.java new file mode 100644 index 00000000..bbe21a14 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/RegularStateImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.RegularState; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Regular State'. + * + * + * @generated + */ +public abstract class RegularStateImpl extends VertexImpl implements RegularState { + /** + * + * + * @generated + */ + protected RegularStateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.REGULAR_STATE; + } + +} //RegularStateImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java new file mode 100644 index 00000000..66ab2a8f --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StateImpl.java @@ -0,0 +1,183 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.util.EObjectContainmentEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'State'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StateImpl#getRegions Regions}
  • + *
+ * + * @generated + */ +public class StateImpl extends RegularStateImpl implements State { + /** + * The cached value of the '{@link #getRegions() Regions}' containment reference list. + * + * + * @see #getRegions() + * @generated + * @ordered + */ + protected EList regions; + + /** + * + * + * @generated + */ + protected StateImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.STATE; + } + + /** + * + * + * @generated + */ + public EList getRegions() { + if (regions == null) { + regions = new EObjectContainmentEList(Region.class, this, yakinduPackage.STATE__REGIONS); + } + return regions; + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case yakinduPackage.STATE__REGIONS: + return ((InternalEList)getRegions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case yakinduPackage.STATE__REGIONS: + return getRegions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case yakinduPackage.STATE__REGIONS: + getRegions().clear(); + getRegions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case yakinduPackage.STATE__REGIONS: + getRegions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case yakinduPackage.STATE__REGIONS: + return regions != null && !regions.isEmpty(); + } + return super.eIsSet(featureID); + } + + /** + * + * + * @generated + */ + @Override + public int eBaseStructuralFeatureID(int derivedFeatureID, Class baseClass) { + if (baseClass == CompositeElement.class) { + switch (derivedFeatureID) { + case yakinduPackage.STATE__REGIONS: return yakinduPackage.COMPOSITE_ELEMENT__REGIONS; + default: return -1; + } + } + return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass); + } + + /** + * + * + * @generated + */ + @Override + public int eDerivedStructuralFeatureID(int baseFeatureID, Class baseClass) { + if (baseClass == CompositeElement.class) { + switch (baseFeatureID) { + case yakinduPackage.COMPOSITE_ELEMENT__REGIONS: return yakinduPackage.STATE__REGIONS; + default: return -1; + } + } + return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass); + } + +} //StateImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StatechartImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StatechartImpl.java new file mode 100644 index 00000000..056820ca --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/StatechartImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Statechart; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Statechart'. + * + * + * @generated + */ +public class StatechartImpl extends CompositeElementImpl implements Statechart { + /** + * + * + * @generated + */ + protected StatechartImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.STATECHART; + } + +} //StatechartImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/SynchronizationImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/SynchronizationImpl.java new file mode 100644 index 00000000..28ef69ea --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/SynchronizationImpl.java @@ -0,0 +1,37 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import org.eclipse.emf.ecore.EClass; + +/** + * + * An implementation of the model object 'Synchronization'. + * + * + * @generated + */ +public class SynchronizationImpl extends PseudostateImpl implements Synchronization { + /** + * + * + * @generated + */ + protected SynchronizationImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.SYNCHRONIZATION; + } + +} //SynchronizationImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/TransitionImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/TransitionImpl.java new file mode 100644 index 00000000..ea1677ee --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/TransitionImpl.java @@ -0,0 +1,284 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EcoreUtil; + +/** + * + * An implementation of the model object 'Transition'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.TransitionImpl#getTarget Target}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.TransitionImpl#getSource Source}
  • + *
+ * + * @generated + */ +public class TransitionImpl extends MinimalEObjectImpl.Container implements Transition { + /** + * The cached value of the '{@link #getTarget() Target}' reference. + * + * + * @see #getTarget() + * @generated + * @ordered + */ + protected Vertex target; + + /** + * + * + * @generated + */ + protected TransitionImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.TRANSITION; + } + + /** + * + * + * @generated + */ + public Vertex getTarget() { + if (target != null && target.eIsProxy()) { + InternalEObject oldTarget = (InternalEObject)target; + target = (Vertex)eResolveProxy(oldTarget); + if (target != oldTarget) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, yakinduPackage.TRANSITION__TARGET, oldTarget, target)); + } + } + return target; + } + + /** + * + * + * @generated + */ + public Vertex basicGetTarget() { + return target; + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetTarget(Vertex newTarget, NotificationChain msgs) { + Vertex oldTarget = target; + target = newTarget; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, yakinduPackage.TRANSITION__TARGET, oldTarget, newTarget); + if (msgs == null) msgs = notification; else msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + public void setTarget(Vertex newTarget) { + if (newTarget != target) { + NotificationChain msgs = null; + if (target != null) + msgs = ((InternalEObject)target).eInverseRemove(this, yakinduPackage.VERTEX__INCOMING_TRANSITIONS, Vertex.class, msgs); + if (newTarget != null) + msgs = ((InternalEObject)newTarget).eInverseAdd(this, yakinduPackage.VERTEX__INCOMING_TRANSITIONS, Vertex.class, msgs); + msgs = basicSetTarget(newTarget, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, yakinduPackage.TRANSITION__TARGET, newTarget, newTarget)); + } + + /** + * + * + * @generated + */ + public Vertex getSource() { + if (eContainerFeatureID() != yakinduPackage.TRANSITION__SOURCE) return null; + return (Vertex)eInternalContainer(); + } + + /** + * + * + * @generated + */ + public NotificationChain basicSetSource(Vertex newSource, NotificationChain msgs) { + msgs = eBasicSetContainer((InternalEObject)newSource, yakinduPackage.TRANSITION__SOURCE, msgs); + return msgs; + } + + /** + * + * + * @generated + */ + public void setSource(Vertex newSource) { + if (newSource != eInternalContainer() || (eContainerFeatureID() != yakinduPackage.TRANSITION__SOURCE && newSource != null)) { + if (EcoreUtil.isAncestor(this, newSource)) + throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); + NotificationChain msgs = null; + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + if (newSource != null) + msgs = ((InternalEObject)newSource).eInverseAdd(this, yakinduPackage.VERTEX__OUTGOING_TRANSITIONS, Vertex.class, msgs); + msgs = basicSetSource(newSource, msgs); + if (msgs != null) msgs.dispatch(); + } + else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, yakinduPackage.TRANSITION__SOURCE, newSource, newSource)); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case yakinduPackage.TRANSITION__TARGET: + if (target != null) + msgs = ((InternalEObject)target).eInverseRemove(this, yakinduPackage.VERTEX__INCOMING_TRANSITIONS, Vertex.class, msgs); + return basicSetTarget((Vertex)otherEnd, msgs); + case yakinduPackage.TRANSITION__SOURCE: + if (eInternalContainer() != null) + msgs = eBasicRemoveFromContainer(msgs); + return basicSetSource((Vertex)otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case yakinduPackage.TRANSITION__TARGET: + return basicSetTarget(null, msgs); + case yakinduPackage.TRANSITION__SOURCE: + return basicSetSource(null, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { + switch (eContainerFeatureID()) { + case yakinduPackage.TRANSITION__SOURCE: + return eInternalContainer().eInverseRemove(this, yakinduPackage.VERTEX__OUTGOING_TRANSITIONS, Vertex.class, msgs); + } + return super.eBasicRemoveFromContainerFeature(msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case yakinduPackage.TRANSITION__TARGET: + if (resolve) return getTarget(); + return basicGetTarget(); + case yakinduPackage.TRANSITION__SOURCE: + return getSource(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case yakinduPackage.TRANSITION__TARGET: + setTarget((Vertex)newValue); + return; + case yakinduPackage.TRANSITION__SOURCE: + setSource((Vertex)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case yakinduPackage.TRANSITION__TARGET: + setTarget((Vertex)null); + return; + case yakinduPackage.TRANSITION__SOURCE: + setSource((Vertex)null); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case yakinduPackage.TRANSITION__TARGET: + return target != null; + case yakinduPackage.TRANSITION__SOURCE: + return getSource() != null; + } + return super.eIsSet(featureID); + } + +} //TransitionImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/VertexImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/VertexImpl.java new file mode 100644 index 00000000..6f5b9ed3 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/VertexImpl.java @@ -0,0 +1,206 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import java.util.Collection; + +import org.eclipse.emf.common.notify.NotificationChain; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; +import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; +import org.eclipse.emf.ecore.util.InternalEList; + +/** + * + * An implementation of the model object 'Vertex'. + * + *

+ * The following features are implemented: + *

+ *
    + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.VertexImpl#getIncomingTransitions Incoming Transitions}
  • + *
  • {@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.VertexImpl#getOutgoingTransitions Outgoing Transitions}
  • + *
+ * + * @generated + */ +public abstract class VertexImpl extends MinimalEObjectImpl.Container implements Vertex { + /** + * The cached value of the '{@link #getIncomingTransitions() Incoming Transitions}' reference list. + * + * + * @see #getIncomingTransitions() + * @generated + * @ordered + */ + protected EList incomingTransitions; + + /** + * The cached value of the '{@link #getOutgoingTransitions() Outgoing Transitions}' containment reference list. + * + * + * @see #getOutgoingTransitions() + * @generated + * @ordered + */ + protected EList outgoingTransitions; + + /** + * + * + * @generated + */ + protected VertexImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + protected EClass eStaticClass() { + return yakinduPackage.Literals.VERTEX; + } + + /** + * + * + * @generated + */ + public EList getIncomingTransitions() { + if (incomingTransitions == null) { + incomingTransitions = new EObjectWithInverseResolvingEList(Transition.class, this, yakinduPackage.VERTEX__INCOMING_TRANSITIONS, yakinduPackage.TRANSITION__TARGET); + } + return incomingTransitions; + } + + /** + * + * + * @generated + */ + public EList getOutgoingTransitions() { + if (outgoingTransitions == null) { + outgoingTransitions = new EObjectContainmentWithInverseEList(Transition.class, this, yakinduPackage.VERTEX__OUTGOING_TRANSITIONS, yakinduPackage.TRANSITION__SOURCE); + } + return outgoingTransitions; + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: + return ((InternalEList)(InternalEList)getIncomingTransitions()).basicAdd(otherEnd, msgs); + case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: + return ((InternalEList)(InternalEList)getOutgoingTransitions()).basicAdd(otherEnd, msgs); + } + return super.eInverseAdd(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { + switch (featureID) { + case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: + return ((InternalEList)getIncomingTransitions()).basicRemove(otherEnd, msgs); + case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: + return ((InternalEList)getOutgoingTransitions()).basicRemove(otherEnd, msgs); + } + return super.eInverseRemove(otherEnd, featureID, msgs); + } + + /** + * + * + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: + return getIncomingTransitions(); + case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: + return getOutgoingTransitions(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * + * + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: + getIncomingTransitions().clear(); + getIncomingTransitions().addAll((Collection)newValue); + return; + case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: + getOutgoingTransitions().clear(); + getOutgoingTransitions().addAll((Collection)newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * + * + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: + getIncomingTransitions().clear(); + return; + case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: + getOutgoingTransitions().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * + * + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case yakinduPackage.VERTEX__INCOMING_TRANSITIONS: + return incomingTransitions != null && !incomingTransitions.isEmpty(); + case yakinduPackage.VERTEX__OUTGOING_TRANSITIONS: + return outgoingTransitions != null && !outgoingTransitions.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //VertexImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduFactoryImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduFactoryImpl.java new file mode 100644 index 00000000..5d004565 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduFactoryImpl.java @@ -0,0 +1,183 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.*; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.impl.EFactoryImpl; + +import org.eclipse.emf.ecore.plugin.EcorePlugin; + +/** + * + * An implementation of the model Factory. + * + * @generated + */ +public class yakinduFactoryImpl extends EFactoryImpl implements yakinduFactory { + /** + * Creates the default factory implementation. + * + * + * @generated + */ + public static yakinduFactory init() { + try { + yakinduFactory theyakinduFactory = (yakinduFactory)EPackage.Registry.INSTANCE.getEFactory(yakinduPackage.eNS_URI); + if (theyakinduFactory != null) { + return theyakinduFactory; + } + } + catch (Exception exception) { + EcorePlugin.INSTANCE.log(exception); + } + return new yakinduFactoryImpl(); + } + + /** + * Creates an instance of the factory. + * + * + * @generated + */ + public yakinduFactoryImpl() { + super(); + } + + /** + * + * + * @generated + */ + @Override + public EObject create(EClass eClass) { + switch (eClass.getClassifierID()) { + case yakinduPackage.REGION: return createRegion(); + case yakinduPackage.TRANSITION: return createTransition(); + case yakinduPackage.STATECHART: return createStatechart(); + case yakinduPackage.ENTRY: return createEntry(); + case yakinduPackage.SYNCHRONIZATION: return createSynchronization(); + case yakinduPackage.STATE: return createState(); + case yakinduPackage.CHOICE: return createChoice(); + case yakinduPackage.EXIT: return createExit(); + case yakinduPackage.FINAL_STATE: return createFinalState(); + default: + throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); + } + } + + /** + * + * + * @generated + */ + public Region createRegion() { + RegionImpl region = new RegionImpl(); + return region; + } + + /** + * + * + * @generated + */ + public Transition createTransition() { + TransitionImpl transition = new TransitionImpl(); + return transition; + } + + /** + * + * + * @generated + */ + public Statechart createStatechart() { + StatechartImpl statechart = new StatechartImpl(); + return statechart; + } + + /** + * + * + * @generated + */ + public Entry createEntry() { + EntryImpl entry = new EntryImpl(); + return entry; + } + + /** + * + * + * @generated + */ + public Synchronization createSynchronization() { + SynchronizationImpl synchronization = new SynchronizationImpl(); + return synchronization; + } + + /** + * + * + * @generated + */ + public State createState() { + StateImpl state = new StateImpl(); + return state; + } + + /** + * + * + * @generated + */ + public Choice createChoice() { + ChoiceImpl choice = new ChoiceImpl(); + return choice; + } + + /** + * + * + * @generated + */ + public Exit createExit() { + ExitImpl exit = new ExitImpl(); + return exit; + } + + /** + * + * + * @generated + */ + public FinalState createFinalState() { + FinalStateImpl finalState = new FinalStateImpl(); + return finalState; + } + + /** + * + * + * @generated + */ + public yakinduPackage getyakinduPackage() { + return (yakinduPackage)getEPackage(); + } + + /** + * + * + * @deprecated + * @generated + */ + @Deprecated + public static yakinduPackage getPackage() { + return yakinduPackage.eINSTANCE; + } + +} //yakinduFactoryImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduPackageImpl.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduPackageImpl.java new file mode 100644 index 00000000..2213e07f --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/impl/yakinduPackageImpl.java @@ -0,0 +1,494 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Pseudostate; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.RegularState; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Statechart; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduFactory; +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +import org.eclipse.emf.ecore.impl.EPackageImpl; + +/** + * + * An implementation of the model Package. + * + * @generated + */ +public class yakinduPackageImpl extends EPackageImpl implements yakinduPackage { + /** + * + * + * @generated + */ + private EClass pseudostateEClass = null; + + /** + * + * + * @generated + */ + private EClass vertexEClass = null; + + /** + * + * + * @generated + */ + private EClass regionEClass = null; + + /** + * + * + * @generated + */ + private EClass transitionEClass = null; + + /** + * + * + * @generated + */ + private EClass statechartEClass = null; + + /** + * + * + * @generated + */ + private EClass entryEClass = null; + + /** + * + * + * @generated + */ + private EClass synchronizationEClass = null; + + /** + * + * + * @generated + */ + private EClass stateEClass = null; + + /** + * + * + * @generated + */ + private EClass regularStateEClass = null; + + /** + * + * + * @generated + */ + private EClass compositeElementEClass = null; + + /** + * + * + * @generated + */ + private EClass choiceEClass = null; + + /** + * + * + * @generated + */ + private EClass exitEClass = null; + + /** + * + * + * @generated + */ + private EClass finalStateEClass = null; + + /** + * Creates an instance of the model Package, registered with + * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package + * package URI value. + *

Note: the correct way to create the package is via the static + * factory method {@link #init init()}, which also performs + * initialization of the package, or returns the registered package, + * if one already exists. + * + * + * @see org.eclipse.emf.ecore.EPackage.Registry + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage#eNS_URI + * @see #init() + * @generated + */ + private yakinduPackageImpl() { + super(eNS_URI, yakinduFactory.eINSTANCE); + } + + /** + * + * + * @generated + */ + private static boolean isInited = false; + + /** + * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. + * + *

This method is used to initialize {@link yakinduPackage#eINSTANCE} when that field is accessed. + * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. + * + * + * @see #eNS_URI + * @see #createPackageContents() + * @see #initializePackageContents() + * @generated + */ + public static yakinduPackage init() { + if (isInited) return (yakinduPackage)EPackage.Registry.INSTANCE.getEPackage(yakinduPackage.eNS_URI); + + // Obtain or create and register package + yakinduPackageImpl theyakinduPackage = (yakinduPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof yakinduPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new yakinduPackageImpl()); + + isInited = true; + + // Create package meta-data objects + theyakinduPackage.createPackageContents(); + + // Initialize created meta-data + theyakinduPackage.initializePackageContents(); + + // Mark meta-data to indicate it can't be changed + theyakinduPackage.freeze(); + + + // Update the registry and return the package + EPackage.Registry.INSTANCE.put(yakinduPackage.eNS_URI, theyakinduPackage); + return theyakinduPackage; + } + + /** + * + * + * @generated + */ + public EClass getPseudostate() { + return pseudostateEClass; + } + + /** + * + * + * @generated + */ + public EClass getVertex() { + return vertexEClass; + } + + /** + * + * + * @generated + */ + public EReference getVertex_IncomingTransitions() { + return (EReference)vertexEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getVertex_OutgoingTransitions() { + return (EReference)vertexEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getRegion() { + return regionEClass; + } + + /** + * + * + * @generated + */ + public EReference getRegion_Vertices() { + return (EReference)regionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getTransition() { + return transitionEClass; + } + + /** + * + * + * @generated + */ + public EReference getTransition_Target() { + return (EReference)transitionEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EReference getTransition_Source() { + return (EReference)transitionEClass.getEStructuralFeatures().get(1); + } + + /** + * + * + * @generated + */ + public EClass getStatechart() { + return statechartEClass; + } + + /** + * + * + * @generated + */ + public EClass getEntry() { + return entryEClass; + } + + /** + * + * + * @generated + */ + public EClass getSynchronization() { + return synchronizationEClass; + } + + /** + * + * + * @generated + */ + public EClass getState() { + return stateEClass; + } + + /** + * + * + * @generated + */ + public EClass getRegularState() { + return regularStateEClass; + } + + /** + * + * + * @generated + */ + public EClass getCompositeElement() { + return compositeElementEClass; + } + + /** + * + * + * @generated + */ + public EReference getCompositeElement_Regions() { + return (EReference)compositeElementEClass.getEStructuralFeatures().get(0); + } + + /** + * + * + * @generated + */ + public EClass getChoice() { + return choiceEClass; + } + + /** + * + * + * @generated + */ + public EClass getExit() { + return exitEClass; + } + + /** + * + * + * @generated + */ + public EClass getFinalState() { + return finalStateEClass; + } + + /** + * + * + * @generated + */ + public yakinduFactory getyakinduFactory() { + return (yakinduFactory)getEFactoryInstance(); + } + + /** + * + * + * @generated + */ + private boolean isCreated = false; + + /** + * Creates the meta-model objects for the package. This method is + * guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void createPackageContents() { + if (isCreated) return; + isCreated = true; + + // Create classes and their features + pseudostateEClass = createEClass(PSEUDOSTATE); + + vertexEClass = createEClass(VERTEX); + createEReference(vertexEClass, VERTEX__INCOMING_TRANSITIONS); + createEReference(vertexEClass, VERTEX__OUTGOING_TRANSITIONS); + + regionEClass = createEClass(REGION); + createEReference(regionEClass, REGION__VERTICES); + + transitionEClass = createEClass(TRANSITION); + createEReference(transitionEClass, TRANSITION__TARGET); + createEReference(transitionEClass, TRANSITION__SOURCE); + + statechartEClass = createEClass(STATECHART); + + entryEClass = createEClass(ENTRY); + + synchronizationEClass = createEClass(SYNCHRONIZATION); + + stateEClass = createEClass(STATE); + + regularStateEClass = createEClass(REGULAR_STATE); + + compositeElementEClass = createEClass(COMPOSITE_ELEMENT); + createEReference(compositeElementEClass, COMPOSITE_ELEMENT__REGIONS); + + choiceEClass = createEClass(CHOICE); + + exitEClass = createEClass(EXIT); + + finalStateEClass = createEClass(FINAL_STATE); + } + + /** + * + * + * @generated + */ + private boolean isInitialized = false; + + /** + * Complete the initialization of the package and its meta-model. This + * method is guarded to have no affect on any invocation but its first. + * + * + * @generated + */ + public void initializePackageContents() { + if (isInitialized) return; + isInitialized = true; + + // Initialize package + setName(eNAME); + setNsPrefix(eNS_PREFIX); + setNsURI(eNS_URI); + + // Create type parameters + + // Set bounds for type parameters + + // Add supertypes to classes + pseudostateEClass.getESuperTypes().add(this.getVertex()); + statechartEClass.getESuperTypes().add(this.getCompositeElement()); + entryEClass.getESuperTypes().add(this.getPseudostate()); + synchronizationEClass.getESuperTypes().add(this.getPseudostate()); + stateEClass.getESuperTypes().add(this.getRegularState()); + stateEClass.getESuperTypes().add(this.getCompositeElement()); + regularStateEClass.getESuperTypes().add(this.getVertex()); + choiceEClass.getESuperTypes().add(this.getPseudostate()); + exitEClass.getESuperTypes().add(this.getPseudostate()); + finalStateEClass.getESuperTypes().add(this.getRegularState()); + + // Initialize classes, features, and operations; add parameters + initEClass(pseudostateEClass, Pseudostate.class, "Pseudostate", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(vertexEClass, Vertex.class, "Vertex", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getVertex_IncomingTransitions(), this.getTransition(), this.getTransition_Target(), "incomingTransitions", null, 0, -1, Vertex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getVertex_OutgoingTransitions(), this.getTransition(), this.getTransition_Source(), "outgoingTransitions", null, 0, -1, Vertex.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(regionEClass, Region.class, "Region", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getRegion_Vertices(), this.getVertex(), null, "vertices", null, 0, -1, Region.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(transitionEClass, Transition.class, "Transition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getTransition_Target(), this.getVertex(), this.getVertex_IncomingTransitions(), "target", null, 1, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + initEReference(getTransition_Source(), this.getVertex(), this.getVertex_OutgoingTransitions(), "source", null, 0, 1, Transition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); + + initEClass(statechartEClass, Statechart.class, "Statechart", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(entryEClass, Entry.class, "Entry", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(synchronizationEClass, Synchronization.class, "Synchronization", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(stateEClass, State.class, "State", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(regularStateEClass, RegularState.class, "RegularState", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(compositeElementEClass, CompositeElement.class, "CompositeElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getCompositeElement_Regions(), this.getRegion(), null, "regions", null, 0, -1, CompositeElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + + initEClass(choiceEClass, Choice.class, "Choice", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(exitEClass, Exit.class, "Exit", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + initEClass(finalStateEClass, FinalState.class, "FinalState", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + + // Create resource + createResource(eNS_URI); + } + +} //yakinduPackageImpl diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduMutatedPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduMutatedPatterns.vql new file mode 100644 index 00000000..2e498670 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduMutatedPatterns.vql @@ -0,0 +1,270 @@ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries + +import epackage "YakinduMetamodel" + +///////// +// Entry +///////// + +pattern entryInRegion_M0(r1 : Region, e1 : Entry) { + Region.vertices(r1, e1); +} +pattern entryInRegion_M1(r1 : Region, e1) { + Region.vertices(r1, e1); +} +pattern entryInRegion_M2(r1 : Region, e1: Entry) { + // For positive constraint + Region(r1);Entry(e1); +} + + +//@Constraint(severity="error", message="error", key = {r1}) +pattern noEntryInRegion_M0(r1 : Region) { + neg find entryInRegion_M0(r1, _); +} +pattern noEntryInRegion_M1(r1 : Region) { + neg find entryInRegion_M1(r1, _); +} +pattern noEntryInRegion_M2(r1 : Region) { + neg find entryInRegion_M2(r1, _); +} +pattern noEntryInRegion_M3(r1 : Region) { + find entryInRegion_M0(r1, _); +} +pattern noEntryInRegion_M4(r1 : Region) { + find entryInRegion_M1(r1, _); +} +pattern noEntryInRegion_M5(r1 : Region) { + find entryInRegion_M2(r1, _); +} + +//@Constraint(severity="error", message="error", key = {r}) +pattern multipleEntryInRegion_M0(r : Region) { + find entryInRegion_M0(r, e1); + find entryInRegion_M0(r, e2); + e1 != e2; +} +pattern multipleEntryInRegion_M1(r : Region) { + find entryInRegion_M1(r, e1); + find entryInRegion_M0(r, e2); + e1 != e2; +} +pattern multipleEntryInRegion_M2(r : Region) { + find entryInRegion_M2(r, e1); + find entryInRegion_M0(r, e2); + e1 != e2; +} +pattern multipleEntryInRegion_M3(r : Region) { + find entryInRegion_M0(r, e1); + find entryInRegion_M1(r, e2); + e1 != e2; +} +pattern multipleEntryInRegion_M4(r : Region) { + find entryInRegion_M2(r, e1); + find entryInRegion_M2(r, e2); + e1 != e2; +} +pattern multipleEntryInRegion_M5(r : Region) { + find entryInRegion_M0(r, e1); + find entryInRegion_M0(r, e2); +} + + +pattern transition_M0(t : Transition, src : Vertex, trg : Vertex) { + Transition.source(t, src); + Transition.target(t, trg); +} +pattern transition_M1(t : Transition, src : Vertex, trg : Vertex) { + Transition.source(t, src); + Vertex(trg); +} +pattern transition_M2(t : Transition, src : Vertex, trg : Vertex) { + Vertex(src); + Transition.target(t, trg); +} +pattern transition_M3(t : Transition, src : Vertex, trg : Vertex) { + Transition.source(t_x, src); + Transition.target(t, trg); +} +pattern transition_M4(t : Transition, src : Vertex, trg : Vertex) { + Transition.source(t, src); + Transition.target(t_x, trg); +} + +//@Constraint(severity="error", message="error", key = {e}) +pattern incomingToEntry_M0(t : Transition, e : Entry) { + find transition_M0(t, _, e); +} +pattern incomingToEntry_1(t : Transition, e) { + find transition_M0(t, _, e); +} +pattern incomingToEntry_2(t : Transition, e : Entry) { + find transition_M1(t, _, e); +} +pattern incomingToEntry_3(t : Transition, e : Entry) { + find transition_M2(t, _, e); +} +pattern incomingToEntry_4(t : Transition, e : Entry) { + find transition_M3(t, _, e); +} +pattern incomingToEntry_5(t : Transition, e : Entry) { + find transition_M4(t, _, e); +} + +pattern noOutgoingTransitionFromEntry_M0(e : Entry) { + neg find transition_M0(_, e, _); +} + +pattern noOutgoingTransitionFromEntry_M1(e) { + Vertex(e); + neg find transition_M0(_, e, _); +} +pattern noOutgoingTransitionFromEntry_M2(e : Entry) { + neg find transition_M1(_, e, _); +} +pattern noOutgoingTransitionFromEntry_M3(e : Entry) { + neg find transition_M2(_, e, _); +} +pattern noOutgoingTransitionFromEntry_M4(e : Entry) { + neg find transition_M3(_, e, _); +} +pattern noOutgoingTransitionFromEntry_M5(e : Entry) { + neg find transition_M4(_, e, _); +} + + +//@Constraint(severity="error", message="error", key = {e}) +pattern multipleTransitionFromEntry_M0(e : Entry, t1 : Transition, t2: Transition) { + Entry.outgoingTransitions(e,t1); + Entry.outgoingTransitions(e,t2); + t1!=t2; +} +pattern multipleTransitionFromEntry_M1(e, t1 : Transition, t2: Transition) { + Entry.outgoingTransitions(e,t1); + Entry.outgoingTransitions(e,t2); + t1!=t2; +} +pattern multipleTransitionFromEntry_M2(e : Entry, t1 : Transition, t2: Transition) { + Transition(t1); + Entry.outgoingTransitions(e,t2); + t1!=t2; +} +pattern multipleTransitionFromEntry_M3(e : Entry, t1 : Transition, t2: Transition) { + Entry.outgoingTransitions(e,t1); + Transition(t2); + t1!=t2; +} +pattern multipleTransitionFromEntry_M4(e : Entry, t1 : Transition, t2: Transition) { + Entry.outgoingTransitions(e,t1); + Entry.outgoingTransitions(e,t2); +} + +///////// +// Exit +///////// + +//@Constraint(severity="error", message="error", key = {e}) +pattern outgoingFromExit_M0(t : Transition, e : Exit) { + Exit.outgoingTransitions(e,t); +} +pattern outgoingFromExit_M1(t : Transition, e) { + Vertex.outgoingTransitions(e,t); +} +pattern outgoingFromExit_M2(t : Transition, e : Exit) { + Transition(t); + Exit(e); +} + +///////// +// Final +///////// + +//@Constraint(severity="error", message="error", key = {f}) +pattern outgoingFromFinal_M0(t : Transition, f : FinalState) { + FinalState.outgoingTransitions(f,t); +} +pattern outgoingFromFinal_M1(t : Transition, f) { + Vertex.outgoingTransitions(f,t); +} +pattern outgoingFromFinal_M2(t : Transition, f : FinalState) { + Transition(t); + FinalState(f); +} + +///////// +// State vs Region +///////// + +//@Constraint(severity="error", message="error", key = {region}) +pattern noStateInRegion_M0(region: Region) { + neg find StateInRegion_M0(region,_); +} +pattern noStateInRegion_M1(region: Region) { + neg find StateInRegion_M1(region,_); +} +pattern noStateInRegion_M2(region: Region) { + neg find StateInRegion_M2(region,_); +} +pattern noStateInRegion_M3(region: Region) { + find StateInRegion_M0(region,_); +} + +pattern StateInRegion_M0(region: Region, state: State) { + Region.vertices(region,state); +} +pattern StateInRegion_M1(region: Region, state) { + Region.vertices(region,state); +} +pattern StateInRegion_M2(region: Region, state:State) { + Region(region);State(state); +} + +///////// +// Choice +///////// + +@Constraint(severity="error", message="error", key = {c}) +pattern choiceHasNoOutgoing_M0(c : Choice) { + neg find transition_M0(_, c, _); +} +pattern choiceHasNoOutgoing_M1(c:Vertex) { + neg find transition_M0(_, c, _); +} +pattern choiceHasNoOutgoing_M2(c : Choice) { + neg find transition_M1(_, c, _); +} +pattern choiceHasNoOutgoing_M3(c : Choice) { + neg find transition_M2(_, c, _); +} +pattern choiceHasNoOutgoing_M4(c : Choice) { + neg find transition_M3(_, c, _); +} +pattern choiceHasNoOutgoing_M5(c : Choice) { + neg find transition_M4(_, c, _); +} +pattern choiceHasNoOutgoing_M6(c : Choice) { + find transition_M0(_, c, _); +} + +@Constraint(severity="error", message="error", key = {c}) +pattern choiceHasNoIncoming_M0(c: Choice) { + neg find transition_M0(_, _, c); +} +pattern choiceHasNoIncoming_M1(c:Vertex) { + neg find transition_M0(_, _, c); +} +pattern choiceHasNoIncoming_M2(c: Choice) { + neg find transition_M1(_, _, c); +} +pattern choiceHasNoIncoming_M3(c: Choice) { + neg find transition_M2(_, _, c); +} +pattern choiceHasNoIncoming_M4(c: Choice) { + neg find transition_M3(_, _, c); +} +pattern choiceHasNoIncoming_M5(c: Choice) { + neg find transition_M4(_, _, c); +} +pattern choiceHasNoIncoming_M6(c: Choice) { + find transition_M0(_, _, c); +} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql new file mode 100644 index 00000000..597b1691 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/queries/yakinduPatterns.vql @@ -0,0 +1,227 @@ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.queries + +import epackage "YakinduMetamodel" + +///////// +// Entry +///////// + +pattern entryInRegion(r1 : Region, e1 : Entry) { + Region.vertices(r1, e1); +} + +@Constraint(severity="error", message="error", key = {r1}) +pattern noEntryInRegion(r1 : Region) { + neg find entryInRegion(r1, _); +} + +@Constraint(severity="error", message="error", key = {r}) +pattern multipleEntryInRegion(r : Region) { + find entryInRegion(r, e1); + find entryInRegion(r, e2); + e1 != e2; +} + +pattern transition(t : Transition, src : Vertex, trg : Vertex) { + Transition.source(t, src); + Transition.target(t, trg); +} + +@Constraint(severity="error", message="error", key = {e}) +pattern incomingToEntry(t : Transition, e : Entry) { + find transition(t, _, e); +} + +@Constraint(severity="error", message="error", key = {e}) +pattern noOutgoingTransitionFromEntry(e : Entry) { + neg find transition(_, e, _); +} + +@Constraint(severity="error", message="error", key = {e}) +pattern multipleTransitionFromEntry(e : Entry, t1 : Transition, t2: Transition) { + Entry.outgoingTransitions(e,t1); + Entry.outgoingTransitions(e,t2); + t1!=t2; +} + +///////// +// Exit +///////// + +@Constraint(severity="error", message="error", key = {e}) +pattern outgoingFromExit(t : Transition, e : Exit) { + Exit.outgoingTransitions(e,t); +} + +///////// +// Final +///////// + +@Constraint(severity="error", message="error", key = {f}) +pattern outgoingFromFinal(t : Transition, f : FinalState) { + FinalState.outgoingTransitions(f,t); +} + +///////// +// State vs Region +///////// + +@Constraint(severity="error", message="error", key = {region}) +pattern noStateInRegion(region: Region) { + neg find StateInRegion(region,_); +} +pattern StateInRegion(region: Region, state: State) { + Region.vertices(region,state); +} + +///////// +// Choice +///////// + +@Constraint(severity="error", message="error", key = {c}) +pattern choiceHasNoOutgoing(c : Choice) { + neg find transition(_, c, _); +} + +@Constraint(severity="error", message="error", key = {c}) +pattern choiceHasNoIncoming(c: Choice) { + neg find transition(_, _, c); +} + +///////// +// Synchronization +///////// + +@Constraint(severity="error", message="error", key = {s}) +pattern synchHasNoOutgoing(s : Synchronization) { + neg find transition(_, s, _); +} + +@Constraint(severity="error", message="error", key = {s}) +pattern synchHasNoIncoming(s : Synchronization) { + neg find transition(_, _, s); +} + +@Constraint(severity="error", message="error", key = {s}) +pattern SynchronizedIncomingInSameRegion(s : Synchronization, v1 : Vertex, v2 : Vertex) { + find transition(t1, v1, s); + find transition(t2, v2, s); + t1!=t2; + Region.vertices(r, v1); + Region.vertices(r, v2); +} or { + find transition(t1, s, v1); + find transition(t2, s, v2); + t1!=t2; + Region.vertices(r, v1); + Region.vertices(r, v2); +} + +@Constraint(severity="error", message="error", key = {s}) +pattern notSynchronizingStates(s : Synchronization) { + neg find hasMultipleOutgoingTrainsition(s); + neg find hasMultipleIncomingTrainsition(s); +} + +pattern hasMultipleOutgoingTrainsition(v : Synchronization) { + find transition(_, v, trg1); + find transition(_, v, trg2); + trg1 != trg2; +} + +pattern hasMultipleIncomingTrainsition(v : Synchronization) { + find transition(_, src1, v); + find transition(_, src2, v); + src1 != src2; +} + +@Constraint(severity="error", message="error", key = {s}) +pattern SynchronizedRegionsAreNotSiblings(s : Synchronization, v1 : Vertex, v2 : Vertex) { + find transition(_, v1, s); + find transition(_, v2, s); + CompositeElement.regions.vertices(r1, v1); + CompositeElement.regions.vertices(r2, v2); + r1 != r2; +} or { + find transition(_, s, v1); + find transition(_, s, v2); + CompositeElement.regions.vertices(r1, v1); + CompositeElement.regions.vertices(r2, v2); + r1 != r2; +} + +/////////////////////////////// +// Extra +// +//@Constraint(severity="error", message="error", key = {s}) +//pattern SynchronizedRegionDoesNotHaveParent(s : Synchronization, v : Vertex) { +// find transition(_, v, s); +// neg find child(_,v); +//} or { +// find transition(_, s, v); +// neg find child(_,v); +//} + +pattern child(parent: CompositeElement, child: Vertex) { + CompositeElement.regions.vertices(parent, child); +} + +@Constraint(severity="error", message="error", key = {s}) +pattern SynchronizedRegionDoesNotHaveMultipleRegions(s : Synchronization, v : Vertex) { + find transition(_, v, s); + find child(c,v); + neg find hasMultipleRegions(c); +} or { + find transition(_, s, v); + find child(c,v); + neg find hasMultipleRegions(c); +} + + +pattern hasMultipleRegions(composite: CompositeElement) { + CompositeElement.regions(composite,region1); + CompositeElement.regions(composite,region2); + region1 != region2; +} + +/** + * Simplifying model generation + */ +@Constraint(severity="error", message="error", key = {s}) +pattern synchThree(s: Synchronization) { + Transition.target(t1,s); + Transition.target(t2,s); + Transition.target(t3,s); + t1!=t2; + t2!=t3; + t1!=t3; +} or { + Transition.source(t1,s); + Transition.source(t2,s); + Transition.source(t3,s); + t1!=t2; + t2!=t3; + t1!=t3; +} + +/** + * Simplifying model generation + */ +@Constraint(severity="error", message="error", key = {s1,s2}) +pattern twoSynch(s1 : Synchronization, s2 : Synchronization) { + Synchronization(s1); + Synchronization(s2); + s1 != s2; +} + +/** + * Model generation task: at least one synch + */ +//@Constraint(severity="error", message="error", key = {s}) +//pattern noSynch(s:Statechart) { +// Statechart(s); +// neg find synch(_); +//} +//pattern synch(s:Synchronization) { +// Synchronization(s); +//} \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/util/yakinduAdapterFactory.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/util/yakinduAdapterFactory.java new file mode 100644 index 00000000..b8fafb35 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/util/yakinduAdapterFactory.java @@ -0,0 +1,336 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.util; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.*; + +import org.eclipse.emf.common.notify.Adapter; +import org.eclipse.emf.common.notify.Notifier; + +import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; + +import org.eclipse.emf.ecore.EObject; + +/** + * + * The Adapter Factory for the model. + * It provides an adapter createXXX method for each class of the model. + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage + * @generated + */ +public class yakinduAdapterFactory extends AdapterFactoryImpl { + /** + * The cached model package. + * + * + * @generated + */ + protected static yakinduPackage modelPackage; + + /** + * Creates an instance of the adapter factory. + * + * + * @generated + */ + public yakinduAdapterFactory() { + if (modelPackage == null) { + modelPackage = yakinduPackage.eINSTANCE; + } + } + + /** + * Returns whether this factory is applicable for the type of the object. + * + * This implementation returns true if the object is either the model's package or is an instance object of the model. + * + * @return whether this factory is applicable for the type of the object. + * @generated + */ + @Override + public boolean isFactoryForType(Object object) { + if (object == modelPackage) { + return true; + } + if (object instanceof EObject) { + return ((EObject)object).eClass().getEPackage() == modelPackage; + } + return false; + } + + /** + * The switch that delegates to the createXXX methods. + * + * + * @generated + */ + protected yakinduSwitch modelSwitch = + new yakinduSwitch() { + @Override + public Adapter casePseudostate(Pseudostate object) { + return createPseudostateAdapter(); + } + @Override + public Adapter caseVertex(Vertex object) { + return createVertexAdapter(); + } + @Override + public Adapter caseRegion(Region object) { + return createRegionAdapter(); + } + @Override + public Adapter caseTransition(Transition object) { + return createTransitionAdapter(); + } + @Override + public Adapter caseStatechart(Statechart object) { + return createStatechartAdapter(); + } + @Override + public Adapter caseEntry(Entry object) { + return createEntryAdapter(); + } + @Override + public Adapter caseSynchronization(Synchronization object) { + return createSynchronizationAdapter(); + } + @Override + public Adapter caseState(State object) { + return createStateAdapter(); + } + @Override + public Adapter caseRegularState(RegularState object) { + return createRegularStateAdapter(); + } + @Override + public Adapter caseCompositeElement(CompositeElement object) { + return createCompositeElementAdapter(); + } + @Override + public Adapter caseChoice(Choice object) { + return createChoiceAdapter(); + } + @Override + public Adapter caseExit(Exit object) { + return createExitAdapter(); + } + @Override + public Adapter caseFinalState(FinalState object) { + return createFinalStateAdapter(); + } + @Override + public Adapter defaultCase(EObject object) { + return createEObjectAdapter(); + } + }; + + /** + * Creates an adapter for the target. + * + * + * @param target the object to adapt. + * @return the adapter for the target. + * @generated + */ + @Override + public Adapter createAdapter(Notifier target) { + return modelSwitch.doSwitch((EObject)target); + } + + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Pseudostate Pseudostate}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Pseudostate + * @generated + */ + public Adapter createPseudostateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex Vertex}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex + * @generated + */ + public Adapter createVertexAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region Region}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region + * @generated + */ + public Adapter createRegionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition Transition}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition + * @generated + */ + public Adapter createTransitionAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Statechart Statechart}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Statechart + * @generated + */ + public Adapter createStatechartAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry Entry}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry + * @generated + */ + public Adapter createEntryAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization Synchronization}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization + * @generated + */ + public Adapter createSynchronizationAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State + * @generated + */ + public Adapter createStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.RegularState Regular State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.RegularState + * @generated + */ + public Adapter createRegularStateAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement Composite Element}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement + * @generated + */ + public Adapter createCompositeElementAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice Choice}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice + * @generated + */ + public Adapter createChoiceAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit Exit}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit + * @generated + */ + public Adapter createExitAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState Final State}'. + * + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * + * @return the new adapter. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState + * @generated + */ + public Adapter createFinalStateAdapter() { + return null; + } + + /** + * Creates a new adapter for the default case. + * + * This default implementation returns null. + * + * @return the new adapter. + * @generated + */ + public Adapter createEObjectAdapter() { + return null; + } + +} //yakinduAdapterFactory diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/util/yakinduSwitch.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/util/yakinduSwitch.java new file mode 100644 index 00000000..fbc6f821 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/util/yakinduSwitch.java @@ -0,0 +1,378 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.util; + +import ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.*; + +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.EPackage; + +import org.eclipse.emf.ecore.util.Switch; + +/** + * + * The Switch for the model's inheritance hierarchy. + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} + * to invoke the caseXXX method for each class of the model, + * starting with the actual class of the object + * and proceeding up the inheritance hierarchy + * until a non-null result is returned, + * which is the result of the switch. + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage + * @generated + */ +public class yakinduSwitch extends Switch { + /** + * The cached model package + * + * + * @generated + */ + protected static yakinduPackage modelPackage; + + /** + * Creates an instance of the switch. + * + * + * @generated + */ + public yakinduSwitch() { + if (modelPackage == null) { + modelPackage = yakinduPackage.eINSTANCE; + } + } + + /** + * Checks whether this is a switch for the given package. + * + * + * @param ePackage the package in question. + * @return whether this is a switch for the given package. + * @generated + */ + @Override + protected boolean isSwitchFor(EPackage ePackage) { + return ePackage == modelPackage; + } + + /** + * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. + * + * + * @return the first non-null result returned by a caseXXX call. + * @generated + */ + @Override + protected T doSwitch(int classifierID, EObject theEObject) { + switch (classifierID) { + case yakinduPackage.PSEUDOSTATE: { + Pseudostate pseudostate = (Pseudostate)theEObject; + T result = casePseudostate(pseudostate); + if (result == null) result = caseVertex(pseudostate); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.VERTEX: { + Vertex vertex = (Vertex)theEObject; + T result = caseVertex(vertex); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.REGION: { + Region region = (Region)theEObject; + T result = caseRegion(region); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.TRANSITION: { + Transition transition = (Transition)theEObject; + T result = caseTransition(transition); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.STATECHART: { + Statechart statechart = (Statechart)theEObject; + T result = caseStatechart(statechart); + if (result == null) result = caseCompositeElement(statechart); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.ENTRY: { + Entry entry = (Entry)theEObject; + T result = caseEntry(entry); + if (result == null) result = casePseudostate(entry); + if (result == null) result = caseVertex(entry); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.SYNCHRONIZATION: { + Synchronization synchronization = (Synchronization)theEObject; + T result = caseSynchronization(synchronization); + if (result == null) result = casePseudostate(synchronization); + if (result == null) result = caseVertex(synchronization); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.STATE: { + State state = (State)theEObject; + T result = caseState(state); + if (result == null) result = caseRegularState(state); + if (result == null) result = caseCompositeElement(state); + if (result == null) result = caseVertex(state); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.REGULAR_STATE: { + RegularState regularState = (RegularState)theEObject; + T result = caseRegularState(regularState); + if (result == null) result = caseVertex(regularState); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.COMPOSITE_ELEMENT: { + CompositeElement compositeElement = (CompositeElement)theEObject; + T result = caseCompositeElement(compositeElement); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.CHOICE: { + Choice choice = (Choice)theEObject; + T result = caseChoice(choice); + if (result == null) result = casePseudostate(choice); + if (result == null) result = caseVertex(choice); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.EXIT: { + Exit exit = (Exit)theEObject; + T result = caseExit(exit); + if (result == null) result = casePseudostate(exit); + if (result == null) result = caseVertex(exit); + if (result == null) result = defaultCase(theEObject); + return result; + } + case yakinduPackage.FINAL_STATE: { + FinalState finalState = (FinalState)theEObject; + T result = caseFinalState(finalState); + if (result == null) result = caseRegularState(finalState); + if (result == null) result = caseVertex(finalState); + if (result == null) result = defaultCase(theEObject); + return result; + } + default: return defaultCase(theEObject); + } + } + + /** + * Returns the result of interpreting the object as an instance of 'Pseudostate'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Pseudostate'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T casePseudostate(Pseudostate object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Vertex'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Vertex'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseVertex(Vertex object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Region'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Region'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRegion(Region object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Transition'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Transition'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseTransition(Transition object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Statechart'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Statechart'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseStatechart(Statechart object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Entry'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Entry'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseEntry(Entry object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Synchronization'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Synchronization'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseSynchronization(Synchronization object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseState(State object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Regular State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Regular State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseRegularState(RegularState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Composite Element'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Composite Element'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseCompositeElement(CompositeElement object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Choice'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Choice'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseChoice(Choice object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Exit'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Exit'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseExit(Exit object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'Final State'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'Final State'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseFinalState(FinalState object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of 'EObject'. + * + * This implementation returns null; + * returning a non-null result will terminate the switch, but this is the last case anyway. + * + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of 'EObject'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) + * @generated + */ + @Override + public T defaultCase(EObject object) { + return null; + } + +} //yakinduSwitch diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/yakinduFactory.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/yakinduFactory.java new file mode 100644 index 00000000..6d437ecb --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/yakinduFactory.java @@ -0,0 +1,114 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + +import org.eclipse.emf.ecore.EFactory; + +/** + * + * The Factory for the model. + * It provides a create method for each non-abstract class of the model. + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduPackage + * @generated + */ +public interface yakinduFactory extends EFactory { + /** + * The singleton instance of the factory. + * + * + * @generated + */ + yakinduFactory eINSTANCE = ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduFactoryImpl.init(); + + /** + * Returns a new object of class 'Region'. + * + * + * @return a new object of class 'Region'. + * @generated + */ + Region createRegion(); + + /** + * Returns a new object of class 'Transition'. + * + * + * @return a new object of class 'Transition'. + * @generated + */ + Transition createTransition(); + + /** + * Returns a new object of class 'Statechart'. + * + * + * @return a new object of class 'Statechart'. + * @generated + */ + Statechart createStatechart(); + + /** + * Returns a new object of class 'Entry'. + * + * + * @return a new object of class 'Entry'. + * @generated + */ + Entry createEntry(); + + /** + * Returns a new object of class 'Synchronization'. + * + * + * @return a new object of class 'Synchronization'. + * @generated + */ + Synchronization createSynchronization(); + + /** + * Returns a new object of class 'State'. + * + * + * @return a new object of class 'State'. + * @generated + */ + State createState(); + + /** + * Returns a new object of class 'Choice'. + * + * + * @return a new object of class 'Choice'. + * @generated + */ + Choice createChoice(); + + /** + * Returns a new object of class 'Exit'. + * + * + * @return a new object of class 'Exit'. + * @generated + */ + Exit createExit(); + + /** + * Returns a new object of class 'Final State'. + * + * + * @return a new object of class 'Final State'. + * @generated + */ + FinalState createFinalState(); + + /** + * Returns the package supported by this factory. + * + * + * @return the package supported by this factory. + * @generated + */ + yakinduPackage getyakinduPackage(); + +} //yakinduFactory diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/yakinduPackage.java b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/yakinduPackage.java new file mode 100644 index 00000000..b3b14944 --- /dev/null +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/src/ca/mcgill/ecse/dslreasoner/standalone/test/yakindu/yakinduPackage.java @@ -0,0 +1,1038 @@ +/** + */ +package ca.mcgill.ecse.dslreasoner.standalone.test.yakindu; + +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; + +/** + * + * The Package for the model. + * It contains accessors for the meta objects to represent + *

    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.yakinduFactory + * @model kind="package" + * @generated + */ +public interface yakinduPackage extends EPackage { + /** + * The package name. + * + * + * @generated + */ + String eNAME = "yakindu"; + + /** + * The package namespace URI. + * + * + * @generated + */ + String eNS_URI = "YakinduMetamodel"; + + /** + * The package namespace name. + * + * + * @generated + */ + String eNS_PREFIX = "yakindu"; + + /** + * The singleton instance of the package. + * + * + * @generated + */ + yakinduPackage eINSTANCE = ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl.init(); + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.VertexImpl Vertex}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.VertexImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getVertex() + * @generated + */ + int VERTEX = 1; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int VERTEX__INCOMING_TRANSITIONS = 0; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int VERTEX__OUTGOING_TRANSITIONS = 1; + + /** + * The number of structural features of the 'Vertex' class. + * + * + * @generated + * @ordered + */ + int VERTEX_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Vertex' class. + * + * + * @generated + * @ordered + */ + int VERTEX_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.PseudostateImpl Pseudostate}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.PseudostateImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getPseudostate() + * @generated + */ + int PSEUDOSTATE = 0; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int PSEUDOSTATE__INCOMING_TRANSITIONS = VERTEX__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int PSEUDOSTATE__OUTGOING_TRANSITIONS = VERTEX__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Pseudostate' class. + * + * + * @generated + * @ordered + */ + int PSEUDOSTATE_FEATURE_COUNT = VERTEX_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Pseudostate' class. + * + * + * @generated + * @ordered + */ + int PSEUDOSTATE_OPERATION_COUNT = VERTEX_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegionImpl Region}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegionImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getRegion() + * @generated + */ + int REGION = 2; + + /** + * The feature id for the 'Vertices' containment reference list. + * + * + * @generated + * @ordered + */ + int REGION__VERTICES = 0; + + /** + * The number of structural features of the 'Region' class. + * + * + * @generated + * @ordered + */ + int REGION_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Region' class. + * + * + * @generated + * @ordered + */ + int REGION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.TransitionImpl Transition}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.TransitionImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getTransition() + * @generated + */ + int TRANSITION = 3; + + /** + * The feature id for the 'Target' reference. + * + * + * @generated + * @ordered + */ + int TRANSITION__TARGET = 0; + + /** + * The feature id for the 'Source' container reference. + * + * + * @generated + * @ordered + */ + int TRANSITION__SOURCE = 1; + + /** + * The number of structural features of the 'Transition' class. + * + * + * @generated + * @ordered + */ + int TRANSITION_FEATURE_COUNT = 2; + + /** + * The number of operations of the 'Transition' class. + * + * + * @generated + * @ordered + */ + int TRANSITION_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.CompositeElementImpl Composite Element}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.CompositeElementImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getCompositeElement() + * @generated + */ + int COMPOSITE_ELEMENT = 9; + + /** + * The feature id for the 'Regions' containment reference list. + * + * + * @generated + * @ordered + */ + int COMPOSITE_ELEMENT__REGIONS = 0; + + /** + * The number of structural features of the 'Composite Element' class. + * + * + * @generated + * @ordered + */ + int COMPOSITE_ELEMENT_FEATURE_COUNT = 1; + + /** + * The number of operations of the 'Composite Element' class. + * + * + * @generated + * @ordered + */ + int COMPOSITE_ELEMENT_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StatechartImpl Statechart}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StatechartImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getStatechart() + * @generated + */ + int STATECHART = 4; + + /** + * The feature id for the 'Regions' containment reference list. + * + * + * @generated + * @ordered + */ + int STATECHART__REGIONS = COMPOSITE_ELEMENT__REGIONS; + + /** + * The number of structural features of the 'Statechart' class. + * + * + * @generated + * @ordered + */ + int STATECHART_FEATURE_COUNT = COMPOSITE_ELEMENT_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Statechart' class. + * + * + * @generated + * @ordered + */ + int STATECHART_OPERATION_COUNT = COMPOSITE_ELEMENT_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.EntryImpl Entry}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.EntryImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getEntry() + * @generated + */ + int ENTRY = 5; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int ENTRY__INCOMING_TRANSITIONS = PSEUDOSTATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int ENTRY__OUTGOING_TRANSITIONS = PSEUDOSTATE__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Entry' class. + * + * + * @generated + * @ordered + */ + int ENTRY_FEATURE_COUNT = PSEUDOSTATE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Entry' class. + * + * + * @generated + * @ordered + */ + int ENTRY_OPERATION_COUNT = PSEUDOSTATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.SynchronizationImpl Synchronization}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.SynchronizationImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getSynchronization() + * @generated + */ + int SYNCHRONIZATION = 6; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int SYNCHRONIZATION__INCOMING_TRANSITIONS = PSEUDOSTATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int SYNCHRONIZATION__OUTGOING_TRANSITIONS = PSEUDOSTATE__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Synchronization' class. + * + * + * @generated + * @ordered + */ + int SYNCHRONIZATION_FEATURE_COUNT = PSEUDOSTATE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Synchronization' class. + * + * + * @generated + * @ordered + */ + int SYNCHRONIZATION_OPERATION_COUNT = PSEUDOSTATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegularStateImpl Regular State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegularStateImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getRegularState() + * @generated + */ + int REGULAR_STATE = 8; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int REGULAR_STATE__INCOMING_TRANSITIONS = VERTEX__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int REGULAR_STATE__OUTGOING_TRANSITIONS = VERTEX__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Regular State' class. + * + * + * @generated + * @ordered + */ + int REGULAR_STATE_FEATURE_COUNT = VERTEX_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Regular State' class. + * + * + * @generated + * @ordered + */ + int REGULAR_STATE_OPERATION_COUNT = VERTEX_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StateImpl State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StateImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getState() + * @generated + */ + int STATE = 7; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int STATE__INCOMING_TRANSITIONS = REGULAR_STATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int STATE__OUTGOING_TRANSITIONS = REGULAR_STATE__OUTGOING_TRANSITIONS; + + /** + * The feature id for the 'Regions' containment reference list. + * + * + * @generated + * @ordered + */ + int STATE__REGIONS = REGULAR_STATE_FEATURE_COUNT + 0; + + /** + * The number of structural features of the 'State' class. + * + * + * @generated + * @ordered + */ + int STATE_FEATURE_COUNT = REGULAR_STATE_FEATURE_COUNT + 1; + + /** + * The number of operations of the 'State' class. + * + * + * @generated + * @ordered + */ + int STATE_OPERATION_COUNT = REGULAR_STATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.ChoiceImpl Choice}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.ChoiceImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getChoice() + * @generated + */ + int CHOICE = 10; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int CHOICE__INCOMING_TRANSITIONS = PSEUDOSTATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int CHOICE__OUTGOING_TRANSITIONS = PSEUDOSTATE__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Choice' class. + * + * + * @generated + * @ordered + */ + int CHOICE_FEATURE_COUNT = PSEUDOSTATE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Choice' class. + * + * + * @generated + * @ordered + */ + int CHOICE_OPERATION_COUNT = PSEUDOSTATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.ExitImpl Exit}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.ExitImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getExit() + * @generated + */ + int EXIT = 11; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int EXIT__INCOMING_TRANSITIONS = PSEUDOSTATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int EXIT__OUTGOING_TRANSITIONS = PSEUDOSTATE__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Exit' class. + * + * + * @generated + * @ordered + */ + int EXIT_FEATURE_COUNT = PSEUDOSTATE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Exit' class. + * + * + * @generated + * @ordered + */ + int EXIT_OPERATION_COUNT = PSEUDOSTATE_OPERATION_COUNT + 0; + + /** + * The meta object id for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.FinalStateImpl Final State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.FinalStateImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getFinalState() + * @generated + */ + int FINAL_STATE = 12; + + /** + * The feature id for the 'Incoming Transitions' reference list. + * + * + * @generated + * @ordered + */ + int FINAL_STATE__INCOMING_TRANSITIONS = REGULAR_STATE__INCOMING_TRANSITIONS; + + /** + * The feature id for the 'Outgoing Transitions' containment reference list. + * + * + * @generated + * @ordered + */ + int FINAL_STATE__OUTGOING_TRANSITIONS = REGULAR_STATE__OUTGOING_TRANSITIONS; + + /** + * The number of structural features of the 'Final State' class. + * + * + * @generated + * @ordered + */ + int FINAL_STATE_FEATURE_COUNT = REGULAR_STATE_FEATURE_COUNT + 0; + + /** + * The number of operations of the 'Final State' class. + * + * + * @generated + * @ordered + */ + int FINAL_STATE_OPERATION_COUNT = REGULAR_STATE_OPERATION_COUNT + 0; + + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Pseudostate Pseudostate}'. + * + * + * @return the meta object for class 'Pseudostate'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Pseudostate + * @generated + */ + EClass getPseudostate(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex Vertex}'. + * + * + * @return the meta object for class 'Vertex'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex + * @generated + */ + EClass getVertex(); + + /** + * Returns the meta object for the reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex#getIncomingTransitions Incoming Transitions}'. + * + * + * @return the meta object for the reference list 'Incoming Transitions'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex#getIncomingTransitions() + * @see #getVertex() + * @generated + */ + EReference getVertex_IncomingTransitions(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex#getOutgoingTransitions Outgoing Transitions}'. + * + * + * @return the meta object for the containment reference list 'Outgoing Transitions'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Vertex#getOutgoingTransitions() + * @see #getVertex() + * @generated + */ + EReference getVertex_OutgoingTransitions(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region Region}'. + * + * + * @return the meta object for class 'Region'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region + * @generated + */ + EClass getRegion(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region#getVertices Vertices}'. + * + * + * @return the meta object for the containment reference list 'Vertices'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Region#getVertices() + * @see #getRegion() + * @generated + */ + EReference getRegion_Vertices(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition Transition}'. + * + * + * @return the meta object for class 'Transition'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition + * @generated + */ + EClass getTransition(); + + /** + * Returns the meta object for the reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getTarget Target}'. + * + * + * @return the meta object for the reference 'Target'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getTarget() + * @see #getTransition() + * @generated + */ + EReference getTransition_Target(); + + /** + * Returns the meta object for the container reference '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getSource Source}'. + * + * + * @return the meta object for the container reference 'Source'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Transition#getSource() + * @see #getTransition() + * @generated + */ + EReference getTransition_Source(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Statechart Statechart}'. + * + * + * @return the meta object for class 'Statechart'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Statechart + * @generated + */ + EClass getStatechart(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry Entry}'. + * + * + * @return the meta object for class 'Entry'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Entry + * @generated + */ + EClass getEntry(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization Synchronization}'. + * + * + * @return the meta object for class 'Synchronization'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Synchronization + * @generated + */ + EClass getSynchronization(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State State}'. + * + * + * @return the meta object for class 'State'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.State + * @generated + */ + EClass getState(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.RegularState Regular State}'. + * + * + * @return the meta object for class 'Regular State'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.RegularState + * @generated + */ + EClass getRegularState(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement Composite Element}'. + * + * + * @return the meta object for class 'Composite Element'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement + * @generated + */ + EClass getCompositeElement(); + + /** + * Returns the meta object for the containment reference list '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement#getRegions Regions}'. + * + * + * @return the meta object for the containment reference list 'Regions'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.CompositeElement#getRegions() + * @see #getCompositeElement() + * @generated + */ + EReference getCompositeElement_Regions(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice Choice}'. + * + * + * @return the meta object for class 'Choice'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Choice + * @generated + */ + EClass getChoice(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit Exit}'. + * + * + * @return the meta object for class 'Exit'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.Exit + * @generated + */ + EClass getExit(); + + /** + * Returns the meta object for class '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState Final State}'. + * + * + * @return the meta object for class 'Final State'. + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.FinalState + * @generated + */ + EClass getFinalState(); + + /** + * Returns the factory that creates the instances of the model. + * + * + * @return the factory that creates the instances of the model. + * @generated + */ + yakinduFactory getyakinduFactory(); + + /** + * + * Defines literals for the meta objects that represent + *
    + *
  • each class,
  • + *
  • each feature of each class,
  • + *
  • each operation of each class,
  • + *
  • each enum,
  • + *
  • and each data type
  • + *
+ * + * @generated + */ + interface Literals { + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.PseudostateImpl Pseudostate}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.PseudostateImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getPseudostate() + * @generated + */ + EClass PSEUDOSTATE = eINSTANCE.getPseudostate(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.VertexImpl Vertex}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.VertexImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getVertex() + * @generated + */ + EClass VERTEX = eINSTANCE.getVertex(); + + /** + * The meta object literal for the 'Incoming Transitions' reference list feature. + * + * + * @generated + */ + EReference VERTEX__INCOMING_TRANSITIONS = eINSTANCE.getVertex_IncomingTransitions(); + + /** + * The meta object literal for the 'Outgoing Transitions' containment reference list feature. + * + * + * @generated + */ + EReference VERTEX__OUTGOING_TRANSITIONS = eINSTANCE.getVertex_OutgoingTransitions(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegionImpl Region}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegionImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getRegion() + * @generated + */ + EClass REGION = eINSTANCE.getRegion(); + + /** + * The meta object literal for the 'Vertices' containment reference list feature. + * + * + * @generated + */ + EReference REGION__VERTICES = eINSTANCE.getRegion_Vertices(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.TransitionImpl Transition}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.TransitionImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getTransition() + * @generated + */ + EClass TRANSITION = eINSTANCE.getTransition(); + + /** + * The meta object literal for the 'Target' reference feature. + * + * + * @generated + */ + EReference TRANSITION__TARGET = eINSTANCE.getTransition_Target(); + + /** + * The meta object literal for the 'Source' container reference feature. + * + * + * @generated + */ + EReference TRANSITION__SOURCE = eINSTANCE.getTransition_Source(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StatechartImpl Statechart}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StatechartImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getStatechart() + * @generated + */ + EClass STATECHART = eINSTANCE.getStatechart(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.EntryImpl Entry}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.EntryImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getEntry() + * @generated + */ + EClass ENTRY = eINSTANCE.getEntry(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.SynchronizationImpl Synchronization}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.SynchronizationImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getSynchronization() + * @generated + */ + EClass SYNCHRONIZATION = eINSTANCE.getSynchronization(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StateImpl State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.StateImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getState() + * @generated + */ + EClass STATE = eINSTANCE.getState(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegularStateImpl Regular State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.RegularStateImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getRegularState() + * @generated + */ + EClass REGULAR_STATE = eINSTANCE.getRegularState(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.CompositeElementImpl Composite Element}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.CompositeElementImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getCompositeElement() + * @generated + */ + EClass COMPOSITE_ELEMENT = eINSTANCE.getCompositeElement(); + + /** + * The meta object literal for the 'Regions' containment reference list feature. + * + * + * @generated + */ + EReference COMPOSITE_ELEMENT__REGIONS = eINSTANCE.getCompositeElement_Regions(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.ChoiceImpl Choice}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.ChoiceImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getChoice() + * @generated + */ + EClass CHOICE = eINSTANCE.getChoice(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.ExitImpl Exit}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.ExitImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getExit() + * @generated + */ + EClass EXIT = eINSTANCE.getExit(); + + /** + * The meta object literal for the '{@link ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.FinalStateImpl Final State}' class. + * + * + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.FinalStateImpl + * @see ca.mcgill.ecse.dslreasoner.standalone.test.yakindu.impl.yakinduPackageImpl#getFinalState() + * @generated + */ + EClass FINAL_STATE = eINSTANCE.getFinalState(); + + } + +} //yakinduPackage -- cgit v1.2.3-54-g00ecf