From 4d27f2788d2f728d4ee2be8861df09da62bf135f Mon Sep 17 00:00:00 2001 From: ArenBabikian Date: Mon, 3 Feb 2020 15:20:02 -0500 Subject: VAMPIRE: last commit --- .../.ApplicationConfigurationIdeModule.xtendbin | Bin 1701 -> 1701 bytes .../ide/.ApplicationConfigurationIdeSetup.xtendbin | Bin 2526 -> 2526 bytes .../start-application-umontreal.launch | 37 + .../ModelGenExampleFAM_plugin/META-INF/MANIFEST.MF | 18 +- .../ecore-gen/functionalarchitecture/Function.java | 14 +- .../functionalarchitecture/FunctionalData.java | 33 +- .../functionalarchitecture/FunctionalElement.java | 8 +- .../FunctionalarchitecturePackage.java | 48 +- .../functionalarchitecture/impl/FunctionImpl.java | 15 + .../impl/FunctionalDataImpl.java | 86 +- .../impl/FunctionalElementImpl.java | 21 +- .../impl/FunctionalInterfaceImpl.java | 3 +- .../impl/FunctionalarchitectureFactoryImpl.java | 14 +- .../impl/FunctionalarchitecturePackageImpl.java | 52 +- .../util/FunctionalarchitectureAdapterFactory.java | 14 +- .../util/FunctionalarchitectureSwitch.java | 16 +- .../model/FamMetamodel.ecore | 1 + .../model/FamMetamodel.genmodel | 1 + .../Examples/ModelGenExampleFAM_plugin/plugin.xml | 11 +- .../model/yakindu_simplified.ecore | 5 - .../realistic/metrics/calculations/.CalcC.xtendbin | Bin 0 -> 5158 bytes .../metrics/calculations/.CalcEDA.xtendbin | Bin 0 -> 7314 bytes .../metrics/calculations/.CalcMPC.xtendbin | Bin 0 -> 9662 bytes .../metrics/calculations/.CalcMetric.xtendbin | Bin 0 -> 2555 bytes .../metrics/calculations/.CalcMetric2.xtendbin | Bin 0 -> 2774 bytes .../metrics/calculations/.CalcNA.xtendbin | Bin 0 -> 7937 bytes .../metrics/calculations/.CalcNDA.xtendbin | Bin 0 -> 7017 bytes .../metrics/calculations/.CalcNDC.xtendbin | Bin 0 -> 6481 bytes .../metrics/calculations/.CalcSQRCNT.xtendbin | Bin 0 -> 7453 bytes .../metrics/calculations/.CalcSQRNUM.xtendbin | Bin 0 -> 6922 bytes .../metrics/calculations/.CalcSQRTOT.xtendbin | Bin 0 -> 6549 bytes .../realistic/metrics/calculations/.gitignore | 20 + .../metrics/calculations/CalcSQRMAX.xtend_ | 87 + .../metrics/calculations/CalcSQROSZ2.xtend_ | 69 + .../metrics/examples/.FixModelURIs.xtendbin | Bin 0 -> 4429 bytes .../.MetricsCalculationUsingShapes.xtendbin | Bin 0 -> 10168 bytes .../realistic/metrics/examples/.Util.xtendbin | Bin 0 -> 12474 bytes .../metrics/calculations/.CalcC.java._trace | Bin 0 -> 5637 bytes .../metrics/calculations/.CalcEDA.java._trace | Bin 0 -> 13288 bytes .../metrics/calculations/.CalcMPC.java._trace | Bin 0 -> 24403 bytes .../metrics/calculations/.CalcMetric.java._trace | Bin 0 -> 522 bytes .../metrics/calculations/.CalcMetric2.java._trace | Bin 0 -> 608 bytes .../metrics/calculations/.CalcNA.java._trace | Bin 0 -> 13672 bytes .../metrics/calculations/.CalcNDA.java._trace | Bin 0 -> 10147 bytes .../metrics/calculations/.CalcNDC.java._trace | Bin 0 -> 7235 bytes .../metrics/calculations/.CalcSQRCNT.java._trace | Bin 0 -> 7671 bytes .../metrics/calculations/.CalcSQRNUM.java._trace | Bin 0 -> 15830 bytes .../metrics/calculations/.CalcSQRTOT.java._trace | Bin 0 -> 13017 bytes .../metrics/examples/.FixModelURIs.java._trace | Bin 0 -> 3743 bytes .../.MetricsCalculationUsingShapes.java._trace | Bin 0 -> 19842 bytes .../realistic/metrics/examples/.Util.java._trace | Bin 0 -> 32376 bytes .../META-INF/MANIFEST.MF | 2 +- .../ide/.VampireLanguageIdeModule.xtendbin | Bin 1685 -> 1685 bytes .../ide/.VampireLanguageIdeSetup.xtendbin | Bin 2500 -> 2500 bytes .../ui/.VampireLanguageUiModule.xtendbin | Bin 2342 -> 2342 bytes .../.VampireLanguageProposalProvider.xtendbin | Bin 1792 -> 1792 bytes ...ampireLanguageDescriptionLabelProvider.xtendbin | Bin 1965 -> 1965 bytes .../.VampireLanguageLabelProvider.xtendbin | Bin 2405 -> 2405 bytes .../.VampireLanguageOutlineTreeProvider.xtendbin | Bin 1819 -> 1819 bytes .../.VampireLanguageQuickfixProvider.xtendbin | Bin 1786 -> 1786 bytes .../.VampireLanguageRuntimeModule.xtendbin | Bin 1706 -> 1706 bytes .../.VampireLanguageStandaloneSetup.xtendbin | Bin 1980 -> 1980 bytes .../formatting2/.VampireLanguageFormatter.xtendbin | Bin 3759 -> 3759 bytes .../generator/.VampireLanguageGenerator.xtendbin | Bin 2338 -> 2338 bytes .../scoping/.VampireLanguageScopeProvider.xtendbin | Bin 1751 -> 1751 bytes .../validation/.VampireLanguageValidator.xtendbin | Bin 1736 -> 1736 bytes .../.VampireAnalyzerConfiguration.xtendbin | Bin 3449 -> 3449 bytes .../vampire/reasoner/.VampireSolver.xtendbin | Bin 10104 -> 10104 bytes .../builder/.Logic2VampireLanguageMapper.xtendbin | Bin 19565 -> 19565 bytes .../.Logic2VampireLanguageMapperTrace.xtendbin | Bin 5080 -> 5080 bytes ...c2VampireLanguageMapper_ConstantMapper.xtendbin | Bin 3164 -> 3164 bytes ...ampireLanguageMapper_ContainmentMapper.xtendbin | Bin 11807 -> 11807 bytes ...c2VampireLanguageMapper_RelationMapper.xtendbin | Bin 7880 -> 7880 bytes ...ogic2VampireLanguageMapper_ScopeMapper.xtendbin | Bin 10684 -> 10684 bytes .../.Logic2VampireLanguageMapper_Support.xtendbin | Bin 17151 -> 17151 bytes ...Logic2VampireLanguageMapper_TypeMapper.xtendbin | Bin 11037 -> 11037 bytes .../reasoner/builder/.Vampire2LogicMapper.xtendbin | Bin 3998 -> 3998 bytes .../reasoner/builder/.VampireHandler.xtendbin | Bin 7743 -> 7743 bytes ...ModelInterpretation_TypeInterpretation.xtendbin | Bin 1491 -> 1491 bytes ...ation_TypeInterpretation_FilteredTypes.xtendbin | Bin 1688 -> 1688 bytes .../configs/fam.vsconfig | 6 +- .../outputs/fam/debug/errors.txt | 107 +- .../fam/debug/generated3valued.vql_deactivated | 17611 +++++++++++++++++++ .../outputs/fam/debug/generation.logicproblem | 69 +- .../outputs/fam/debug/init.partialmodel | 7 +- .../outputs/fam/log.txt | 2 +- .../outputs/fam/models/1.gml | 3429 ++++ .../outputs/fam/models/1.png | Bin 73113 -> 85126 bytes .../outputs/fam/models/1.xmi | 22 +- .../outputs/fam/models/2.gml | 2506 +++ .../outputs/fam/models/2.png | Bin 75459 -> 83599 bytes .../outputs/fam/models/2.xmi | 21 +- .../outputs/fam/models/3.gml | 2469 +++ .../outputs/fam/models/3.png | Bin 75681 -> 65027 bytes .../outputs/fam/models/3.xmi | 21 +- .../outputs/fam/models/4.gml | 2505 +++ .../outputs/fam/models/4.png | Bin 88715 -> 65007 bytes .../outputs/fam/models/4.xmi | 21 +- .../outputs/fam/models/5.gml | 2505 +++ .../outputs/fam/models/5.png | Bin 88028 -> 64375 bytes .../outputs/fam/models/5.xmi | 22 +- .../outputs/fam/statistics.csv | 6 + .../output/FAMTest/Fam.logicproblem | 62 +- .../ecse/dslreasoner/vampire/icse/FAMTest.xtend | 45 +- .../dslreasoner/vampire/icse/.EcoreTest.xtendbin | Bin 4545 -> 4545 bytes .../dslreasoner/vampire/icse/.FAMTest.xtendbin | Bin 6626 -> 6381 bytes .../vampire/icse/.FileSystemTest.xtendbin | Bin 6201 -> 6201 bytes .../dslreasoner/vampire/icse/.GeneralTest.xtendbin | Bin 6625 -> 6625 bytes .../dslreasoner/vampire/icse/.YakinduTest.xtendbin | Bin 9352 -> 9352 bytes .../ecse/dslreasoner/vampire/icse/FAMTest.java | 14 +- .../vampire/test/.MedicalSystem.xtendbin | Bin 5003 -> 5003 bytes .../dslreasoner/vampire/test/.SimpleRun.xtendbin | Bin 687 -> 687 bytes .../dslreasoner/vampire/test/.VampireTest.xtendbin | Bin 6581 -> 6581 bytes .../dslreasoner/yakindu/test/.YakinduTest.xtendbin | Bin 8569 -> 8569 bytes 114 files changed, 31767 insertions(+), 258 deletions(-) create mode 100644 Application/hu.bme.mit.inf.dslreasoner.application/start-application-umontreal.launch create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcC.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcEDA.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMPC.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric2.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNA.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDA.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDC.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRCNT.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRNUM.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRTOT.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.gitignore create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/CalcSQRMAX.xtend_ create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/CalcSQROSZ2.xtend_ create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.FixModelURIs.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.MetricsCalculationUsingShapes.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.Util.xtendbin create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcC.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcEDA.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMPC.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric2.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNA.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDA.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDC.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRCNT.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRNUM.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRTOT.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.FixModelURIs.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.MetricsCalculationUsingShapes.java._trace create mode 100644 Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.Util.java._trace diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin index 3f997d1e..f37b0e9a 100644 Binary files a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin and b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin differ diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin index fd411426..209a7b80 100644 Binary files a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin and b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin differ diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/start-application-umontreal.launch b/Application/hu.bme.mit.inf.dslreasoner.application/start-application-umontreal.launch new file mode 100644 index 00000000..abff69ee --- /dev/null +++ b/Application/hu.bme.mit.inf.dslreasoner.application/start-application-umontreal.launch @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/META-INF/MANIFEST.MF b/Domains/Examples/ModelGenExampleFAM_plugin/META-INF/MANIFEST.MF index f1f5d18c..077e646b 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/META-INF/MANIFEST.MF +++ b/Domains/Examples/ModelGenExampleFAM_plugin/META-INF/MANIFEST.MF @@ -7,16 +7,16 @@ Bundle-ClassPath: . Bundle-Vendor: %providerName Bundle-Localization: plugin Export-Package: functionalarchitecture, - functionalarchitecture.impl, - functionalarchitecture.util, - hu.bme.mit.inf.dslreasoner.domains.transima.fam + functionalarchitecture.impl, + functionalarchitecture.util, + hu.bme.mit.inf.dslreasoner.domains.transima.fam Require-Bundle: ModelGenExampleFAM_plugin, - org.eclipse.viatra.addon.querybasedfeatures.runtime, - org.eclipse.viatra.query.runtime, - org.apache.log4j;bundle-version="1.2.15", - com.google.guava;bundle-version="15.0.0", - org.eclipse.core.runtime, - org.eclipse.emf.ecore;visibility:=reexport + org.eclipse.viatra.addon.querybasedfeatures.runtime, + org.eclipse.viatra.query.runtime, + org.apache.log4j;bundle-version="1.2.15", + com.google.guava;bundle-version="15.0.0", + org.eclipse.core.runtime, + org.eclipse.emf.ecore;visibility:=reexport Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Bundle-ActivationPolicy: lazy Automatic-Module-Name: ModelGenExampleFAM_plugin diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/Function.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/Function.java index 5b484066..0a4e6361 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/Function.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/Function.java @@ -51,11 +51,23 @@ public interface Function extends FunctionalElement { * * @return the value of the 'Type' attribute. * @see functionalarchitecture.FunctionType + * @see #setType(FunctionType) * @see functionalarchitecture.FunctionalarchitecturePackage#getFunction_Type() - * @model required="true" transient="true" changeable="false" volatile="true" derived="true" + * @model required="true" transient="true" volatile="true" * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.transima.fam.type'" * @generated */ FunctionType getType(); + /** + * Sets the value of the '{@link functionalarchitecture.Function#getType Type}' attribute. + * + * + * @param value the new value of the 'Type' attribute. + * @see functionalarchitecture.FunctionType + * @see #getType() + * @generated + */ + void setType(FunctionType value); + } // Function diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalData.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalData.java index 39639f99..23b7b9a0 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalData.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalData.java @@ -15,6 +15,7 @@ import org.eclipse.emf.ecore.EObject; * * * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalData() @@ -60,13 +61,13 @@ public interface FunctionalData extends EObject { *

* * @return the value of the 'Interface' container reference. - * @see #setInterface(FunctionalInterface) + * @see #setInterface(functionalarchitecture.FunctionalInterface) * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalData_Interface() * @see functionalarchitecture.FunctionalInterface#getData * @model opposite="data" transient="false" * @generated */ - FunctionalInterface getInterface(); + functionalarchitecture.FunctionalInterface getInterface(); /** * Sets the value of the '{@link functionalarchitecture.FunctionalData#getInterface Interface}' container reference. @@ -76,6 +77,32 @@ public interface FunctionalData extends EObject { * @see #getInterface() * @generated */ - void setInterface(FunctionalInterface value); + void setInterface(functionalarchitecture.FunctionalInterface value); + + /** + * Returns the value of the 'Value' attribute. + * + *

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

+ * + * @return the value of the 'Value' attribute. + * @see #setValue(int) + * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalData_Value() + * @model required="true" + * @generated + */ + int getValue(); + + /** + * Sets the value of the '{@link functionalarchitecture.FunctionalData#getValue Value}' attribute. + * + * + * @param value the new value of the 'Value' attribute. + * @see #getValue() + * @generated + */ + void setValue(int value); } // FunctionalData diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalElement.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalElement.java index f5a2ff19..1fb9b9b8 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalElement.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalElement.java @@ -33,13 +33,13 @@ public interface FunctionalElement extends EObject { *

* * @return the value of the 'Interface' containment reference. - * @see #setInterface(FunctionalInterface) + * @see #setInterface(functionalarchitecture.FunctionalInterface) * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalElement_Interface() * @see functionalarchitecture.FunctionalInterface#getElement * @model opposite="element" containment="true" * @generated */ - FunctionalInterface getInterface(); + functionalarchitecture.FunctionalInterface getInterface(); /** * Sets the value of the '{@link functionalarchitecture.FunctionalElement#getInterface Interface}' containment reference. @@ -49,7 +49,7 @@ public interface FunctionalElement extends EObject { * @see #getInterface() * @generated */ - void setInterface(FunctionalInterface value); + void setInterface(functionalarchitecture.FunctionalInterface value); /** * Returns the value of the 'Model' reference. @@ -62,7 +62,7 @@ public interface FunctionalElement extends EObject { * @return the value of the 'Model' reference. * @see #setModel(FunctionalArchitectureModel) * @see functionalarchitecture.FunctionalarchitecturePackage#getFunctionalElement_Model() - * @model required="true" transient="true" volatile="true" derived="true" + * @model required="true" transient="true" volatile="true" * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.transima.fam.model'" * @generated */ diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitecturePackage.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitecturePackage.java index ac0d910e..dee2cc59 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitecturePackage.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/FunctionalarchitecturePackage.java @@ -380,6 +380,15 @@ public interface FunctionalarchitecturePackage extends EPackage { */ int FUNCTIONAL_DATA__INTERFACE = 1; + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_DATA__VALUE = 2; + /** * The number of structural features of the 'Functional Data' class. * @@ -387,7 +396,7 @@ public interface FunctionalarchitecturePackage extends EPackage { * @generated * @ordered */ - int FUNCTIONAL_DATA_FEATURE_COUNT = 2; + int FUNCTIONAL_DATA_FEATURE_COUNT = 3; /** * The number of operations of the 'Functional Data' class. @@ -426,6 +435,15 @@ public interface FunctionalarchitecturePackage extends EPackage { */ int FUNCTIONAL_INPUT__INTERFACE = FUNCTIONAL_DATA__INTERFACE; + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_INPUT__VALUE = FUNCTIONAL_DATA__VALUE; + /** * The feature id for the 'Incoming Links' reference list. * @@ -481,6 +499,15 @@ public interface FunctionalarchitecturePackage extends EPackage { */ int FUNCTIONAL_OUTPUT__INTERFACE = FUNCTIONAL_DATA__INTERFACE; + /** + * The feature id for the 'Value' attribute. + * + * + * @generated + * @ordered + */ + int FUNCTIONAL_OUTPUT__VALUE = FUNCTIONAL_DATA__VALUE; + /** * The feature id for the 'Outgoing Links' containment reference list. * @@ -774,6 +801,17 @@ public interface FunctionalarchitecturePackage extends EPackage { */ EReference getFunctionalData_Interface(); + /** + * Returns the meta object for the attribute '{@link functionalarchitecture.FunctionalData#getValue Value}'. + * + * + * @return the meta object for the attribute 'Value'. + * @see functionalarchitecture.FunctionalData#getValue() + * @see #getFunctionalData() + * @generated + */ + EAttribute getFunctionalData_Value(); + /** * Returns the meta object for enum '{@link functionalarchitecture.FunctionType Function Type}'. * @@ -1017,6 +1055,14 @@ public interface FunctionalarchitecturePackage extends EPackage { */ EReference FUNCTIONAL_DATA__INTERFACE = eINSTANCE.getFunctionalData_Interface(); + /** + * The meta object literal for the 'Value' attribute feature. + * + * + * @generated + */ + EAttribute FUNCTIONAL_DATA__VALUE = eINSTANCE.getFunctionalData_Value(); + /** * The meta object literal for the '{@link functionalarchitecture.FunctionType Function Type}' enum. * diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionImpl.java index 46736c8c..2262094e 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionImpl.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionImpl.java @@ -95,6 +95,15 @@ public class FunctionImpl extends FunctionalElementImpl implements Function { return (FunctionType)TYPE__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); } + /** + * + * + * @generated + */ + public void setType(FunctionType newType) { + TYPE__ESETTING_DELEGATE.dynamicSet(this, null, 0, newType); + } + /** * * @@ -153,6 +162,9 @@ public class FunctionImpl extends FunctionalElementImpl implements Function { getSubElements().clear(); getSubElements().addAll((Collection)newValue); return; + case FunctionalarchitecturePackage.FUNCTION__TYPE: + setType((FunctionType)newValue); + return; } super.eSet(featureID, newValue); } @@ -168,6 +180,9 @@ public class FunctionImpl extends FunctionalElementImpl implements Function { case FunctionalarchitecturePackage.FUNCTION__SUB_ELEMENTS: getSubElements().clear(); return; + case FunctionalarchitecturePackage.FUNCTION__TYPE: + TYPE__ESETTING_DELEGATE.dynamicUnset(this, null, 0); + return; } super.eUnset(featureID); } diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalDataImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalDataImpl.java index 10937e8d..ecab54af 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalDataImpl.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalDataImpl.java @@ -4,7 +4,6 @@ package functionalarchitecture.impl; import functionalarchitecture.FAMTerminator; import functionalarchitecture.FunctionalData; -import functionalarchitecture.FunctionalInterface; import functionalarchitecture.FunctionalarchitecturePackage; import org.eclipse.emf.common.notify.Notification; @@ -28,6 +27,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil; * * * @generated @@ -43,6 +43,25 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im */ protected FAMTerminator terminator; + /** + * The default value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected static final int VALUE_EDEFAULT = 0; + /** + * The cached value of the '{@link #getValue() Value}' attribute. + * + * + * @see #getValue() + * @generated + * @ordered + */ + protected int value = VALUE_EDEFAULT; + /** * * @@ -110,9 +129,9 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im * * @generated */ - public FunctionalInterface getInterface() { + public functionalarchitecture.FunctionalInterface getInterface() { if (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE) return null; - return (FunctionalInterface)eInternalContainer(); + return (functionalarchitecture.FunctionalInterface)eInternalContainer(); } /** @@ -120,7 +139,7 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im * * @generated */ - public NotificationChain basicSetInterface(FunctionalInterface newInterface, NotificationChain msgs) { + public NotificationChain basicSetInterface(functionalarchitecture.FunctionalInterface newInterface, NotificationChain msgs) { msgs = eBasicSetContainer((InternalEObject)newInterface, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE, msgs); return msgs; } @@ -130,7 +149,7 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im * * @generated */ - public void setInterface(FunctionalInterface newInterface) { + public void setInterface(functionalarchitecture.FunctionalInterface newInterface) { if (newInterface != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE && newInterface != null)) { if (EcoreUtil.isAncestor(this, newInterface)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); @@ -138,7 +157,7 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newInterface != null) - msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, FunctionalInterface.class, msgs); + msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, functionalarchitecture.FunctionalInterface.class, msgs); msgs = basicSetInterface(newInterface, msgs); if (msgs != null) msgs.dispatch(); } @@ -146,6 +165,27 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE, newInterface, newInterface)); } + /** + * + * + * @generated + */ + public int getValue() { + return value; + } + + /** + * + * + * @generated + */ + public void setValue(int newValue) { + int oldValue = value; + value = newValue; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_DATA__VALUE, oldValue, value)); + } + /** * * @@ -161,7 +201,7 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); - return basicSetInterface((FunctionalInterface)otherEnd, msgs); + return basicSetInterface((functionalarchitecture.FunctionalInterface)otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } @@ -191,7 +231,7 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { switch (eContainerFeatureID()) { case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: - return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, FunctionalInterface.class, msgs); + return eInternalContainer().eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__DATA, functionalarchitecture.FunctionalInterface.class, msgs); } return super.eBasicRemoveFromContainerFeature(msgs); } @@ -208,6 +248,8 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im return getTerminator(); case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: return getInterface(); + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__VALUE: + return getValue(); } return super.eGet(featureID, resolve, coreType); } @@ -224,7 +266,10 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im setTerminator((FAMTerminator)newValue); return; case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: - setInterface((FunctionalInterface)newValue); + setInterface((functionalarchitecture.FunctionalInterface)newValue); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__VALUE: + setValue((Integer)newValue); return; } super.eSet(featureID, newValue); @@ -242,7 +287,10 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im setTerminator((FAMTerminator)null); return; case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: - setInterface((FunctionalInterface)null); + setInterface((functionalarchitecture.FunctionalInterface)null); + return; + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__VALUE: + setValue(VALUE_EDEFAULT); return; } super.eUnset(featureID); @@ -260,8 +308,26 @@ public abstract class FunctionalDataImpl extends MinimalEObjectImpl.Container im return terminator != null; case FunctionalarchitecturePackage.FUNCTIONAL_DATA__INTERFACE: return getInterface() != null; + case FunctionalarchitecturePackage.FUNCTIONAL_DATA__VALUE: + return value != VALUE_EDEFAULT; } return super.eIsSet(featureID); } + /** + * + * + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (value: "); + result.append(value); + result.append(')'); + return result.toString(); + } + } //FunctionalDataImpl diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java index 809e9ed5..090ccd32 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalElementImpl.java @@ -5,7 +5,6 @@ package functionalarchitecture.impl; import functionalarchitecture.Function; import functionalarchitecture.FunctionalArchitectureModel; import functionalarchitecture.FunctionalElement; -import functionalarchitecture.FunctionalInterface; import functionalarchitecture.FunctionalarchitecturePackage; import org.eclipse.emf.common.notify.Notification; @@ -44,7 +43,7 @@ public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container * @generated * @ordered */ - protected FunctionalInterface interface_; + protected functionalarchitecture.FunctionalInterface interface_; /** * The cached setting delegate for the '{@link #getModel() Model}' reference. @@ -80,7 +79,7 @@ public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container * * @generated */ - public FunctionalInterface getInterface() { + public functionalarchitecture.FunctionalInterface getInterface() { return interface_; } @@ -89,8 +88,8 @@ public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container * * @generated */ - public NotificationChain basicSetInterface(FunctionalInterface newInterface, NotificationChain msgs) { - FunctionalInterface oldInterface = interface_; + public NotificationChain basicSetInterface(functionalarchitecture.FunctionalInterface newInterface, NotificationChain msgs) { + functionalarchitecture.FunctionalInterface oldInterface = interface_; interface_ = newInterface; if (eNotificationRequired()) { ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, oldInterface, newInterface); @@ -104,13 +103,13 @@ public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container * * @generated */ - public void setInterface(FunctionalInterface newInterface) { + public void setInterface(functionalarchitecture.FunctionalInterface newInterface) { if (newInterface != interface_) { NotificationChain msgs = null; if (interface_ != null) - msgs = ((InternalEObject)interface_).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, FunctionalInterface.class, msgs); + msgs = ((InternalEObject)interface_).eInverseRemove(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, functionalarchitecture.FunctionalInterface.class, msgs); if (newInterface != null) - msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, FunctionalInterface.class, msgs); + msgs = ((InternalEObject)newInterface).eInverseAdd(this, FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE__ELEMENT, functionalarchitecture.FunctionalInterface.class, msgs); msgs = basicSetInterface(newInterface, msgs); if (msgs != null) msgs.dispatch(); } @@ -197,7 +196,7 @@ public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: if (interface_ != null) msgs = ((InternalEObject)interface_).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE, null, msgs); - return basicSetInterface((FunctionalInterface)otherEnd, msgs); + return basicSetInterface((functionalarchitecture.FunctionalInterface)otherEnd, msgs); case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__PARENT: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); @@ -264,7 +263,7 @@ public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container public void eSet(int featureID, Object newValue) { switch (featureID) { case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: - setInterface((FunctionalInterface)newValue); + setInterface((functionalarchitecture.FunctionalInterface)newValue); return; case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL: setModel((FunctionalArchitectureModel)newValue); @@ -285,7 +284,7 @@ public abstract class FunctionalElementImpl extends MinimalEObjectImpl.Container public void eUnset(int featureID) { switch (featureID) { case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__INTERFACE: - setInterface((FunctionalInterface)null); + setInterface((functionalarchitecture.FunctionalInterface)null); return; case FunctionalarchitecturePackage.FUNCTIONAL_ELEMENT__MODEL: setModel((FunctionalArchitectureModel)null); diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInterfaceImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInterfaceImpl.java index 20151886..be8f8700 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInterfaceImpl.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalInterfaceImpl.java @@ -4,7 +4,6 @@ package functionalarchitecture.impl; import functionalarchitecture.FunctionalData; import functionalarchitecture.FunctionalElement; -import functionalarchitecture.FunctionalInterface; import functionalarchitecture.FunctionalarchitecturePackage; import java.util.Collection; @@ -38,7 +37,7 @@ import org.eclipse.emf.ecore.util.InternalEList; * * @generated */ -public class FunctionalInterfaceImpl extends MinimalEObjectImpl.Container implements FunctionalInterface { +public class FunctionalInterfaceImpl extends MinimalEObjectImpl.Container implements functionalarchitecture.FunctionalInterface { /** * The cached value of the '{@link #getData() Data}' containment reference list. * diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java index 56ecfa25..726f7a32 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitectureFactoryImpl.java @@ -2,9 +2,15 @@ */ package functionalarchitecture.impl; -import functionalarchitecture.*; -import functionalarchitecture.FunctionalInterface; - +import functionalarchitecture.FAMTerminator; +import functionalarchitecture.Function; +import functionalarchitecture.FunctionType; +import functionalarchitecture.FunctionalArchitectureModel; +import functionalarchitecture.FunctionalInput; +import functionalarchitecture.FunctionalOutput; +import functionalarchitecture.FunctionalarchitectureFactory; +import functionalarchitecture.FunctionalarchitecturePackage; +import functionalarchitecture.InformationLink; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EDataType; import org.eclipse.emf.ecore.EObject; @@ -145,7 +151,7 @@ public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements F * * @generated */ - public FunctionalInterface createFunctionalInterface() { + public functionalarchitecture.FunctionalInterface createFunctionalInterface() { FunctionalInterfaceImpl functionalInterface = new FunctionalInterfaceImpl(); return functionalInterface; } diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java index 22c15533..110f3d6c 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/FunctionalarchitecturePackageImpl.java @@ -9,7 +9,6 @@ import functionalarchitecture.FunctionalArchitectureModel; import functionalarchitecture.FunctionalData; import functionalarchitecture.FunctionalElement; import functionalarchitecture.FunctionalInput; -import functionalarchitecture.FunctionalInterface; import functionalarchitecture.FunctionalOutput; import functionalarchitecture.FunctionalarchitectureFactory; import functionalarchitecture.FunctionalarchitecturePackage; @@ -128,7 +127,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * + * *

This method is used to initialize {@link FunctionalarchitecturePackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * @@ -142,7 +141,8 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F if (isInited) return (FunctionalarchitecturePackage)EPackage.Registry.INSTANCE.getEPackage(FunctionalarchitecturePackage.eNS_URI); // Obtain or create and register package - FunctionalarchitecturePackageImpl theFunctionalarchitecturePackage = (FunctionalarchitecturePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FunctionalarchitecturePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FunctionalarchitecturePackageImpl()); + Object registeredFunctionalarchitecturePackage = EPackage.Registry.INSTANCE.get(eNS_URI); + FunctionalarchitecturePackageImpl theFunctionalarchitecturePackage = registeredFunctionalarchitecturePackage instanceof FunctionalarchitecturePackageImpl ? (FunctionalarchitecturePackageImpl)registeredFunctionalarchitecturePackage : new FunctionalarchitecturePackageImpl(); isInited = true; @@ -155,7 +155,6 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F // Mark meta-data to indicate it can't be changed theFunctionalarchitecturePackage.freeze(); - // Update the registry and return the package EPackage.Registry.INSTANCE.put(FunctionalarchitecturePackage.eNS_URI, theFunctionalarchitecturePackage); return theFunctionalarchitecturePackage; @@ -377,6 +376,15 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F return (EReference)functionalDataEClass.getEStructuralFeatures().get(1); } + /** + * + * + * @generated + */ + public EAttribute getFunctionalData_Value() { + return (EAttribute)functionalDataEClass.getEStructuralFeatures().get(2); + } + /** * * @@ -446,6 +454,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F functionalDataEClass = createEClass(FUNCTIONAL_DATA); createEReference(functionalDataEClass, FUNCTIONAL_DATA__TERMINATOR); createEReference(functionalDataEClass, FUNCTIONAL_DATA__INTERFACE); + createEAttribute(functionalDataEClass, FUNCTIONAL_DATA__VALUE); // Create enums functionTypeEEnum = createEEnum(FUNCTION_TYPE); @@ -486,7 +495,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F // 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_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); @@ -494,7 +503,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F 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); + 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); @@ -503,9 +512,9 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F 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(functionalInterfaceEClass, functionalarchitecture.FunctionalInterface.class, "FunctionalInterface", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getFunctionalInterface_Data(), this.getFunctionalData(), this.getFunctionalData_Interface(), "data", null, 0, -1, functionalarchitecture.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, functionalarchitecture.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); @@ -516,6 +525,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F 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); + initEAttribute(getFunctionalData_Value(), ecorePackage.getEInt(), "value", null, 1, 1, FunctionalData.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize enums and add enum literals initEEnum(functionTypeEEnum, FunctionType.class, "FunctionType"); @@ -540,12 +550,12 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F * @generated */ protected void createEcoreAnnotations() { - String source = "http://www.eclipse.org/emf/2002/Ecore"; + String source = "http://www.eclipse.org/emf/2002/Ecore"; addAnnotation - (this, - source, + (this, + source, new String[] { - "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" + "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" }); } @@ -556,18 +566,18 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F * @generated */ protected void createOrgAnnotations() { - String source = "org.eclipse.viatra.query.querybasedfeature"; + String source = "org.eclipse.viatra.query.querybasedfeature"; addAnnotation - (getFunctionalElement_Model(), - source, + (getFunctionalElement_Model(), + source, new String[] { - "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.transima.fam.model" - }); + "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.transima.fam.model" + }); addAnnotation - (getFunction_Type(), - source, + (getFunction_Type(), + source, new String[] { - "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.transima.fam.type" + "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.transima.fam.type" }); } diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java index f990a7a4..9846bd62 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureAdapterFactory.java @@ -2,9 +2,15 @@ */ package functionalarchitecture.util; -import functionalarchitecture.*; -import functionalarchitecture.FunctionalInterface; - +import functionalarchitecture.FAMTerminator; +import functionalarchitecture.Function; +import functionalarchitecture.FunctionalArchitectureModel; +import functionalarchitecture.FunctionalData; +import functionalarchitecture.FunctionalElement; +import functionalarchitecture.FunctionalInput; +import functionalarchitecture.FunctionalOutput; +import functionalarchitecture.FunctionalarchitecturePackage; +import functionalarchitecture.InformationLink; import org.eclipse.emf.common.notify.Adapter; import org.eclipse.emf.common.notify.Notifier; @@ -89,7 +95,7 @@ public class FunctionalarchitectureAdapterFactory extends AdapterFactoryImpl { return createInformationLinkAdapter(); } @Override - public Adapter caseFunctionalInterface(FunctionalInterface object) { + public Adapter caseFunctionalInterface(functionalarchitecture.FunctionalInterface object) { return createFunctionalInterfaceAdapter(); } @Override diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java index b481a978..a1bbb480 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java +++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/util/FunctionalarchitectureSwitch.java @@ -2,9 +2,15 @@ */ package functionalarchitecture.util; -import functionalarchitecture.*; -import functionalarchitecture.FunctionalInterface; - +import functionalarchitecture.FAMTerminator; +import functionalarchitecture.Function; +import functionalarchitecture.FunctionalArchitectureModel; +import functionalarchitecture.FunctionalData; +import functionalarchitecture.FunctionalElement; +import functionalarchitecture.FunctionalInput; +import functionalarchitecture.FunctionalOutput; +import functionalarchitecture.FunctionalarchitecturePackage; +import functionalarchitecture.InformationLink; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; @@ -99,7 +105,7 @@ public class FunctionalarchitectureSwitch extends Switch { return result; } case FunctionalarchitecturePackage.FUNCTIONAL_INTERFACE: { - FunctionalInterface functionalInterface = (FunctionalInterface)theEObject; + functionalarchitecture.FunctionalInterface functionalInterface = (functionalarchitecture.FunctionalInterface)theEObject; T result = caseFunctionalInterface(functionalInterface); if (result == null) result = defaultCase(theEObject); return result; @@ -214,7 +220,7 @@ public class FunctionalarchitectureSwitch extends Switch { * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ - public T caseFunctionalInterface(FunctionalInterface object) { + public T caseFunctionalInterface(functionalarchitecture.FunctionalInterface object) { return null; } diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore index 3fab9a1d..720a9373 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore +++ b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.ecore @@ -60,6 +60,7 @@ containment="true" eOpposite="#//FAMTerminator/data"/> + diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.genmodel b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.genmodel index 9d89c145..bd428811 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.genmodel +++ b/Domains/Examples/ModelGenExampleFAM_plugin/model/FamMetamodel.genmodel @@ -43,6 +43,7 @@ + diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml index 07fd662c..3874e9f7 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml +++ b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml @@ -1,8 +1,11 @@ - - - - + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/model/yakindu_simplified.ecore b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/model/yakindu_simplified.ecore index 5999c4c7..51b0ca5b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/model/yakindu_simplified.ecore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/model/yakindu_simplified.ecore @@ -37,9 +37,4 @@ - - - - - diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcC.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcC.xtendbin new file mode 100644 index 00000000..0c2cbb6e Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcC.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcEDA.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcEDA.xtendbin new file mode 100644 index 00000000..056bbf88 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcEDA.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMPC.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMPC.xtendbin new file mode 100644 index 00000000..40092f54 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMPC.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric.xtendbin new file mode 100644 index 00000000..ae757bb6 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric2.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric2.xtendbin new file mode 100644 index 00000000..ed2b817f Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric2.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNA.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNA.xtendbin new file mode 100644 index 00000000..6d0da896 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNA.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDA.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDA.xtendbin new file mode 100644 index 00000000..a50e372c Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDA.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDC.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDC.xtendbin new file mode 100644 index 00000000..8d56931d Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDC.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRCNT.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRCNT.xtendbin new file mode 100644 index 00000000..0641ed7b Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRCNT.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRNUM.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRNUM.xtendbin new file mode 100644 index 00000000..99dd130b Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRNUM.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRTOT.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRTOT.xtendbin new file mode 100644 index 00000000..d397ff4c Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRTOT.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.gitignore b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.gitignore new file mode 100644 index 00000000..f2c394d6 --- /dev/null +++ b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.gitignore @@ -0,0 +1,20 @@ +/.CalculationsNA.java._trace +/.CalcNA.java._trace +/.CalcMPC.java._trace +/.CalcMetric.java._trace +/.CalcNDA.java._trace +/.CalcNDC.java._trace +/.CalcEDA.java._trace +/.CalcC.java._trace +/.CalcSQR.java._trace +/.CalcSQRtot.java._trace +/.CalcSQRMAX.java._trace +/.CalcSQRTOT.java._trace +/.CalcSQROSZ.java._trace +/.CalcSQROSZ2.java._trace +/.CalcSQROCOOL.java._trace +/.CalcSQRCNT.java._trace +/.CalcSQRNUM.java._trace +/.SQROSZ.java._trace +/.CalcSQRCC.java._trace +/.CalcMetric2.java._trace diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/CalcSQRMAX.xtend_ b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/CalcSQRMAX.xtend_ new file mode 100644 index 00000000..071abe38 --- /dev/null +++ b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/CalcSQRMAX.xtend_ @@ -0,0 +1,87 @@ +package ca.mcgill.ecse.dslreasoner.realistic.metrics.calculations + +import ca.mcgill.ecse.dslreasoner.realistic.metrics.examples.Util +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import java.util.HashMap +import java.util.Map +import java.util.Set +import org.eclipse.emf.ecore.EObject + +import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* + +class CalcSQRMAX extends CalcMetric{ + + // /////////////////// + // SQRMAX(v) = # squares containing v / (# neighbours of v * max # of neeighbours of any neighbour of v) + // /////////////////// + static val neighbourhoodComputer = new PartialInterpretation2ImmutableTypeLattice + + override calcFromModel(EObject model) { + val nodes = model.eResource.allContents.toList + + // fill HashSet + var Map> node2Neighbours = new HashMap + Util.fillWithNodes(nodes, node2Neighbours) + + // iterate over nodes and add connected nodes + Util.getNeighboursList(nodes, node2Neighbours) + + // Measurements + var totalC = 0.0 + var max2ndNeighbours = 0.0 + var num1stNeighbours = 0.0 + for (node : nodes) { + val neighbours = node.lookup(node2Neighbours) + num1stNeighbours = neighbours.size + max2ndNeighbours = 0 + var numSquares = 0.0 + for (neighbour1 : neighbours) { + for (neighbour2 : neighbours) { + if (neighbour1 != neighbour2) { + val neighsOfNeigh = neighbour1.lookup(node2Neighbours) + if (max2ndNeighbours < neighsOfNeigh.size) { + max2ndNeighbours = neighsOfNeigh.size + } + for (neighOfNeigh1 : neighsOfNeigh) { + if (neighOfNeigh1 != node && neighOfNeigh1.lookup(node2Neighbours).contains(neighbour2)) { +// print(neighbour1) +// print(" ") +// print(neighbour2) +// print(" ") +// print(neighOfNeigh1) +// println() + numSquares++ + } + } + + } + } + } +// println(node) + val num2ndNeighbours = num1stNeighbours * max2ndNeighbours + +// print("(" + numSquares + "x" + num2ndNeighbours) + var sqr = 0.0 + if (num2ndNeighbours != 0) { + sqr = numSquares / num2ndNeighbours + } + +// println("=" + sqr + ")") + totalC += sqr + } + val numNodes = nodes.length + val avgC = totalC / numNodes + + return avgC + } + + override calcFromNHLattice(PartialInterpretation pm) { + return 0.0 +// return getCfromNHLattice(pm, 2, v) + } + + override calcFromNHLattice(PartialInterpretation pm, Integer depth) { + return 0.0 + } +} \ No newline at end of file diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/CalcSQROSZ2.xtend_ b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/CalcSQROSZ2.xtend_ new file mode 100644 index 00000000..e999d62f --- /dev/null +++ b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/CalcSQROSZ2.xtend_ @@ -0,0 +1,69 @@ +package ca.mcgill.ecse.dslreasoner.realistic.metrics.calculations + +import ca.mcgill.ecse.dslreasoner.realistic.metrics.examples.Util +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import java.util.HashMap +import java.util.Map +import java.util.Set +import org.eclipse.emf.ecore.EObject + +import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* + +class CalcSQROSZ2 extends CalcMetric { + + // /////////////////// + // SQROSZ2(v) = # depth-4 paths that lead to v / total # depth-4 paths + // /////////////////// + static val neighbourhoodComputer = new PartialInterpretation2ImmutableTypeLattice + + override calcFromModel(EObject model) { + val nodes = model.eResource.allContents.toList + + // fill HashSet + var Map> node2Neighbours = new HashMap + Util.fillWithNodes(nodes, node2Neighbours) + + // iterate over nodes and add connected nodes + Util.getNeighboursList(nodes, node2Neighbours) + + // Measurements + var totalSQR = 0.0 + var totalDenom = 0.0 + var num4thNeighbours = 0.0 + for (node : nodes) { + val neighbours = node.lookup(node2Neighbours) + + for (neighbour1 : neighbours) { + val neighbours1 = neighbour1.lookup(node2Neighbours) + + for (neighbour2 : neighbours1) { + val neighbours2 = neighbour2.lookup(node2Neighbours) + + for (neighbour3 : neighbours2) { + val neighbours3 = neighbour3.lookup(node2Neighbours) + num4thNeighbours = neighbours3.size + + if (neighbours3.contains(node)) { + totalSQR += 1 + } + totalDenom += num4thNeighbours + } + } + } + + } + val avgSQR = totalSQR / totalDenom + + return avgSQR + } + + override calcFromNHLattice(PartialInterpretation pm) { + return 0.0 +// return getCfromNHLattice(pm, 2, v) + } + + override calcFromNHLattice(PartialInterpretation pm, Integer depth) { + return 0.0 + } +} \ No newline at end of file diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.FixModelURIs.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.FixModelURIs.xtendbin new file mode 100644 index 00000000..ed4f8ad0 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.FixModelURIs.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.MetricsCalculationUsingShapes.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.MetricsCalculationUsingShapes.xtendbin new file mode 100644 index 00000000..c06ce100 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.MetricsCalculationUsingShapes.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.Util.xtendbin b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.Util.xtendbin new file mode 100644 index 00000000..992d5b16 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/bin/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.Util.xtendbin differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcC.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcC.java._trace new file mode 100644 index 00000000..5ab4c0fb Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcC.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcEDA.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcEDA.java._trace new file mode 100644 index 00000000..605b2480 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcEDA.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMPC.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMPC.java._trace new file mode 100644 index 00000000..16ded94b Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMPC.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric.java._trace new file mode 100644 index 00000000..bd23cb35 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric2.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric2.java._trace new file mode 100644 index 00000000..71d80e38 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcMetric2.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNA.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNA.java._trace new file mode 100644 index 00000000..b423786d Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNA.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDA.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDA.java._trace new file mode 100644 index 00000000..cce23aec Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDA.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDC.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDC.java._trace new file mode 100644 index 00000000..e46f9600 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcNDC.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRCNT.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRCNT.java._trace new file mode 100644 index 00000000..9ce2edb2 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRCNT.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRNUM.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRNUM.java._trace new file mode 100644 index 00000000..cdfcef6e Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRNUM.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRTOT.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRTOT.java._trace new file mode 100644 index 00000000..0c8cc5d0 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/calculations/.CalcSQRTOT.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.FixModelURIs.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.FixModelURIs.java._trace new file mode 100644 index 00000000..edd88562 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.FixModelURIs.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.MetricsCalculationUsingShapes.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.MetricsCalculationUsingShapes.java._trace new file mode 100644 index 00000000..fc92b1d3 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.MetricsCalculationUsingShapes.java._trace differ diff --git a/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.Util.java._trace b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.Util.java._trace new file mode 100644 index 00000000..306c1361 Binary files /dev/null and b/Metrics/ca.mcgill.ecse.dslreasoner.realistic.metrics/xtend-gen/ca/mcgill/ecse/dslreasoner/realistic/metrics/examples/.Util.java._trace differ diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/META-INF/MANIFEST.MF b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/META-INF/MANIFEST.MF index 2abc6d50..fea5cc00 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/META-INF/MANIFEST.MF +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.visualisation/META-INF/MANIFEST.MF @@ -28,7 +28,7 @@ Require-Bundle: com.google.guava, org.apache.xerces;bundle-version="2.9.0", org.w3c.dom.svg;bundle-version="1.1.0", org.w3c.css.sac;bundle-version="1.3.1", - org.eclipse.m2e.maven.runtime.slf4j.simple;bundle-version="1.10.0" + org.eclipse.m2e.maven.runtime.slf4j.simple Import-Package: com.eclipsesource.v8;version="4.6.0", com.eclipsesource.v8.debug;version="4.6.0", com.eclipsesource.v8.utils;version="4.6.0", diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeModule.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeModule.xtendbin index 9ecc00be..313b9c2d 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeModule.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeModule.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeSetup.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeSetup.xtendbin index c144df13..97ee1913 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeSetup.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ide/xtend-gen/ca/mcgill/ecse/dslreasoner/ide/.VampireLanguageIdeSetup.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/.VampireLanguageUiModule.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/.VampireLanguageUiModule.xtendbin index 979c3c20..3424dc60 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/.VampireLanguageUiModule.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/.VampireLanguageUiModule.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/.VampireLanguageProposalProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/.VampireLanguageProposalProvider.xtendbin index 804df64e..3b0345ce 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/.VampireLanguageProposalProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/contentassist/.VampireLanguageProposalProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageDescriptionLabelProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageDescriptionLabelProvider.xtendbin index 50db435b..3a05d228 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageDescriptionLabelProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageDescriptionLabelProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageLabelProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageLabelProvider.xtendbin index 904ac639..418ee88d 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageLabelProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/labeling/.VampireLanguageLabelProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/outline/.VampireLanguageOutlineTreeProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/outline/.VampireLanguageOutlineTreeProvider.xtendbin index 082ca9ff..b4a32db5 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/outline/.VampireLanguageOutlineTreeProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/outline/.VampireLanguageOutlineTreeProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/quickfix/.VampireLanguageQuickfixProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/quickfix/.VampireLanguageQuickfixProvider.xtendbin index 5b68084b..89284901 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/quickfix/.VampireLanguageQuickfixProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language.ui/xtend-gen/ca/mcgill/ecse/dslreasoner/ui/quickfix/.VampireLanguageQuickfixProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageRuntimeModule.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageRuntimeModule.xtendbin index 7a054d7e..633cd134 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageRuntimeModule.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageRuntimeModule.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageStandaloneSetup.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageStandaloneSetup.xtendbin index fa4872a5..75f7c519 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageStandaloneSetup.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/.VampireLanguageStandaloneSetup.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin index 7cf878e2..b9ec3204 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/formatting2/.VampireLanguageFormatter.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/generator/.VampireLanguageGenerator.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/generator/.VampireLanguageGenerator.xtendbin index 38132416..3052ed33 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/generator/.VampireLanguageGenerator.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/generator/.VampireLanguageGenerator.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/scoping/.VampireLanguageScopeProvider.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/scoping/.VampireLanguageScopeProvider.xtendbin index 2b223516..67b4ffcc 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/scoping/.VampireLanguageScopeProvider.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/scoping/.VampireLanguageScopeProvider.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/validation/.VampireLanguageValidator.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/validation/.VampireLanguageValidator.xtendbin index 5cda3bdc..297a4f85 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/validation/.VampireLanguageValidator.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.language/xtend-gen/ca/mcgill/ecse/dslreasoner/validation/.VampireLanguageValidator.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireAnalyzerConfiguration.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireAnalyzerConfiguration.xtendbin index ec7ce5bf..d21e62df 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireAnalyzerConfiguration.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireAnalyzerConfiguration.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireSolver.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireSolver.xtendbin index 4d0599ac..6fa1ad33 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireSolver.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/.VampireSolver.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper.xtendbin index 885e7af1..16598303 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapperTrace.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapperTrace.xtendbin index 0793f3cb..760c5e1f 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapperTrace.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapperTrace.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ConstantMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ConstantMapper.xtendbin index 7fa7b29d..db66ddba 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ConstantMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ConstantMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ContainmentMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ContainmentMapper.xtendbin index 9e37d9b8..d6fe4078 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ContainmentMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ContainmentMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_RelationMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_RelationMapper.xtendbin index 2cca61d2..81468f27 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_RelationMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_RelationMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ScopeMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ScopeMapper.xtendbin index 20c757c7..d6924639 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ScopeMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_ScopeMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_Support.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_Support.xtendbin index 580ed0d8..9541df30 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_Support.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_Support.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper.xtendbin index 108846a5..bb87d246 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Logic2VampireLanguageMapper_TypeMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Vampire2LogicMapper.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Vampire2LogicMapper.xtendbin index 9a04f61e..61879add 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Vampire2LogicMapper.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.Vampire2LogicMapper.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireHandler.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireHandler.xtendbin index 1d3166e7..1d6d6da8 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireHandler.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireHandler.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation.xtendbin index 002097ed..3a055e01 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation.xtendbin differ diff --git a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation_FilteredTypes.xtendbin b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation_FilteredTypes.xtendbin index 769807cc..e7c2bd91 100644 Binary files a/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation_FilteredTypes.xtendbin and b/Solvers/Vampire-Solver/ca.mcgill.ecse.dslreasoner.vampire.reasoner/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/reasoner/builder/.VampireModelInterpretation_TypeInterpretation_FilteredTypes.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configs/fam.vsconfig b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configs/fam.vsconfig index e56cf30c..ca40f487 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configs/fam.vsconfig +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/configs/fam.vsconfig @@ -1,10 +1,10 @@ import epackage "FamMetamodel" -import viatra "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.FamPatterns" +//import viatra "ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.FamPatterns" generate { metamodel = { package fam } - constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries} - partial-model = { "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/famInstance.xmi"} +// constraints = { package ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries} +// partial-model = { "platform:/resource/ca.mcgill.ecse.dslreasoner.standalone.test/instanceModels/famInstance.xmi"} solver = ViatraSolver scope = { #node = 10 diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt index 28b10066..d66c8df1 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/errors.txt @@ -445,4 +445,109 @@ Error occured (UnsupportedOperationException): Can not transform pattern "ca.mcg 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 + org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)Error occured (NoSuchElementException): Cannot find entry with FQN ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.model + org.eclipse.viatra.query.runtime.registry.impl.GlobalRegistryView.getEntry(GlobalRegistryView.java:56) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.findQuerySpecification(QueryBasedFeatureSettingDelegateFactory.java:152) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.createSettingDelegate(QueryBasedFeatureSettingDelegateFactory.java:113) + org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:854) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl.(FunctionalElementImpl.java:57) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl.(FunctionImpl.java:64) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.createFunction(famFactoryImpl.java:125) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.create(famFactoryImpl.java:68) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:75) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)Error occured (NoSuchElementException): Cannot find entry with FQN ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.model + org.eclipse.viatra.query.runtime.registry.impl.GlobalRegistryView.getEntry(GlobalRegistryView.java:56) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.findQuerySpecification(QueryBasedFeatureSettingDelegateFactory.java:152) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.createSettingDelegate(QueryBasedFeatureSettingDelegateFactory.java:113) + org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:854) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl.(FunctionalElementImpl.java:57) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl.(FunctionImpl.java:64) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.createFunction(famFactoryImpl.java:125) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.create(famFactoryImpl.java:68) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:75) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)Error occured (NoSuchElementException): Cannot find entry with FQN ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.model + org.eclipse.viatra.query.runtime.registry.impl.GlobalRegistryView.getEntry(GlobalRegistryView.java:56) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.findQuerySpecification(QueryBasedFeatureSettingDelegateFactory.java:152) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.createSettingDelegate(QueryBasedFeatureSettingDelegateFactory.java:113) + org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:854) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl.(FunctionalElementImpl.java:57) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl.(FunctionImpl.java:64) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.createFunction(famFactoryImpl.java:125) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.create(famFactoryImpl.java:68) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:75) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)Error occured (NoSuchElementException): Cannot find entry with FQN ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.model + org.eclipse.viatra.query.runtime.registry.impl.GlobalRegistryView.getEntry(GlobalRegistryView.java:56) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.findQuerySpecification(QueryBasedFeatureSettingDelegateFactory.java:152) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.createSettingDelegate(QueryBasedFeatureSettingDelegateFactory.java:113) + org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:854) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl.(FunctionalElementImpl.java:57) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl.(FunctionImpl.java:64) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.createFunction(famFactoryImpl.java:125) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.create(famFactoryImpl.java:68) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:75) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)Error occured (NoSuchElementException): Cannot find entry with FQN ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.model + org.eclipse.viatra.query.runtime.registry.impl.GlobalRegistryView.getEntry(GlobalRegistryView.java:56) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.findQuerySpecification(QueryBasedFeatureSettingDelegateFactory.java:152) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.createSettingDelegate(QueryBasedFeatureSettingDelegateFactory.java:113) + org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:854) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl.(FunctionalElementImpl.java:57) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl.(FunctionImpl.java:64) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.createFunction(famFactoryImpl.java:125) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.create(famFactoryImpl.java:68) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:75) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)Error occured (NoSuchElementException): Cannot find entry with FQN ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.model + org.eclipse.viatra.query.runtime.registry.impl.GlobalRegistryView.getEntry(GlobalRegistryView.java:56) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.findQuerySpecification(QueryBasedFeatureSettingDelegateFactory.java:152) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.createSettingDelegate(QueryBasedFeatureSettingDelegateFactory.java:113) + org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:854) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl.(FunctionalElementImpl.java:57) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl.(FunctionImpl.java:64) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.createFunction(famFactoryImpl.java:125) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.create(famFactoryImpl.java:68) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:75) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)Error occured (NoSuchElementException): Cannot find entry with FQN ca.mcgill.ecse.dslreasoner.standalone.test.fam.queries.model + org.eclipse.viatra.query.runtime.registry.impl.GlobalRegistryView.getEntry(GlobalRegistryView.java:56) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.findQuerySpecification(QueryBasedFeatureSettingDelegateFactory.java:152) + org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory.createSettingDelegate(QueryBasedFeatureSettingDelegateFactory.java:113) + org.eclipse.emf.ecore.impl.EStructuralFeatureImpl.getSettingDelegate(EStructuralFeatureImpl.java:854) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionalElementImpl.(FunctionalElementImpl.java:57) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.FunctionImpl.(FunctionImpl.java:64) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.createFunction(famFactoryImpl.java:125) + ca.mcgill.ecse.dslreasoner.standalone.test.fam.impl.famFactoryImpl.create(famFactoryImpl.java:68) + hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore.transformInterpretation(Logic2Ecore.java:75) + hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:359) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:129) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:338) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:110) + hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor$1.run(ScriptExecutor.java:73) + org.eclipse.core.internal.jobs.Worker.run(Worker.java:60) \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated index b3223685..4ca1b4b0 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generated3valued.vql_deactivated @@ -55028,3 +55028,17614 @@ pattern refineRelation_type_attribute_Function( 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 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); + 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 mustInstanceOfFunctionalData_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); + 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 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 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 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 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 mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalArchitectureModel_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 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 mustInstanceOfFunctionalArchitectureModel_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 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 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 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 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 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 mustInstanceOfFunctionalOutput_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 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 mustInstanceOfFunctionalOutput_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 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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } + +////////// +// 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 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 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 mustInstanceOfFunctionalInput_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 mustInstanceOfInformationLink_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +} +pattern createObject_FunctionalArchitectureModel_class( + 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"); + find mayInstanceOfFunctionalArchitectureModel_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_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_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); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_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 mustInstanceOfInformationLink_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 mustInstanceOfFunctionalData_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 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 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 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 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 mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalData_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 mustInstanceOfFunctionalElement_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 mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); +} + +////////// +// 4.3 Relation refinement +////////// +pattern refineRelation_model_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalElement_class(problem,interpretation,from); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,to); + find mayInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); + neg find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,from,to); +} +pattern refineRelation_IncomingLinks_reference_FunctionalInput_and_to_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, oppositeInterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialInterpretation.partialrelationinterpretation(interpretation,oppositeInterpretation); + PartialRelationInterpretation.interpretationOf.name(oppositeInterpretation,"to reference InformationLink"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunctionalInput_class(problem,interpretation,from); + find mustInstanceOfInformationLink_class(problem,interpretation,to); + find mayInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); + neg find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,from,to); +} +pattern refineRelation_type_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + relationIterpretation:PartialRelationInterpretation, + from: DefinedElement, to: DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustExist(problem, interpretation, from); + find mustExist(problem, interpretation, to); + find mustInstanceOfFunction_class(problem,interpretation,from); + find mustInstanceOfFunctionType_enum(problem,interpretation,to); + find mayInRelationtype_attribute_Function(problem,interpretation,from,to); + neg find mustInRelationtype_attribute_Function(problem,interpretation,from,to); +} +import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" +import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" + +////////// +// 0. Util +////////// +private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { + PartialInterpretation.problem(interpretation,problem); +} + +///////////////////////// +// 0.1 Existence +///////////////////////// +private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find interpretation(problem,interpretation); + LogicProblem.elements(problem,element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); +} + +private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + find mustExist(problem,interpretation,element); +} or { + find interpretation(problem,interpretation); + neg find elementCloseWorld(element); + PartialInterpretation.openWorldElements(interpretation,element); +} + +private pattern elementCloseWorld(element:DefinedElement) { + PartialInterpretation.openWorldElements(i,element); + PartialInterpretation.maxNewElements(i,0); +} or { + Scope.targetTypeInterpretation(scope,interpretation); + PartialTypeInterpratation.elements(interpretation,element); + Scope.maxNewElements(scope,0); +} + +//////////////////////// +// 0.2 Equivalence +//////////////////////// +pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { + find mayExist(problem,interpretation,a); + find mayExist(problem,interpretation,b); + a == b; +} + +//////////////////////// +// 0.3 Required Patterns by TypeIndexer +//////////////////////// +private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); +} + +private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { + find interpretation(problem,interpretation); + LogicProblem.types(problem,type); + TypeDefinition.elements(type,element); +} or { + find interpretation(problem,interpretation); + find typeInterpretation(problem,interpretation,type,typeInterpretation); + PartialComplexTypeInterpretation.elements(typeInterpretation,element); +} + +private pattern isPrimitive(element: PrimitiveElement) { + PrimitiveElement(element); +} + +////////// +// 1. Problem-Specific Base Indexers +////////// +// 1.1 Type Indexers +////////// +// 1.1.1 primitive Type Indexers +////////// + +////////// +// 1.1.2 domain-specific Type Indexers +////////// +/** + * An element must be an instance of type "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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_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 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_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 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(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 mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFAMTerminator_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 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 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_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 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_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 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 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 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 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 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 mustInstanceOfFunctionalOutput_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 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 mustInstanceOfFunctionalOutput_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 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); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find 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 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 mustInstanceOfFunction_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 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); +} +pattern createObject_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_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_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( + 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"); + find mayInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalData_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +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 mustInstanceOfFunctionalOutput_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 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 mustInstanceOfFunctionalData_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 mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalElement_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalData_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 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 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 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 mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 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 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 mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalInput class". + */ +private pattern mustInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalInput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalInput class"); +} + +/** + * An element may be an instance of type "FunctionalInput class". + */ +private pattern mayInstanceOfFunctionalInput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 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 mustInstanceOfFunctionalArchitectureModel_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 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 mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalData_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionType enum". + */ +private pattern mustInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionType enum"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionType enum"); +} + +/** + * An element may be an instance of type "FunctionType enum". + */ +private pattern mayInstanceOfFunctionType_enum(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionType_enum(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class DefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class DefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ find mustInstanceOfFunctionalArchitectureModel_class_DefinedPart(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class UndefinedPart"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class UndefinedPart". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalData_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 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 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 mustInstanceOfFunctionalOutput_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 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 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_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalArchitectureModel class UndefinedPart"); + find mayInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_rootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"rootElements reference FunctionalArchitectureModel"); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class_by_subElements_reference_Function_with_parent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"subElements reference Function"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"parent reference FunctionalElement"); + find mustInstanceOfFunction_class(problem,interpretation,container); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayInRelationsubElements_reference_Function(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_Function_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"Function class"); + find mayInstanceOfFunction_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_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_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 mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalData_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_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 mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_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 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 mustInstanceOfFAMTerminator_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 mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_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 mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); } +/** + * An element must be an instance of type "Function class". + */ +private pattern mustInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"Function class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunction_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"Function class"); +} + +/** + * An element may be an instance of type "Function class". + */ +private pattern mayInstanceOfFunction_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFAMTerminator_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 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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewFunction_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunction_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FAMTerminator class". + */ +private pattern mustInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FAMTerminator class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FAMTerminator class"); +} + +/** + * An element may be an instance of type "FAMTerminator class". + */ +private pattern mayInstanceOfFAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_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 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 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 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 mustInstanceOfFunctionalInterface_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 mustInstanceOfFunctionalElement_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 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 mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInterface_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find 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); + 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 mustInstanceOfFAMTerminator_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 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 mustInstanceOfFunctionalElement_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 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 mustInstanceOfFunctionalElement_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 mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalElement_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 mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalElement_class(problem,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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalElement_class(problem,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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find 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 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 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 mustInstanceOfFunctionalData_class(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_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_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( + 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"); + find mayInstanceOfFunctionalArchitectureModel_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); +} + +////////// +// 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 mustInstanceOfFunctionalElement_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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalElement_class(problem,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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalElement_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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_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 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 mustInstanceOfFunctionalElement_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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); +} +pattern refineTypeTo_Function_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_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 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 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 mustInstanceOfInformationLink_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 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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_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 mustInstanceOfInformationLink_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(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_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 mustInstanceOfFAMTerminator_class(problem,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 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 mustInstanceOfFunctionalElement_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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find 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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find 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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find 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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find 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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find 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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_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 scopeDisallowsNewFunctionalData_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_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 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); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find 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 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 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 mustInstanceOfFunctionalData_class(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_FunctionalInterface_class_by_interface_reference_FunctionalElement_with_element_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"interface reference FunctionalElement"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"element reference FunctionalInterface"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,container); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayInRelationinterface_reference_FunctionalElement(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInterface_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInterface class"); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class_by_outgoingLinks_reference_FunctionalOutput_with_from_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"outgoingLinks reference FunctionalOutput"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"from reference InformationLink"); + find mustInstanceOfFunctionalOutput_class(problem,interpretation,container); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InformationLink_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InformationLink class"); + find mayInstanceOfInformationLink_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalArchitectureModel_class( + 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"); + find mayInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalInterface_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); +} +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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_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 mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_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 mustInstanceOfInformationLink_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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunction_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalElement_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalElement_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mustInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalArchitectureModel class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalArchitectureModel class"); +} + +/** + * An element may be an instance of type "FunctionalArchitectureModel class". + */ +private pattern mayInstanceOfFunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfInformationLink_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 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 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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 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 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 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 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 mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find scopeDisallowsNewInformationLink_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find 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 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 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 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 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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find 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 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 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 mustInstanceOfFunctionalData_class(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_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( + 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"); + find mayInstanceOfFunctionalArchitectureModel_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); +} + +////////// +// 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 mustInstanceOfFunctionalInterface_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); +} +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 mustInstanceOfFunctionalInterface_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); +} +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 mustInstanceOfFunctionalInterface_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); +} +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 mustInstanceOfFunctionalInterface_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); +} +pattern refineTypeTo_FunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalInterface_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); +} + +////////// +// 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalData_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 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 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 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 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 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 mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalData_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find 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 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 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 mustInstanceOfFunctionalData_class(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_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( + 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"); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalInput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalInput class"); + find mayInstanceOfFunctionalInput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class_by_terminator_reference_FunctionalData_with_data_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"terminator reference FunctionalData"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"data reference FAMTerminator"); + find mustInstanceOfFunctionalData_class(problem,interpretation,container); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayInRelationterminator_reference_FunctionalData(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FAMTerminator_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FAMTerminator class"); + find mayInstanceOfFAMTerminator_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +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 mustInstanceOfFunction_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 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 mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalElement_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 mustInstanceOfInformationLink_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_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 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 mustInstanceOfFunctionalElement_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 mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalElement_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 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 mustInstanceOfFunctionalElement_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 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 mustInstanceOfFunctionalData_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 mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalData_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 mustInstanceOfFAMTerminator_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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(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 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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(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 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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 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(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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfInformationLink_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfFunctionalInterface_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 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 mustInstanceOfInformationLink_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 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 mustInstanceOfInformationLink_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 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 mustInstanceOfInformationLink_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 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 mustInstanceOfInformationLink_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 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 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 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 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 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 +////////// +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam queries terminatorAndInformation +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_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_queries_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_queries_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 queries rootElements +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_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_queries_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_queries_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 queries parent +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_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_queries_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_queries_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; +} + +////////// +// 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_queries_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_terminatorAndInformation(problem,interpretation,var_T,var_I); +} + +////////// +// 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 +////////// +pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_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 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 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 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 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_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_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_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_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); +} + +////////// +// 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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(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 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 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 mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalData_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfInformationLink_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 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 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(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 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 mustInstanceOfFAMTerminator_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 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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunction_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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunction_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 mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(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(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_UndefinedPart(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(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 mustInstanceOfFunctionalOutput_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 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 mustInstanceOfFunctionalOutput_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 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 mustInstanceOfFunctionalInput_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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalOutput_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 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 mustInstanceOfFunctionalOutput_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 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 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 +////////// +// Must, May and Current queries for pattern ca mcgill ecse dslreasoner standalone test fam queries terminatorAndInformation +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_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_queries_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_queries_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 queries rootElements +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_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_queries_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_queries_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 queries parent +private pattern mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_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_queries_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_queries_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; +} + +////////// +// 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_queries_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find mustInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_terminatorAndInformation(problem,interpretation,var_T,var_I); +} + +////////// +// 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 +////////// +pattern unfinishedBy_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_terminatorAndInformation(problem:LogicProblem, interpretation:PartialInterpretation, + var_T, var_I) +{ + find currentInRelation_pattern_ca_mcgill_ecse_dslreasoner_standalone_test_fam_queries_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 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 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 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 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_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_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_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_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_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 mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_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 mustInstanceOfFunctionalArchitectureModel_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_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 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_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_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 mustInstanceOfFunctionalOutput_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); +} + +////////// +// 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 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 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 mustInstanceOfFAMTerminator_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 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 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(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(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 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 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 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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find 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 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 mustInstanceOfFAMTerminator_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 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 mustInstanceOfFAMTerminator_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 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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_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); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find 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 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 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 mustInstanceOfFunctionalData_class(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_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_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_FunctionalArchitectureModel_class( + 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"); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class_by_data_reference_FunctionalInterface_with_interface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, + container:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"data reference FunctionalInterface"); + PartialInterpretation.partialrelationinterpretation(interpretation,inverseInterpretation); + PartialRelationInterpretation.interpretationOf.name(inverseInterpretation,"interface reference FunctionalData"); + find mustInstanceOfFunctionalInterface_class(problem,interpretation,container); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayInRelationdata_reference_FunctionalInterface(problem,interpretation,container,newObject); + find mustExist(problem, interpretation, container); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_FunctionalOutput_class( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"FunctionalOutput class"); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_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_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 mustInstanceOfFunctionalInterface_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_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 mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_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_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 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 mustInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalElement_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 mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_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 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 mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunction_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 mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunction_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 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 scopeDisallowsNewFunctionalArchitectureModel_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_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 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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFAMTerminator_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFAMTerminator_class(problem,interpretation,element); } +/** + * An element must be an instance of type "InformationLink class". + */ +private pattern mustInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"InformationLink class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"InformationLink class"); +} + +/** + * An element may be an instance of type "InformationLink class". + */ +private pattern mayInstanceOfInformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_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 mustInstanceOfFAMTerminator_class(problem,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 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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalInput_class(problem, interpretation); + neg find isPrimitive(element); +} or +{ find mustInstanceOfFunctionalInput_class(problem,interpretation,element); } +/** + * An element must be an instance of type "FunctionalOutput class". + */ +private pattern mustInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { + Type.name(type,"FunctionalOutput class"); + find directInstanceOf(problem,interpretation,element,type); +} +private pattern scopeDisallowsNewFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem,interpretation); + PartialInterpretation.scopes(interpretation,scope); + Scope.targetTypeInterpretation(scope,typeInterpretation); + Scope.maxNewElements(scope,0); + PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); + Type.name(type,"FunctionalOutput class"); +} + +/** + * An element may be an instance of type "FunctionalOutput class". + */ +private pattern mayInstanceOfFunctionalOutput_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find scopeDisallowsNewFunctionalOutput_class(problem, interpretation); + neg find isPrimitive(element); +} or { + find interpretation(problem,interpretation); + PartialInterpretation.openWorldElements(interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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 mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); + neg find 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); } + +////////// +// 1.2 Relation Declaration Indexers +////////// +/** + * Matcher for detecting tuples t where []interface reference FunctionalElement(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalElement(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []model reference FunctionalElement(source,target) + */ +private pattern mustInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>model reference FunctionalElement(source,target) + */ +private pattern mayInRelationmodel_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []parent reference FunctionalElement(source,target) + */ +private pattern mustInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"parent reference FunctionalElement"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>parent reference FunctionalElement(source,target) + */ +private pattern mayInRelationparent_reference_FunctionalElement( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalElement_class(problem,interpretation,source); + find mayInstanceOfFunction_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationparent_reference_FunctionalElement(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mustInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"rootElements reference FunctionalArchitectureModel"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>rootElements reference FunctionalArchitectureModel(source,target) + */ +private pattern mayInRelationrootElements_reference_FunctionalArchitectureModel( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []subElements reference Function(source,target) + */ +private pattern mustInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"subElements reference Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>subElements reference Function(source,target) + */ +private pattern mayInRelationsubElements_reference_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationparent_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FAMTerminator(source,target) + */ +private pattern mustInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FAMTerminator"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FAMTerminator(source,target) + */ +private pattern mayInRelationdata_reference_FAMTerminator( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFAMTerminator_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FAMTerminator(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []from reference InformationLink(source,target) + */ +private pattern mustInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"from reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>from reference InformationLink(source,target) + */ +private pattern mayInRelationfrom_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalOutput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationfrom_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []to reference InformationLink(source,target) + */ +private pattern mustInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>to reference InformationLink(source,target) + */ +private pattern mayInRelationto_reference_InformationLink( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfInformationLink_class(problem,interpretation,source); + find mayInstanceOfFunctionalInput_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationto_reference_InformationLink(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []data reference FunctionalInterface(source,target) + */ +private pattern mustInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"data reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>data reference FunctionalInterface(source,target) + */ +private pattern mayInRelationdata_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalData_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []element reference FunctionalInterface(source,target) + */ +private pattern mustInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"element reference FunctionalInterface"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>element reference FunctionalInterface(source,target) + */ +private pattern mayInRelationelement_reference_FunctionalInterface( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInterface_class(problem,interpretation,source); + find mayInstanceOfFunctionalElement_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationelement_reference_FunctionalInterface(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mustInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"IncomingLinks reference FunctionalInput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>IncomingLinks reference FunctionalInput(source,target) + */ +private pattern mayInRelationIncomingLinks_reference_FunctionalInput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalInput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); +} or { + find mustInRelationIncomingLinks_reference_FunctionalInput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mustInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"outgoingLinks reference FunctionalOutput"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>outgoingLinks reference FunctionalOutput(source,target) + */ +private pattern mayInRelationoutgoingLinks_reference_FunctionalOutput( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalOutput_class(problem,interpretation,source); + find mayInstanceOfInformationLink_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationfrom_reference_InformationLink(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []terminator reference FunctionalData(source,target) + */ +private pattern mustInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"terminator reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>terminator reference FunctionalData(source,target) + */ +private pattern mayInRelationterminator_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFAMTerminator_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // There are "numberOfExistingReferences" currently existing instances of the reference to the target, + // the upper bound of the opposite reference multiplicity should be considered. + numberOfExistingOppositeReferences == count find mustInRelationdata_reference_FAMTerminator(problem,interpretation,target,_); + check(numberOfExistingOppositeReferences < 1); + // The reference is containment, then a new reference cannot be create if: + // 1. Multiple parents + neg find mustContains4(problem,interpretation,_,target); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []interface reference FunctionalData(source,target) + */ +private pattern mustInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"interface reference FunctionalData"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>interface reference FunctionalData(source,target) + */ +private pattern mayInRelationinterface_reference_FunctionalData( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunctionalData_class(problem,interpretation,source); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); + // The eOpposite of the reference is containment, then a referene cannot be created if + // 1. Multiple parents + neg find mustContains4(problem,interpretation,source,_); + // 2. Circle in the containment hierarchy + neg find mustTransitiveContains(source,target); +} or { + find mustInRelationinterface_reference_FunctionalData(problem,interpretation,source,target); +} +/** + * Matcher for detecting tuples t where []type attribute Function(source,target) + */ +private pattern mustInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + PartialRelationInterpretation.relationlinks(relationIterpretation,link); + BinaryElementRelationLink.param1(link,source); + BinaryElementRelationLink.param2(link,target); +} +/** + * Matcher for detecting tuples t where <>type attribute Function(source,target) + */ +private pattern mayInRelationtype_attribute_Function( + problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target:DefinedElement) +{ + find interpretation(problem,interpretation); + // The two endpoint of the link have to exist + find mayExist(problem, interpretation, source); + find mayExist(problem, interpretation, target); + // Type consistency + find mayInstanceOfFunction_class(problem,interpretation,source); + find mayInstanceOfFunctionType_enum(problem,interpretation,target); + // There are "numberOfExistingReferences" currently existing instances of the reference from the source, + // the upper bound of the multiplicity should be considered. + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,source,_); + check(numberOfExistingReferences < 1); +} or { + find mustInRelationtype_attribute_Function(problem,interpretation,source,target); +} + +////////// +// 1.3 Relation Definition Indexers +////////// + +////////// +// 1.4 Containment Indexer +////////// +private pattern mustContains2(source: DefinedElement, target: DefinedElement) { + find mustContains4(_,_,source,target); +} + +private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, + source: DefinedElement, target: DefinedElement) + { find mustInRelationinterface_reference_FunctionalElement(problem,interpretation,source,target); }or + + { find mustInRelationrootElements_reference_FunctionalArchitectureModel(problem,interpretation,source,target); }or + + { find mustInRelationsubElements_reference_Function(problem,interpretation,source,target); }or + + { find mustInRelationdata_reference_FunctionalInterface(problem,interpretation,source,target); }or + + { find mustInRelationoutgoingLinks_reference_FunctionalOutput(problem,interpretation,source,target); }or + + { find mustInRelationterminator_reference_FunctionalData(problem,interpretation,source,target); } + +private pattern mustTransitiveContains(source,target) { + find mustContains2+(source,target); +} + +////////// +// 2. Invalidation Indexers +////////// +// 2.1 Invalidated by WF Queries +////////// + +////////// +// 3. Unfinishedness Indexers +////////// +// 3.1 Unfinishedness Measured by Multiplicity +////////// +pattern unfinishedLowerMultiplicity_model_reference_FunctionalElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"model reference FunctionalElement"); + find mustInstanceOfFunctionalElement_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationmodel_reference_FunctionalElement(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_to_reference_InformationLink(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"to reference InformationLink"); + find mustInstanceOfInformationLink_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationto_reference_InformationLink(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} +pattern unfinishedLowerMultiplicity_type_attribute_Function(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { + find interpretation(problem,interpretation); + PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"type attribute Function"); + find mustInstanceOfFunction_class(problem,interpretation,object); + numberOfExistingReferences == count find mustInRelationtype_attribute_Function(problem,interpretation,object,_); + check(numberOfExistingReferences < 1); + missingMultiplicity == eval(1-numberOfExistingReferences); +} + +////////// +// 3.2 Unfinishedness Measured by WF Queries +////////// + +////////// +// 4. Refinement Indexers +////////// +// 4.1 Object constructors +////////// +private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) +{ + find interpretation(problem,interpretation); + find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,root); + find mustExist(problem, interpretation, root); +}or{ + find interpretation(problem,interpretation); + find 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 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 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 mustInstanceOfFunctionalData_class(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_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_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( + 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"); + find mayInstanceOfFunctionalArchitectureModel_class(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} + +////////// +// 4.2 Type refinement +////////// +pattern refineTypeTo_FunctionalInterface_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +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 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 mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FAMTerminator_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_InformationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInterface_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalData_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +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 mustInstanceOfFunctionalOutput_class(problem,interpretation,element); + neg find mustInstanceOfFAMTerminator_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalInput_class(problem,interpretation,element); + neg find mustInstanceOfInformationLink_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalElement_class(problem,interpretation,element); + neg find mustInstanceOfFunctionalArchitectureModel_class(problem,interpretation,element); +} +pattern refineTypeTo_FunctionalArchitectureModel_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfFunctionalArchitectureModel_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 mustInstanceOfFunctionalElement_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); +} diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem index 061a233a..296c3a70 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/debug/generation.logicproblem @@ -1,7 +1,7 @@ - + - + @@ -10,8 +10,6 @@ - - @@ -496,22 +494,6 @@ - - - - - - - - - - - - - - - - @@ -572,53 +554,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -638,6 +577,4 @@ - - 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 index 3f2640d6..55020b90 100644 --- 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 @@ -1,5 +1,5 @@ - + @@ -86,7 +86,6 @@ - @@ -110,9 +109,6 @@ - - - @@ -126,5 +122,4 @@ - diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt index 6386e508..c7112d9d 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/log.txt @@ -1 +1 @@ -Model generation startedModel generation startedModel generation startedModel generation startedProblem is consistent, 5 models are generated!Model generation startedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedModel generation startedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finished \ No newline at end of file +Model generation startedModel generation startedModel generation startedModel generation startedProblem is consistent, 5 models are generated!Model generation startedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedModel generation startedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finishedModel generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Model generation startedProblem is consistent, 5 models are generated!Models: [1.xmi][2.xmi][3.xmi][4.xmi][5.xmi]Visualisations: [1.gml][2.gml][3.gml][4.gml][5.gml]Visualisations: [1.png][2.png][3.png][4.png][5.png]Model generation finished \ No newline at end of file diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml index b0a86a61..a40633d7 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.gml @@ -11696,3 +11696,3432 @@ graph ] ] ] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + 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 10 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 8 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 8 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 7 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png index 158ebb0f..a5fb7f02 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi index 3dcec4a4..ec5dbad1 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/1.xmi @@ -1,13 +1,11 @@ - - - - - - - - - - - - + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml index 62441d63..e581a1a4 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.gml @@ -11699,3 +11699,2509 @@ graph ] ] ] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + 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 10 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 8 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 7 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png index 0222b4b1..25c578df 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi index 144e4fc5..16f82b48 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/2.xmi @@ -1,12 +1,11 @@ - - - - - - - - - - - + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml index e046559b..9ae40173 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.gml @@ -11660,3 +11660,2472 @@ graph ] ] ] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + 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 10 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 8 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 7 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png index a551c9fc..61e37719 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi index 9e8efc63..fbbc6cb4 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/3.xmi @@ -1,12 +1,11 @@ - - - - - - - - - - - + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml index f41692fc..8b6731b7 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.gml @@ -11761,3 +11761,2508 @@ graph ] ] ] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + 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 10 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 8 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 10 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 7 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png index c58be27f..b63f378c 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi index c5049270..950fe6a2 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/4.xmi @@ -1,12 +1,11 @@ - - - - - - - - - - - + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml index 9bbf93f7..a31b5aea 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.gml @@ -11873,3 +11873,2508 @@ graph ] ] ] +graph +[ + node + [ + id 0 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Root literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 1 + graphics + [ + w 297.0 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Intermediate literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 2 + graphics + [ + w 226.60000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "Leaf literal FunctionType" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FunctionType enum + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 3 + graphics + [ + w 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 177.10000000000002 + 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 " + InformationLink class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + 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 10 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 7 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "from reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "to reference InformationLink" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 11 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "IncomingLinks reference FunctionalInput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "outgoingLinks reference FunctionalOutput" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 8 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 7 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + 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 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 4 + 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 5 + graphics + [ + w 207.9 + 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 " + FunctionalInterface class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 6 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 7 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 8 + graphics + [ + w 177.10000000000002 + 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 " + FunctionalInput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 9 + graphics + [ + w 184.8 + 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 " + FunctionalOutput class + FunctionalData class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 10 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 11 + graphics + [ + w 161.70000000000002 + h 40 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "null" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + FAMTerminator class + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + + node + [ + id 12 + 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 13 + 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 14 + 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 15 + graphics + [ + w 103.4 + h 26 + type "rectangle" + fill "#FFFFFF" + fill2 "#FFFFFF" + outline "#000000" + ] + LabelGraphics + [ + text "New Objects" + outline "#000000" + fill "#FFFFFF" + fontSize 16 + fontName "Monospace" + autoSizePolicy "node_width" + anchor "t" + borderDistance 0.0 + ] + LabelGraphics + [ + text " + " + fontSize 14 + fontName "Consolas" + alignment "left" + anchor "tl" + borderDistance 6 + ] + ] + edge + [ + source 7 + target 6 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 10 + target 8 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 11 + target 9 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FAMTerminator" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 6 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 8 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 5 + target 9 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "data reference FunctionalInterface" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 7 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 10 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 11 + graphics + [ + fill "#000000" + width 3 + targetArrow "standard" + ] + LabelGraphics + [ + text "terminator reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 6 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 8 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] + edge + [ + source 9 + target 5 + graphics + [ + fill "#000000" + targetArrow "standard" + ] + LabelGraphics + [ + text "interface reference FunctionalData" + fontSize 14 + fontName "Consolas" + configuration "AutoFlippingLabel" + model "six_pos" + position "thead" + ] + ] +] diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png index a141edb0..c45fa07b 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png and b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.png differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi index c5049270..777693ab 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/models/5.xmi @@ -1,12 +1,12 @@ - - - - - - - - - - - + + + + + + + + + + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv index 9f61f0e9..71fff7c5 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv +++ b/Tests/ca.mcgill.ecse.dslreasoner.standalone.test/outputs/fam/statistics.csv @@ -26,3 +26,9 @@ Task;Run;Result;Domain to logic transformation time;Logic to solver transformati 1;1;ModelResultImpl;16;1673;1881;10488189500;142;240;275;311;375;191;21;7;0;5 Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;_Solution3FoundAt;_Solution4FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime 1;1;ModelResultImpl;47;1835;2309;9517642900;281;405;544;574;580;325;17;13;0;6 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;_Solution3FoundAt;_Solution4FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;1139;4621;3347;14457060200;924;988;1031;1071;1121;689;564;74;0;9 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;_Solution3FoundAt;_Solution4FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;4;2111;1772;15065362500;113;152;185;238;303;159;18;7;0;5 +Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;_Solution1FoundAt;_Solution2FoundAt;_Solution3FoundAt;_Solution4FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime +1;1;ModelResultImpl;3;1388;1240;8813500300;67;71;96;122;145;86;7;3;0;3 diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/Fam.logicproblem b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/Fam.logicproblem index f86a2f3c..48991faa 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/Fam.logicproblem +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/output/FAMTest/Fam.logicproblem @@ -1,7 +1,7 @@ - + @@ -10,8 +10,6 @@ - - @@ -496,6 +494,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -556,11 +603,14 @@ + + + + - - + @@ -580,4 +630,6 @@ + + diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.xtend b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.xtend index a7da818c..17f9ae5e 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.xtend +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/src/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.xtend @@ -1,5 +1,6 @@ package ca.mcgill.ecse.dslreasoner.vampire.icse +import ca.mcgill.ecse.dslreasoner.vampire.reasoner.BackendSolver import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolver import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration import functionalarchitecture.FAMTerminator @@ -8,7 +9,6 @@ import functionalarchitecture.FunctionalArchitectureModel import functionalarchitecture.FunctionalInterface import functionalarchitecture.FunctionalOutput import functionalarchitecture.FunctionalarchitecturePackage -//import hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel @@ -16,7 +16,6 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic -import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2PartialInterpretation import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace @@ -46,7 +45,7 @@ class FAMTest { // Load DSL val metamodel = GeneralTest.loadMetamodel(FunctionalarchitecturePackage.eINSTANCE) - val partialModel = GeneralTest.loadPartialModel(inputs, "FAM/FaModel.xmi") +// val partialModel = GeneralTest.loadPartialModel(inputs, "FAM/FaModel.xmi") // val queries = GeneralTest.loadQueries(metamodel, FamPatterns.instance) val queries = null @@ -54,7 +53,7 @@ class FAMTest { val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, new Ecore2LogicConfiguration()) var problem = modelGenerationProblem.output - problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).output +// problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).output // problem = viatra2Logic.transformQueries(queries, modelGenerationProblem, new Viatra2LogicConfiguration).output workspace.writeModel(problem, "Fam.logicproblem") @@ -96,6 +95,7 @@ class FAMTest { it.typeScopes.maxNewElements = 10//25 // if(typeMapMin.size != 0) it.typeScopes.minNewElementsByType = typeMapMin // if(typeMapMax.size != 0) it.typeScopes.maxNewElementsByType = typeMapMax + it.solver = BackendSolver::LOCVAMP it.contCycleLevel = 5 it.uniquenessDuplicates = false ] @@ -110,25 +110,25 @@ class FAMTest { // Literal(modelGenerationProblem.trace, ecore2Logic.allLiteralsInScope(modelGenerationProblem.trace).get(0) ) // ) // println((ecore2Logic.allAttributesInScope(modelGenerationProblem.trace)).get(0).EAttributeType) - print(interpretations.class) - for (interpretation : interpretations) { - val model = logic2Ecore.transformInterpretation(interpretation, modelGenerationProblem.trace) - workspace.writeModel(model, "model.xmi") - -// val representation = im2pi.transform(modelGenerationProblem, model.eAllContents.toList, false)//solution.representation.get(0) // TODO: fix for multiple represenations -// if (representation instanceof PartialInterpretation) { -// val vis1 = new PartialInterpretation2Gml -// val gml = vis1.transform(representation) -// workspace.writeText("model.gml", gml) +// print(interpretations.class) +// for (interpretation : interpretations) { +// val model = logic2Ecore.transformInterpretation(interpretation, modelGenerationProblem.trace) +// workspace.writeModel(model, "model.xmi") // -// val vis2 = new GraphvizVisualiser -// val dot = vis2.visualiseConcretization(representation) -// dot.writeToFile(workspace, "model.png") -// } else { -// println("ERROR") -// } -// look here: hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor - } +//// val representation = im2pi.transform(modelGenerationProblem, model.eAllContents.toList, false)//solution.representation.get(0) // TODO: fix for multiple represenations +//// if (representation instanceof PartialInterpretation) { +//// val vis1 = new PartialInterpretation2Gml +//// val gml = vis1.transform(representation) +//// workspace.writeText("model.gml", gml) +//// +//// val vis2 = new GraphvizVisualiser +//// val dot = vis2.visualiseConcretization(representation) +//// dot.writeToFile(workspace, "model.png") +//// } else { +//// println("ERROR") +//// } +//// look here: hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor +// } // transform interpretation to ecore, and it is easy from there /*/ @@ -147,7 +147,6 @@ class FAMTest { var totalTimeMin = (System.currentTimeMillis - startTime) / 60000 var totalTimeSec = ((System.currentTimeMillis - startTime) / 1000) % 60 - println("Problem solved") println("Time was: " + totalTimeMin + ":" + totalTimeSec) } diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin index 197ef5c9..7ccbe59f 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.EcoreTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin index 52c819c4..b03f527f 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FAMTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin index b3b15fba..6bc303df 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.FileSystemTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin index 03bcbad7..a34d7d3b 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.GeneralTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin index 0f06a39a..a8c5f173 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/.YakinduTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.java b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.java index 8cd08fd8..cd9ba3c1 100644 --- a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.java +++ b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/icse/FAMTest.java @@ -1,6 +1,7 @@ package ca.mcgill.ecse.dslreasoner.vampire.icse; import ca.mcgill.ecse.dslreasoner.vampire.icse.GeneralTest; +import ca.mcgill.ecse.dslreasoner.vampire.reasoner.BackendSolver; import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolver; import ca.mcgill.ecse.dslreasoner.vampire.reasoner.VampireSolverConfiguration; import functionalarchitecture.FAMTerminator; @@ -27,8 +28,6 @@ import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; import org.eclipse.xtend2.lib.StringConcatenation; @@ -59,13 +58,11 @@ public class FAMTest { map.put("logicproblem", _xMIResourceFactoryImpl); InputOutput.println("Input and output workspaces are created"); final EcoreMetamodelDescriptor metamodel = GeneralTest.loadMetamodel(FunctionalarchitecturePackage.eINSTANCE); - final EList partialModel = GeneralTest.loadPartialModel(inputs, "FAM/FaModel.xmi"); final Object queries = null; InputOutput.println("DSL loaded"); Ecore2LogicConfiguration _ecore2LogicConfiguration = new Ecore2LogicConfiguration(); final TracedOutput modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel, _ecore2LogicConfiguration); LogicProblem problem = modelGenerationProblem.getOutput(); - problem = instanceModel2Logic.transform(modelGenerationProblem, partialModel).getOutput(); workspace.writeModel(problem, "Fam.logicproblem"); InputOutput.println("Problem created"); long startTime = System.currentTimeMillis(); @@ -86,6 +83,7 @@ public class FAMTest { it.documentationLevel = DocumentationLevel.FULL; it.typeScopes.minNewElements = 8; it.typeScopes.maxNewElements = 10; + it.solver = BackendSolver.LOCVAMP; it.contCycleLevel = 5; it.uniquenessDuplicates = false; }; @@ -93,13 +91,6 @@ public class FAMTest { LogicResult solution = reasoner.solve(problem, vampireConfig, workspace); InputOutput.println("Problem solved"); List interpretations = reasoner.getInterpretations(((ModelResult) solution)); - InputOutput.>print(interpretations.getClass()); - for (final LogicModelInterpretation interpretation : interpretations) { - { - final EObject model = logic2Ecore.transformInterpretation(interpretation, modelGenerationProblem.getTrace()); - workspace.writeModel(model, "model.xmi"); - } - } long _currentTimeMillis = System.currentTimeMillis(); long _minus = (_currentTimeMillis - startTime); long totalTimeMin = (_minus / 60000); @@ -107,7 +98,6 @@ public class FAMTest { long _minus_1 = (_currentTimeMillis_1 - startTime); long _divide = (_minus_1 / 1000); long totalTimeSec = (_divide % 60); - InputOutput.println("Problem solved"); InputOutput.println(((("Time was: " + Long.valueOf(totalTimeMin)) + ":") + Long.valueOf(totalTimeSec))); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin index 5dcd3133..9a2c84d7 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.MedicalSystem.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin index 68ade593..f39505b0 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.SimpleRun.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin index 80e7ebe0..51d32da7 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.vampire.test/xtend-gen/ca/mcgill/ecse/dslreasoner/vampire/test/.VampireTest.xtendbin differ diff --git a/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/xtend-gen/ca/mcgill/ecse/dslreasoner/yakindu/test/.YakinduTest.xtendbin b/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/xtend-gen/ca/mcgill/ecse/dslreasoner/yakindu/test/.YakinduTest.xtendbin index 139dcdc7..0278755b 100644 Binary files a/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/xtend-gen/ca/mcgill/ecse/dslreasoner/yakindu/test/.YakinduTest.xtendbin and b/Tests/ca.mcgill.ecse.dslreasoner.yakindu.test/xtend-gen/ca/mcgill/ecse/dslreasoner/yakindu/test/.YakinduTest.xtendbin differ -- cgit v1.2.3-54-g00ecf