(InformationLink.class, this, FunctionalarchitecturePackage.FUNCTIONAL_OUTPUT__OUTGOING_LINKS, FunctionalarchitecturePackage.INFORMATION_LINK__FROM);
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..9c9f495a 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;
@@ -105,6 +111,7 @@ public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements F
*
* @generated
*/
+ @Override
public FunctionalArchitectureModel createFunctionalArchitectureModel() {
FunctionalArchitectureModelImpl functionalArchitectureModel = new FunctionalArchitectureModelImpl();
return functionalArchitectureModel;
@@ -115,6 +122,7 @@ public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements F
*
* @generated
*/
+ @Override
public Function createFunction() {
FunctionImpl function = new FunctionImpl();
return function;
@@ -125,6 +133,7 @@ public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements F
*
* @generated
*/
+ @Override
public FAMTerminator createFAMTerminator() {
FAMTerminatorImpl famTerminator = new FAMTerminatorImpl();
return famTerminator;
@@ -135,6 +144,7 @@ public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements F
*
* @generated
*/
+ @Override
public InformationLink createInformationLink() {
InformationLinkImpl informationLink = new InformationLinkImpl();
return informationLink;
@@ -145,7 +155,8 @@ public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements F
*
* @generated
*/
- public FunctionalInterface createFunctionalInterface() {
+ @Override
+ public functionalarchitecture.FunctionalInterface createFunctionalInterface() {
FunctionalInterfaceImpl functionalInterface = new FunctionalInterfaceImpl();
return functionalInterface;
}
@@ -155,6 +166,7 @@ public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements F
*
* @generated
*/
+ @Override
public FunctionalInput createFunctionalInput() {
FunctionalInputImpl functionalInput = new FunctionalInputImpl();
return functionalInput;
@@ -165,6 +177,7 @@ public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements F
*
* @generated
*/
+ @Override
public FunctionalOutput createFunctionalOutput() {
FunctionalOutputImpl functionalOutput = new FunctionalOutputImpl();
return functionalOutput;
@@ -195,6 +208,7 @@ public class FunctionalarchitectureFactoryImpl extends EFactoryImpl implements F
*
* @generated
*/
+ @Override
public FunctionalarchitecturePackage getFunctionalarchitecturePackage() {
return (FunctionalarchitecturePackage)getEPackage();
}
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..04945f1c 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;
@@ -166,6 +165,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EClass getFunctionalElement() {
return functionalElementEClass;
}
@@ -175,6 +175,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunctionalElement_Interface() {
return (EReference)functionalElementEClass.getEStructuralFeatures().get(0);
}
@@ -184,6 +185,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunctionalElement_Model() {
return (EReference)functionalElementEClass.getEStructuralFeatures().get(1);
}
@@ -193,6 +195,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunctionalElement_Parent() {
return (EReference)functionalElementEClass.getEStructuralFeatures().get(2);
}
@@ -202,6 +205,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EClass getFunctionalArchitectureModel() {
return functionalArchitectureModelEClass;
}
@@ -211,6 +215,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunctionalArchitectureModel_RootElements() {
return (EReference)functionalArchitectureModelEClass.getEStructuralFeatures().get(0);
}
@@ -220,6 +225,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EClass getFunction() {
return functionEClass;
}
@@ -229,6 +235,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunction_SubElements() {
return (EReference)functionEClass.getEStructuralFeatures().get(0);
}
@@ -238,6 +245,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EAttribute getFunction_Type() {
return (EAttribute)functionEClass.getEStructuralFeatures().get(1);
}
@@ -247,6 +255,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EClass getFAMTerminator() {
return famTerminatorEClass;
}
@@ -256,6 +265,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFAMTerminator_Data() {
return (EReference)famTerminatorEClass.getEStructuralFeatures().get(0);
}
@@ -265,6 +275,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EClass getInformationLink() {
return informationLinkEClass;
}
@@ -274,6 +285,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getInformationLink_From() {
return (EReference)informationLinkEClass.getEStructuralFeatures().get(0);
}
@@ -283,6 +295,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getInformationLink_To() {
return (EReference)informationLinkEClass.getEStructuralFeatures().get(1);
}
@@ -292,6 +305,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EClass getFunctionalInterface() {
return functionalInterfaceEClass;
}
@@ -301,6 +315,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunctionalInterface_Data() {
return (EReference)functionalInterfaceEClass.getEStructuralFeatures().get(0);
}
@@ -310,6 +325,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunctionalInterface_Element() {
return (EReference)functionalInterfaceEClass.getEStructuralFeatures().get(1);
}
@@ -319,6 +335,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EClass getFunctionalInput() {
return functionalInputEClass;
}
@@ -328,6 +345,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunctionalInput_IncomingLinks() {
return (EReference)functionalInputEClass.getEStructuralFeatures().get(0);
}
@@ -337,6 +355,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EClass getFunctionalOutput() {
return functionalOutputEClass;
}
@@ -346,6 +365,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunctionalOutput_OutgoingLinks() {
return (EReference)functionalOutputEClass.getEStructuralFeatures().get(0);
}
@@ -355,6 +375,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EClass getFunctionalData() {
return functionalDataEClass;
}
@@ -364,6 +385,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunctionalData_Terminator() {
return (EReference)functionalDataEClass.getEStructuralFeatures().get(0);
}
@@ -373,6 +395,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EReference getFunctionalData_Interface() {
return (EReference)functionalDataEClass.getEStructuralFeatures().get(1);
}
@@ -382,6 +405,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public EEnum getFunctionType() {
return functionTypeEEnum;
}
@@ -391,6 +415,7 @@ public class FunctionalarchitecturePackageImpl extends EPackageImpl implements F
*
* @generated
*/
+ @Override
public FunctionalarchitectureFactory getFunctionalarchitectureFactory() {
return (FunctionalarchitectureFactory)getEFactoryInstance();
}
@@ -503,9 +528,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);
@@ -540,12 +565,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 +581,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/impl/InformationLinkImpl.java b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/InformationLinkImpl.java
index 4b46fef8..ead4f9e9 100644
--- a/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/InformationLinkImpl.java
+++ b/Domains/Examples/ModelGenExampleFAM_plugin/ecore-gen/functionalarchitecture/impl/InformationLinkImpl.java
@@ -67,6 +67,7 @@ public class InformationLinkImpl extends MinimalEObjectImpl.Container implements
*
* @generated
*/
+ @Override
public FunctionalOutput getFrom() {
if (eContainerFeatureID() != FunctionalarchitecturePackage.INFORMATION_LINK__FROM) return null;
return (FunctionalOutput)eInternalContainer();
@@ -87,6 +88,7 @@ public class InformationLinkImpl extends MinimalEObjectImpl.Container implements
*
* @generated
*/
+ @Override
public void setFrom(FunctionalOutput newFrom) {
if (newFrom != eInternalContainer() || (eContainerFeatureID() != FunctionalarchitecturePackage.INFORMATION_LINK__FROM && newFrom != null)) {
if (EcoreUtil.isAncestor(this, newFrom))
@@ -108,6 +110,7 @@ public class InformationLinkImpl extends MinimalEObjectImpl.Container implements
*
* @generated
*/
+ @Override
public FunctionalInput getTo() {
if (to != null && to.eIsProxy()) {
InternalEObject oldTo = (InternalEObject)to;
@@ -149,6 +152,7 @@ public class InformationLinkImpl extends MinimalEObjectImpl.Container implements
*
* @generated
*/
+ @Override
public void setTo(FunctionalInput newTo) {
if (newTo != to) {
NotificationChain msgs = null;
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/plugin.xml b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml
index 213ec0ed..c117a28e 100644
--- a/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml
+++ b/Domains/Examples/ModelGenExampleFAM_plugin/plugin.xml
@@ -5,10 +5,13 @@
-
-
-
-
+
+
+
+
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend
index cedcec5a..9845560c 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend
@@ -5,6 +5,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem
import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery
import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality
import java.util.Map
+import org.eclipse.emf.common.util.Enumerator
import org.eclipse.emf.ecore.EAttribute
import org.eclipse.emf.ecore.EEnumLiteral
import org.eclipse.emf.ecore.EReference
@@ -17,6 +18,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality
import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter
import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality
import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall
+import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint
import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.BinaryTransitiveClosure
import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue
import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall
@@ -24,7 +26,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeCo
import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery
import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.*
-import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint
class RelationDefinitionIndexer {
val PatternGenerator base;
@@ -228,6 +229,9 @@ class RelationDefinitionIndexer {
if(target instanceof EEnumLiteral) {
targetString = '''const_«target.name»_«target.EEnum.name»'''
additionalDefinition = '''DefinedElement.name(«targetString»,"«target.name» «target.EEnum.name»"); //LogicProblem.elements(problem,«targetString»);'''
+ } else if(target instanceof Enumerator) {
+ targetString = '''const_«target.name»_«target.class.simpleName»'''
+ additionalDefinition = '''DefinedElement.name(«targetString»,"«target.name» «target.class.simpleName»"); //LogicProblem.elements(problem,«targetString»);'''
} else if(target instanceof Integer) {
targetString = '''const_«target»_Integer'''
additionalDefinition = '''IntegerElement.value(«targetString»,«target»);'''
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF b/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF
index 548d3608..cc274c7c 100644
--- a/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF
+++ b/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF
@@ -26,6 +26,10 @@ Require-Bundle: hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlan
org.eclipse.viatra.query.runtime.localsearch;bundle-version="1.5.0",
hu.bme.mit.inf.dslreasoner.logic2ecore;bundle-version="1.0.0",
hu.bme.mit.inf.dslreasoner.visualisation;bundle-version="1.0.0",
- hu.bme.mit.inf.dslreasoner.domains.alloyexamples;bundle-version="1.0.0"
+ hu.bme.mit.inf.dslreasoner.domains.alloyexamples;bundle-version="1.0.0",
+ org.eclipse.collections;bundle-version="9.2.0",
+ org.eclipse.viatra.query.patternlanguage.emf;bundle-version="2.2.0",
+ org.eclipse.viatra.query.runtime.rete;bundle-version="2.2.0",
+ org.objectweb.asm;bundle-version="7.0.0"
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/FAM.xmi b/Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/FAM.xmi
index d2797166..e4115194 100644
--- a/Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/FAM.xmi
+++ b/Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/FAM.xmi
@@ -1,3 +1,3 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fam="http://www.inf.mit.bme.hu/viatrasolver/example/fam"/>
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend
index 91c46dd6..fe4dcadd 100644
--- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend
+++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend
@@ -34,6 +34,8 @@ import org.eclipse.emf.ecore.EObject
import org.eclipse.emf.ecore.EReference
import org.eclipse.emf.ecore.resource.Resource
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl
+import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageStandaloneSetup
+import org.eclipse.viatra.query.runtime.rete.matcher.ReteEngine
class SimpleRun {
@@ -125,7 +127,9 @@ class SimpleRun {
}
def static loadPartialModel(ReasonerWorkspace inputs) {
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl());
+ EMFPatternLanguageStandaloneSetup.doSetup
+ ReteEngine.getClass
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());
inputs.readModel(EObject,"FAM.xmi").eResource.allContents.toList
}
--
cgit v1.2.3-70-g09d2
From 8d5377ccb1c89668d1c95314910455c12c9c4554 Mon Sep 17 00:00:00 2001
From: Kristóf Marussy
Date: Fri, 2 Aug 2019 01:24:28 +0200
Subject: Fix enum literal support for FAM
---
Domains/Examples/ModelGenExampleFAM_plugin/.project | 6 ------
.../logic2viatra/patterns/RelationDefinitionIndexer.xtend | 9 +++++----
.../src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend | 9 +++++++--
3 files changed, 12 insertions(+), 12 deletions(-)
(limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend')
diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/.project b/Domains/Examples/ModelGenExampleFAM_plugin/.project
index 70920828..6e1b3a06 100644
--- a/Domains/Examples/ModelGenExampleFAM_plugin/.project
+++ b/Domains/Examples/ModelGenExampleFAM_plugin/.project
@@ -10,11 +10,6 @@
-
- org.eclipse.xtext.ui.shared.xtextBuilder
-
-
-
org.eclipse.jdt.core.javabuilder
@@ -33,7 +28,6 @@
org.eclipse.jdt.core.javanature
- org.eclipse.xtext.ui.shared.xtextNature
org.eclipse.viatra.query.projectnature
org.eclipse.pde.PluginNature
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend
index 9845560c..0ae28b66 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationDefinitionIndexer.xtend
@@ -34,7 +34,7 @@ class RelationDefinitionIndexer {
this.base = base
}
- public def generateRelationDefinitions(
+ def generateRelationDefinitions(
LogicProblem problem,
Iterable relations,
Map fqn2PQuery) {
@@ -110,7 +110,7 @@ class RelationDefinitionIndexer {
else return Modality::MUST
}
- def public referPattern(PQuery p, String[] variables, Modality modality, boolean positive, boolean transitive) '''
+ def referPattern(PQuery p, String[] variables, Modality modality, boolean positive, boolean transitive) '''
«IF !positive»neg «ENDIF»find «IF transitive»twoParam_«ENDIF»«modality.name.toLowerCase»InRelation_pattern_«p.fullyQualifiedName.replace('.','_')»«IF transitive»+«ENDIF»(«IF !transitive»problem,interpretation,«ENDIF»«variables.join(',')»);
'''
@@ -228,10 +228,11 @@ class RelationDefinitionIndexer {
var String additionalDefinition;
if(target instanceof EEnumLiteral) {
targetString = '''const_«target.name»_«target.EEnum.name»'''
- additionalDefinition = '''DefinedElement.name(«targetString»,"«target.name» «target.EEnum.name»"); //LogicProblem.elements(problem,«targetString»);'''
+ additionalDefinition = '''DefinedElement.name(«targetString»,"«target.name» literal «target.EEnum.name»"); //LogicProblem.elements(problem,«targetString»);'''
} else if(target instanceof Enumerator) {
+ // XXX We should get the corresponding EEnum name instead of the java class name.
targetString = '''const_«target.name»_«target.class.simpleName»'''
- additionalDefinition = '''DefinedElement.name(«targetString»,"«target.name» «target.class.simpleName»"); //LogicProblem.elements(problem,«targetString»);'''
+ additionalDefinition = '''DefinedElement.name(«targetString»,"«target.name» literal «target.class.simpleName»"); //LogicProblem.elements(problem,«targetString»);'''
} else if(target instanceof Integer) {
targetString = '''const_«target»_Integer'''
additionalDefinition = '''IntegerElement.value(«targetString»,«target»);'''
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend
index fe4dcadd..b65826ad 100644
--- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend
+++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend
@@ -15,6 +15,7 @@ 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.viatra2logic.ViatraQuerySetDescriptor
+import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy
import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic
import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml
@@ -60,6 +61,7 @@ class SimpleRun {
val modelGenerationProblem = ecore2Logic.transformMetamodel(metamodel,new Ecore2LogicConfiguration())
val modelExtensionProblem = instanceModel2Logic.transform(modelGenerationProblem,partialModel)
val validModelExtensionProblem = viatra2Logic.transformQueries(queries,modelExtensionProblem,new Viatra2LogicConfiguration)
+// workspace.writeModel(validModelExtensionProblem.output, "generation.logicproblem")
val logicProblem = validModelExtensionProblem.output
@@ -72,6 +74,7 @@ class SimpleRun {
it.typeScopes.maxNewElements = 40
it.typeScopes.minNewElements = 40
it.solutionScope.numberOfRequiredSolutions = 1
+// it.scopePropagatorStrategy = ScopePropagatorStrategy.BasicTypeHierarchy
it.documentationLevel = DocumentationLevel.NONE
it.debugConfiguration.partalInterpretationVisualisationFrequency = 1
it.debugConfiguration.partialInterpretatioVisualiser = new GraphvizVisualiser
@@ -91,12 +94,14 @@ class SimpleRun {
println("Problem solved")
- val interpretations = reasoner.getInterpretations(solution as ModelResult)
+ val result = solution as ModelResult
+ val interpretations = reasoner.getInterpretations(result)
val models = new LinkedList
for(interpretation : interpretations) {
val instanceModel = logic2Ecore.transformInterpretation(interpretation,modelGenerationProblem.trace)
models+=instanceModel
}
+ println(result.statistics.solverTime)
solution.writeSolution(workspace, #[])
}
@@ -129,7 +134,7 @@ class SimpleRun {
def static loadPartialModel(ReasonerWorkspace inputs) {
EMFPatternLanguageStandaloneSetup.doSetup
ReteEngine.getClass
- Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("xmi", new XMIResourceFactoryImpl());
+ Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl());
inputs.readModel(EObject,"FAM.xmi").eResource.allContents.toList
}
--
cgit v1.2.3-70-g09d2