aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers
diff options
context:
space:
mode:
authorLibravatar OszkarSemerath <oszkar.semerath@gmail.com>2018-07-16 18:25:34 +0200
committerLibravatar OszkarSemerath <oszkar.semerath@gmail.com>2018-07-16 18:25:34 +0200
commit59a53fc819355fb2809b23544a5ca19ffff802fb (patch)
treee67cba5ca12cfbba7d2dc68e6c07fe36c996e3f2 /Solvers
parentSupport for building float, double and BigDecimal literals (diff)
downloadVIATRA-Generator-59a53fc819355fb2809b23544a5ca19ffff802fb.tar.gz
VIATRA-Generator-59a53fc819355fb2809b23544a5ca19ffff802fb.tar.zst
VIATRA-Generator-59a53fc819355fb2809b23544a5ca19ffff802fb.zip
Scope support for attributes
Diffstat (limited to 'Solvers')
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/Partial2logicannotationsPackage.java32
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/PartialModelRelation2Assertion.java21
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/impl/Partial2logicannotationsPackageImpl.java14
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/impl/PartialModelRelation2AssertionImpl.java59
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialModelAnnotations.aird111
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialModelAnnotations.ecore2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend81
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend22
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend86
9 files changed, 244 insertions, 184 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/Partial2logicannotationsPackage.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/Partial2logicannotationsPackage.java
index 25438ba2..f3df1319 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/Partial2logicannotationsPackage.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/Partial2logicannotationsPackage.java
@@ -77,22 +77,13 @@ public interface Partial2logicannotationsPackage extends EPackage {
77 int PARTIAL_MODEL_RELATION2_ASSERTION__TARGET = LogicproblemPackage.ASSERTION_ANNOTATION__TARGET; 77 int PARTIAL_MODEL_RELATION2_ASSERTION__TARGET = LogicproblemPackage.ASSERTION_ANNOTATION__TARGET;
78 78
79 /** 79 /**
80 * The feature id for the '<em><b>Links</b></em>' containment reference list.
81 * <!-- begin-user-doc -->
82 * <!-- end-user-doc -->
83 * @generated
84 * @ordered
85 */
86 int PARTIAL_MODEL_RELATION2_ASSERTION__LINKS = LogicproblemPackage.ASSERTION_ANNOTATION_FEATURE_COUNT + 0;
87
88 /**
89 * The feature id for the '<em><b>Target Relation</b></em>' reference. 80 * The feature id for the '<em><b>Target Relation</b></em>' reference.
90 * <!-- begin-user-doc --> 81 * <!-- begin-user-doc -->
91 * <!-- end-user-doc --> 82 * <!-- end-user-doc -->
92 * @generated 83 * @generated
93 * @ordered 84 * @ordered
94 */ 85 */
95 int PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION = LogicproblemPackage.ASSERTION_ANNOTATION_FEATURE_COUNT + 1; 86 int PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION = LogicproblemPackage.ASSERTION_ANNOTATION_FEATURE_COUNT + 0;
96 87
97 /** 88 /**
98 * The number of structural features of the '<em>Partial Model Relation2 Assertion</em>' class. 89 * The number of structural features of the '<em>Partial Model Relation2 Assertion</em>' class.
@@ -101,7 +92,7 @@ public interface Partial2logicannotationsPackage extends EPackage {
101 * @generated 92 * @generated
102 * @ordered 93 * @ordered
103 */ 94 */
104 int PARTIAL_MODEL_RELATION2_ASSERTION_FEATURE_COUNT = LogicproblemPackage.ASSERTION_ANNOTATION_FEATURE_COUNT + 2; 95 int PARTIAL_MODEL_RELATION2_ASSERTION_FEATURE_COUNT = LogicproblemPackage.ASSERTION_ANNOTATION_FEATURE_COUNT + 1;
105 96
106 /** 97 /**
107 * The number of operations of the '<em>Partial Model Relation2 Assertion</em>' class. 98 * The number of operations of the '<em>Partial Model Relation2 Assertion</em>' class.
@@ -124,17 +115,6 @@ public interface Partial2logicannotationsPackage extends EPackage {
124 EClass getPartialModelRelation2Assertion(); 115 EClass getPartialModelRelation2Assertion();
125 116
126 /** 117 /**
127 * Returns the meta object for the containment reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion#getLinks <em>Links</em>}'.
128 * <!-- begin-user-doc -->
129 * <!-- end-user-doc -->
130 * @return the meta object for the containment reference list '<em>Links</em>'.
131 * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion#getLinks()
132 * @see #getPartialModelRelation2Assertion()
133 * @generated
134 */
135 EReference getPartialModelRelation2Assertion_Links();
136
137 /**
138 * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion#getTargetRelation <em>Target Relation</em>}'. 118 * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion#getTargetRelation <em>Target Relation</em>}'.
139 * <!-- begin-user-doc --> 119 * <!-- begin-user-doc -->
140 * <!-- end-user-doc --> 120 * <!-- end-user-doc -->
@@ -179,14 +159,6 @@ public interface Partial2logicannotationsPackage extends EPackage {
179 EClass PARTIAL_MODEL_RELATION2_ASSERTION = eINSTANCE.getPartialModelRelation2Assertion(); 159 EClass PARTIAL_MODEL_RELATION2_ASSERTION = eINSTANCE.getPartialModelRelation2Assertion();
180 160
181 /** 161 /**
182 * The meta object literal for the '<em><b>Links</b></em>' containment reference list feature.
183 * <!-- begin-user-doc -->
184 * <!-- end-user-doc -->
185 * @generated
186 */
187 EReference PARTIAL_MODEL_RELATION2_ASSERTION__LINKS = eINSTANCE.getPartialModelRelation2Assertion_Links();
188
189 /**
190 * The meta object literal for the '<em><b>Target Relation</b></em>' reference feature. 162 * The meta object literal for the '<em><b>Target Relation</b></em>' reference feature.
191 * <!-- begin-user-doc --> 163 * <!-- begin-user-doc -->
192 * <!-- end-user-doc --> 164 * <!-- end-user-doc -->
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/PartialModelRelation2Assertion.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/PartialModelRelation2Assertion.java
index 3c7f1a38..164725d3 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/PartialModelRelation2Assertion.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/PartialModelRelation2Assertion.java
@@ -5,10 +5,6 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.pa
5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration; 5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration;
6import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.AssertionAnnotation; 6import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.AssertionAnnotation;
7 7
8import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink;
9
10import org.eclipse.emf.common.util.EList;
11
12/** 8/**
13 * <!-- begin-user-doc --> 9 * <!-- begin-user-doc -->
14 * A representation of the model object '<em><b>Partial Model Relation2 Assertion</b></em>'. 10 * A representation of the model object '<em><b>Partial Model Relation2 Assertion</b></em>'.
@@ -18,7 +14,6 @@ import org.eclipse.emf.common.util.EList;
18 * The following features are supported: 14 * The following features are supported:
19 * </p> 15 * </p>
20 * <ul> 16 * <ul>
21 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion#getLinks <em>Links</em>}</li>
22 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion#getTargetRelation <em>Target Relation</em>}</li> 17 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion#getTargetRelation <em>Target Relation</em>}</li>
23 * </ul> 18 * </ul>
24 * 19 *
@@ -28,22 +23,6 @@ import org.eclipse.emf.common.util.EList;
28 */ 23 */
29public interface PartialModelRelation2Assertion extends AssertionAnnotation { 24public interface PartialModelRelation2Assertion extends AssertionAnnotation {
30 /** 25 /**
31 * Returns the value of the '<em><b>Links</b></em>' containment reference list.
32 * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink}.
33 * <!-- begin-user-doc -->
34 * <p>
35 * If the meaning of the '<em>Links</em>' containment reference list isn't clear,
36 * there really should be more of a description here...
37 * </p>
38 * <!-- end-user-doc -->
39 * @return the value of the '<em>Links</em>' containment reference list.
40 * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.Partial2logicannotationsPackage#getPartialModelRelation2Assertion_Links()
41 * @model containment="true"
42 * @generated
43 */
44 EList<RelationLink> getLinks();
45
46 /**
47 * Returns the value of the '<em><b>Target Relation</b></em>' reference. 26 * Returns the value of the '<em><b>Target Relation</b></em>' reference.
48 * <!-- begin-user-doc --> 27 * <!-- begin-user-doc -->
49 * <p> 28 * <p>
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/impl/Partial2logicannotationsPackageImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/impl/Partial2logicannotationsPackageImpl.java
index f83498cd..934abc24 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/impl/Partial2logicannotationsPackageImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/impl/Partial2logicannotationsPackageImpl.java
@@ -112,17 +112,8 @@ public class Partial2logicannotationsPackageImpl extends EPackageImpl implements
112 * <!-- end-user-doc --> 112 * <!-- end-user-doc -->
113 * @generated 113 * @generated
114 */ 114 */
115 public EReference getPartialModelRelation2Assertion_Links() {
116 return (EReference)partialModelRelation2AssertionEClass.getEStructuralFeatures().get(0);
117 }
118
119 /**
120 * <!-- begin-user-doc -->
121 * <!-- end-user-doc -->
122 * @generated
123 */
124 public EReference getPartialModelRelation2Assertion_TargetRelation() { 115 public EReference getPartialModelRelation2Assertion_TargetRelation() {
125 return (EReference)partialModelRelation2AssertionEClass.getEStructuralFeatures().get(1); 116 return (EReference)partialModelRelation2AssertionEClass.getEStructuralFeatures().get(0);
126 } 117 }
127 118
128 /** 119 /**
@@ -154,7 +145,6 @@ public class Partial2logicannotationsPackageImpl extends EPackageImpl implements
154 145
155 // Create classes and their features 146 // Create classes and their features
156 partialModelRelation2AssertionEClass = createEClass(PARTIAL_MODEL_RELATION2_ASSERTION); 147 partialModelRelation2AssertionEClass = createEClass(PARTIAL_MODEL_RELATION2_ASSERTION);
157 createEReference(partialModelRelation2AssertionEClass, PARTIAL_MODEL_RELATION2_ASSERTION__LINKS);
158 createEReference(partialModelRelation2AssertionEClass, PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION); 148 createEReference(partialModelRelation2AssertionEClass, PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION);
159 } 149 }
160 150
@@ -183,7 +173,6 @@ public class Partial2logicannotationsPackageImpl extends EPackageImpl implements
183 173
184 // Obtain other dependent packages 174 // Obtain other dependent packages
185 LogicproblemPackage theLogicproblemPackage = (LogicproblemPackage)EPackage.Registry.INSTANCE.getEPackage(LogicproblemPackage.eNS_URI); 175 LogicproblemPackage theLogicproblemPackage = (LogicproblemPackage)EPackage.Registry.INSTANCE.getEPackage(LogicproblemPackage.eNS_URI);
186 PartialinterpretationPackage thePartialinterpretationPackage = (PartialinterpretationPackage)EPackage.Registry.INSTANCE.getEPackage(PartialinterpretationPackage.eNS_URI);
187 LogiclanguagePackage theLogiclanguagePackage = (LogiclanguagePackage)EPackage.Registry.INSTANCE.getEPackage(LogiclanguagePackage.eNS_URI); 176 LogiclanguagePackage theLogiclanguagePackage = (LogiclanguagePackage)EPackage.Registry.INSTANCE.getEPackage(LogiclanguagePackage.eNS_URI);
188 177
189 // Create type parameters 178 // Create type parameters
@@ -195,7 +184,6 @@ public class Partial2logicannotationsPackageImpl extends EPackageImpl implements
195 184
196 // Initialize classes, features, and operations; add parameters 185 // Initialize classes, features, and operations; add parameters
197 initEClass(partialModelRelation2AssertionEClass, PartialModelRelation2Assertion.class, "PartialModelRelation2Assertion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 186 initEClass(partialModelRelation2AssertionEClass, PartialModelRelation2Assertion.class, "PartialModelRelation2Assertion", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
198 initEReference(getPartialModelRelation2Assertion_Links(), thePartialinterpretationPackage.getRelationLink(), null, "links", null, 0, -1, PartialModelRelation2Assertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
199 initEReference(getPartialModelRelation2Assertion_TargetRelation(), theLogiclanguagePackage.getRelationDeclaration(), null, "targetRelation", null, 1, 1, PartialModelRelation2Assertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 187 initEReference(getPartialModelRelation2Assertion_TargetRelation(), theLogiclanguagePackage.getRelationDeclaration(), null, "targetRelation", null, 1, 1, PartialModelRelation2Assertion.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
200 188
201 // Create resource 189 // Create resource
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/impl/PartialModelRelation2AssertionImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/impl/PartialModelRelation2AssertionImpl.java
index 92011d1c..c6d0c04f 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/impl/PartialModelRelation2AssertionImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partial2logicannotations/impl/PartialModelRelation2AssertionImpl.java
@@ -7,22 +7,11 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.impl.AssertionAnnotat
7 7
8import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.Partial2logicannotationsPackage; 8import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.Partial2logicannotationsPackage;
9import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion; 9import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion;
10
11import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink;
12
13import java.util.Collection;
14
15import org.eclipse.emf.common.notify.Notification; 10import org.eclipse.emf.common.notify.Notification;
16import org.eclipse.emf.common.notify.NotificationChain;
17
18import org.eclipse.emf.common.util.EList;
19
20import org.eclipse.emf.ecore.EClass; 11import org.eclipse.emf.ecore.EClass;
21import org.eclipse.emf.ecore.InternalEObject; 12import org.eclipse.emf.ecore.InternalEObject;
22 13
23import org.eclipse.emf.ecore.impl.ENotificationImpl; 14import org.eclipse.emf.ecore.impl.ENotificationImpl;
24import org.eclipse.emf.ecore.util.EObjectContainmentEList;
25import org.eclipse.emf.ecore.util.InternalEList;
26 15
27/** 16/**
28 * <!-- begin-user-doc --> 17 * <!-- begin-user-doc -->
@@ -32,7 +21,6 @@ import org.eclipse.emf.ecore.util.InternalEList;
32 * The following features are implemented: 21 * The following features are implemented:
33 * </p> 22 * </p>
34 * <ul> 23 * <ul>
35 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.impl.PartialModelRelation2AssertionImpl#getLinks <em>Links</em>}</li>
36 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.impl.PartialModelRelation2AssertionImpl#getTargetRelation <em>Target Relation</em>}</li> 24 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.impl.PartialModelRelation2AssertionImpl#getTargetRelation <em>Target Relation</em>}</li>
37 * </ul> 25 * </ul>
38 * 26 *
@@ -40,16 +28,6 @@ import org.eclipse.emf.ecore.util.InternalEList;
40 */ 28 */
41public class PartialModelRelation2AssertionImpl extends AssertionAnnotationImpl implements PartialModelRelation2Assertion { 29public class PartialModelRelation2AssertionImpl extends AssertionAnnotationImpl implements PartialModelRelation2Assertion {
42 /** 30 /**
43 * The cached value of the '{@link #getLinks() <em>Links</em>}' containment reference list.
44 * <!-- begin-user-doc -->
45 * <!-- end-user-doc -->
46 * @see #getLinks()
47 * @generated
48 * @ordered
49 */
50 protected EList<RelationLink> links;
51
52 /**
53 * The cached value of the '{@link #getTargetRelation() <em>Target Relation</em>}' reference. 31 * The cached value of the '{@link #getTargetRelation() <em>Target Relation</em>}' reference.
54 * <!-- begin-user-doc --> 32 * <!-- begin-user-doc -->
55 * <!-- end-user-doc --> 33 * <!-- end-user-doc -->
@@ -83,18 +61,6 @@ public class PartialModelRelation2AssertionImpl extends AssertionAnnotationImpl
83 * <!-- end-user-doc --> 61 * <!-- end-user-doc -->
84 * @generated 62 * @generated
85 */ 63 */
86 public EList<RelationLink> getLinks() {
87 if (links == null) {
88 links = new EObjectContainmentEList<RelationLink>(RelationLink.class, this, Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__LINKS);
89 }
90 return links;
91 }
92
93 /**
94 * <!-- begin-user-doc -->
95 * <!-- end-user-doc -->
96 * @generated
97 */
98 public RelationDeclaration getTargetRelation() { 64 public RelationDeclaration getTargetRelation() {
99 if (targetRelation != null && targetRelation.eIsProxy()) { 65 if (targetRelation != null && targetRelation.eIsProxy()) {
100 InternalEObject oldTargetRelation = (InternalEObject)targetRelation; 66 InternalEObject oldTargetRelation = (InternalEObject)targetRelation;
@@ -134,24 +100,8 @@ public class PartialModelRelation2AssertionImpl extends AssertionAnnotationImpl
134 * @generated 100 * @generated
135 */ 101 */
136 @Override 102 @Override
137 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
138 switch (featureID) {
139 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__LINKS:
140 return ((InternalEList<?>)getLinks()).basicRemove(otherEnd, msgs);
141 }
142 return super.eInverseRemove(otherEnd, featureID, msgs);
143 }
144
145 /**
146 * <!-- begin-user-doc -->
147 * <!-- end-user-doc -->
148 * @generated
149 */
150 @Override
151 public Object eGet(int featureID, boolean resolve, boolean coreType) { 103 public Object eGet(int featureID, boolean resolve, boolean coreType) {
152 switch (featureID) { 104 switch (featureID) {
153 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__LINKS:
154 return getLinks();
155 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION: 105 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION:
156 if (resolve) return getTargetRelation(); 106 if (resolve) return getTargetRelation();
157 return basicGetTargetRelation(); 107 return basicGetTargetRelation();
@@ -168,10 +118,6 @@ public class PartialModelRelation2AssertionImpl extends AssertionAnnotationImpl
168 @Override 118 @Override
169 public void eSet(int featureID, Object newValue) { 119 public void eSet(int featureID, Object newValue) {
170 switch (featureID) { 120 switch (featureID) {
171 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__LINKS:
172 getLinks().clear();
173 getLinks().addAll((Collection<? extends RelationLink>)newValue);
174 return;
175 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION: 121 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION:
176 setTargetRelation((RelationDeclaration)newValue); 122 setTargetRelation((RelationDeclaration)newValue);
177 return; 123 return;
@@ -187,9 +133,6 @@ public class PartialModelRelation2AssertionImpl extends AssertionAnnotationImpl
187 @Override 133 @Override
188 public void eUnset(int featureID) { 134 public void eUnset(int featureID) {
189 switch (featureID) { 135 switch (featureID) {
190 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__LINKS:
191 getLinks().clear();
192 return;
193 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION: 136 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION:
194 setTargetRelation((RelationDeclaration)null); 137 setTargetRelation((RelationDeclaration)null);
195 return; 138 return;
@@ -205,8 +148,6 @@ public class PartialModelRelation2AssertionImpl extends AssertionAnnotationImpl
205 @Override 148 @Override
206 public boolean eIsSet(int featureID) { 149 public boolean eIsSet(int featureID) {
207 switch (featureID) { 150 switch (featureID) {
208 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__LINKS:
209 return links != null && !links.isEmpty();
210 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION: 151 case Partial2logicannotationsPackage.PARTIAL_MODEL_RELATION2_ASSERTION__TARGET_RELATION:
211 return targetRelation != null; 152 return targetRelation != null;
212 } 153 }
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialModelAnnotations.aird b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialModelAnnotations.aird
index d5d1094d..3bf7db44 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialModelAnnotations.aird
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialModelAnnotations.aird
@@ -59,15 +59,6 @@
59 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/> 59 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
60 </endLabelStyleDescription> 60 </endLabelStyleDescription>
61 </computedStyleDescriptions> 61 </computedStyleDescriptions>
62 <computedStyleDescriptions xmi:type="style:EdgeStyleDescription" xmi:id="_D7GP4FbjEeiGP_xq1PQlCQ" sourceArrow="FillDiamond" routingStyle="manhattan">
63 <strokeColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
64 <centerLabelStyleDescription xmi:type="style:CenterLabelStyleDescription" xmi:id="_D7GP4VbjEeiGP_xq1PQlCQ" showIcon="false" labelExpression="service:render">
65 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
66 </centerLabelStyleDescription>
67 <endLabelStyleDescription xmi:type="style:EndLabelStyleDescription" xmi:id="_D7GP4lbjEeiGP_xq1PQlCQ" labelSize="6" showIcon="false" labelExpression="service:eKeysLabel">
68 <labelColor xmi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='dark_blue']"/>
69 </endLabelStyleDescription>
70 </computedStyleDescriptions>
71 </data> 62 </data>
72 </ownedAnnotationEntries> 63 </ownedAnnotationEntries>
73 <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_apWpMFYiEeiGP_xq1PQlCQ" source="GMF_DIAGRAMS"> 64 <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_apWpMFYiEeiGP_xq1PQlCQ" source="GMF_DIAGRAMS">
@@ -177,6 +168,19 @@
177 <styles xmi:type="notation:ShapeStyle" xmi:id="_4FAb8VdAEeiGP_xq1PQlCQ" fontName="Segoe UI" fontHeight="8"/> 168 <styles xmi:type="notation:ShapeStyle" xmi:id="_4FAb8VdAEeiGP_xq1PQlCQ" fontName="Segoe UI" fontHeight="8"/>
178 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4FAb8ldAEeiGP_xq1PQlCQ" x="139" y="360" height="73"/> 169 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_4FAb8ldAEeiGP_xq1PQlCQ" x="139" y="360" height="73"/>
179 </children> 170 </children>
171 <children xmi:type="notation:Node" xmi:id="_KsDUIIhYEeiAfMiSPJ9dBw" type="2003" element="_KrCAcIhYEeiAfMiSPJ9dBw">
172 <children xmi:type="notation:Node" xmi:id="_KsTy0IhYEeiAfMiSPJ9dBw" type="5007"/>
173 <children xmi:type="notation:Node" xmi:id="_KsVA8IhYEeiAfMiSPJ9dBw" type="7004">
174 <children xmi:type="notation:Node" xmi:id="_KsVA84hYEeiAfMiSPJ9dBw" type="3010" element="_KrmoMIhYEeiAfMiSPJ9dBw">
175 <styles xmi:type="notation:FontStyle" xmi:id="_KsVA9IhYEeiAfMiSPJ9dBw" fontName="Segoe UI" fontHeight="8" bold="true"/>
176 <layoutConstraint xmi:type="notation:Location" xmi:id="_KsVA9YhYEeiAfMiSPJ9dBw"/>
177 </children>
178 <styles xmi:type="notation:SortingStyle" xmi:id="_KsVA8YhYEeiAfMiSPJ9dBw"/>
179 <styles xmi:type="notation:FilteringStyle" xmi:id="_KsVA8ohYEeiAfMiSPJ9dBw"/>
180 </children>
181 <styles xmi:type="notation:ShapeStyle" xmi:id="_KsDUIYhYEeiAfMiSPJ9dBw" fontName="Segoe UI" fontHeight="8" italic="true"/>
182 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KsDUIohYEeiAfMiSPJ9dBw" x="469" y="735"/>
183 </children>
180 <styles xmi:type="notation:DiagramStyle" xmi:id="_apWpMlYiEeiGP_xq1PQlCQ"/> 184 <styles xmi:type="notation:DiagramStyle" xmi:id="_apWpMlYiEeiGP_xq1PQlCQ"/>
181 <edges xmi:type="notation:Edge" xmi:id="_ovFBwFamEeiGP_xq1PQlCQ" type="4001" element="_ou_iMFamEeiGP_xq1PQlCQ" source="_dimuQFYiEeiGP_xq1PQlCQ" target="_ovB-cFamEeiGP_xq1PQlCQ"> 185 <edges xmi:type="notation:Edge" xmi:id="_ovFBwFamEeiGP_xq1PQlCQ" type="4001" element="_ou_iMFamEeiGP_xq1PQlCQ" source="_dimuQFYiEeiGP_xq1PQlCQ" target="_ovB-cFamEeiGP_xq1PQlCQ">
182 <children xmi:type="notation:Node" xmi:id="_ovG28FamEeiGP_xq1PQlCQ" type="6001"> 186 <children xmi:type="notation:Node" xmi:id="_ovG28FamEeiGP_xq1PQlCQ" type="6001">
@@ -194,22 +198,6 @@
194 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ovKhUFamEeiGP_xq1PQlCQ" id="(0.5,1.3611111111111112)"/> 198 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ovKhUFamEeiGP_xq1PQlCQ" id="(0.5,1.3611111111111112)"/>
195 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ovKhUVamEeiGP_xq1PQlCQ" id="(0.5,0.5)"/> 199 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ovKhUVamEeiGP_xq1PQlCQ" id="(0.5,0.5)"/>
196 </edges> 200 </edges>
197 <edges xmi:type="notation:Edge" xmi:id="_-ri5EFamEeiGP_xq1PQlCQ" type="4001" element="_-rf1wFamEeiGP_xq1PQlCQ" source="_dimuQFYiEeiGP_xq1PQlCQ" target="_-riSAFamEeiGP_xq1PQlCQ">
198 <children xmi:type="notation:Node" xmi:id="_-rjgIFamEeiGP_xq1PQlCQ" type="6001">
199 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-rjgIVamEeiGP_xq1PQlCQ" x="9" y="3"/>
200 </children>
201 <children xmi:type="notation:Node" xmi:id="_-rjgIlamEeiGP_xq1PQlCQ" type="6002">
202 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-rjgI1amEeiGP_xq1PQlCQ" x="-18" y="10"/>
203 </children>
204 <children xmi:type="notation:Node" xmi:id="_-rjgJFamEeiGP_xq1PQlCQ" type="6003">
205 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-rjgJVamEeiGP_xq1PQlCQ" x="-2" y="10"/>
206 </children>
207 <styles xmi:type="notation:ConnectorStyle" xmi:id="_-ri5EVamEeiGP_xq1PQlCQ" routing="Rectilinear"/>
208 <styles xmi:type="notation:FontStyle" xmi:id="_-ri5ElamEeiGP_xq1PQlCQ" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/>
209 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_-ri5E1amEeiGP_xq1PQlCQ" points="[98, -22, -192, 2]$[231, -22, -59, 2]"/>
210 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-rkHMFamEeiGP_xq1PQlCQ" id="(0.5,1.3611111111111112)"/>
211 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_-rkHMVamEeiGP_xq1PQlCQ" id="(0.5,0.5)"/>
212 </edges>
213 <edges xmi:type="notation:Edge" xmi:id="_pMP-kFapEeiGP_xq1PQlCQ" type="4001" element="_pMDxUFapEeiGP_xq1PQlCQ" source="_pMJQ4FapEeiGP_xq1PQlCQ" target="_-riSAFamEeiGP_xq1PQlCQ"> 201 <edges xmi:type="notation:Edge" xmi:id="_pMP-kFapEeiGP_xq1PQlCQ" type="4001" element="_pMDxUFapEeiGP_xq1PQlCQ" source="_pMJQ4FapEeiGP_xq1PQlCQ" target="_-riSAFamEeiGP_xq1PQlCQ">
214 <children xmi:type="notation:Node" xmi:id="_pMQloFapEeiGP_xq1PQlCQ" type="6001"> 202 <children xmi:type="notation:Node" xmi:id="_pMQloFapEeiGP_xq1PQlCQ" type="6001">
215 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pMQloVapEeiGP_xq1PQlCQ" y="-10"/> 203 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_pMQloVapEeiGP_xq1PQlCQ" y="-10"/>
@@ -338,9 +326,25 @@
338 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8BA-gFdAEeiGP_xq1PQlCQ" id="(0.4897959183673469,1.0)"/> 326 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8BA-gFdAEeiGP_xq1PQlCQ" id="(0.4897959183673469,1.0)"/>
339 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8BA-gVdAEeiGP_xq1PQlCQ" id="(0.5368421052631579,0.0)"/> 327 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_8BA-gVdAEeiGP_xq1PQlCQ" id="(0.5368421052631579,0.0)"/>
340 </edges> 328 </edges>
329 <edges xmi:type="notation:Edge" xmi:id="_KscVsIhYEeiAfMiSPJ9dBw" type="4001" element="_Kry1cIhYEeiAfMiSPJ9dBw" source="_KsDUIIhYEeiAfMiSPJ9dBw" target="_EvatwFasEeiGP_xq1PQlCQ">
330 <children xmi:type="notation:Node" xmi:id="_KseK4IhYEeiAfMiSPJ9dBw" type="6001">
331 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KseK4YhYEeiAfMiSPJ9dBw" x="-6" y="-10"/>
332 </children>
333 <children xmi:type="notation:Node" xmi:id="_KseK4ohYEeiAfMiSPJ9dBw" type="6002">
334 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KseK44hYEeiAfMiSPJ9dBw" x="19" y="10"/>
335 </children>
336 <children xmi:type="notation:Node" xmi:id="_KseK5IhYEeiAfMiSPJ9dBw" type="6003">
337 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_KseK5YhYEeiAfMiSPJ9dBw" x="-10" y="10"/>
338 </children>
339 <styles xmi:type="notation:ConnectorStyle" xmi:id="_KscVsYhYEeiAfMiSPJ9dBw" routing="Tree"/>
340 <styles xmi:type="notation:FontStyle" xmi:id="_KscVsohYEeiAfMiSPJ9dBw" fontName="Segoe UI" fontHeight="8"/>
341 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_KscVs4hYEeiAfMiSPJ9dBw" points="[0, -49, 3, 106]$[0, -89, 3, 66]$[0, -89, 3, 66]$[0, -106, 3, 49]"/>
342 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ksoi8IhYEeiAfMiSPJ9dBw" id="(0.5,0.5)"/>
343 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ksoi8YhYEeiAfMiSPJ9dBw" id="(0.5,0.5)"/>
344 </edges>
341 </data> 345 </data>
342 </ownedAnnotationEntries> 346 </ownedAnnotationEntries>
343 <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_diG_AFYiEeiGP_xq1PQlCQ" name="PartialModelRelation2Assertion" tooltipText="" outgoingEdges="_ou_iMFamEeiGP_xq1PQlCQ _-rf1wFamEeiGP_xq1PQlCQ _8AvRsFdAEeiGP_xq1PQlCQ" width="12" height="10"> 347 <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_diG_AFYiEeiGP_xq1PQlCQ" name="PartialModelRelation2Assertion" tooltipText="" outgoingEdges="_ou_iMFamEeiGP_xq1PQlCQ _8AvRsFdAEeiGP_xq1PQlCQ" width="12" height="10">
344 <target xmi:type="ecore:EClass" href="PartialModelAnnotations.ecore#//PartialModelRelation2Assertion"/> 348 <target xmi:type="ecore:EClass" href="PartialModelAnnotations.ecore#//PartialModelRelation2Assertion"/>
345 <semanticElements xmi:type="ecore:EClass" href="PartialModelAnnotations.ecore#//PartialModelRelation2Assertion"/> 349 <semanticElements xmi:type="ecore:EClass" href="PartialModelAnnotations.ecore#//PartialModelRelation2Assertion"/>
346 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> 350 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
@@ -377,7 +381,7 @@
377 </ownedStyle> 381 </ownedStyle>
378 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> 382 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
379 </ownedDiagramElements> 383 </ownedDiagramElements>
380 <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_-rYhAFamEeiGP_xq1PQlCQ" name="RelationLink" tooltipText="" incomingEdges="_-rf1wFamEeiGP_xq1PQlCQ _pMDxUFapEeiGP_xq1PQlCQ _pMFmgFapEeiGP_xq1PQlCQ _pMG0oFapEeiGP_xq1PQlCQ" width="12" height="10"> 384 <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_-rYhAFamEeiGP_xq1PQlCQ" name="RelationLink" tooltipText="" incomingEdges="_pMDxUFapEeiGP_xq1PQlCQ _pMFmgFapEeiGP_xq1PQlCQ _pMG0oFapEeiGP_xq1PQlCQ" width="12" height="10">
381 <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//RelationLink"/> 385 <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//RelationLink"/>
382 <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//RelationLink"/> 386 <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//RelationLink"/>
383 <decorations xmi:type="viewpoint:Decoration" xmi:id="_-rZIEVamEeiGP_xq1PQlCQ"> 387 <decorations xmi:type="viewpoint:Decoration" xmi:id="_-rZIEVamEeiGP_xq1PQlCQ">
@@ -392,15 +396,6 @@
392 </ownedStyle> 396 </ownedStyle>
393 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> 397 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
394 </ownedDiagramElements> 398 </ownedDiagramElements>
395 <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_-rf1wFamEeiGP_xq1PQlCQ" name="[0..*] links" sourceNode="_diG_AFYiEeiGP_xq1PQlCQ" targetNode="_-rYhAFamEeiGP_xq1PQlCQ">
396 <target xmi:type="ecore:EReference" href="PartialModelAnnotations.ecore#//PartialModelRelation2Assertion/links"/>
397 <semanticElements xmi:type="ecore:EReference" href="PartialModelAnnotations.ecore#//PartialModelRelation2Assertion/links"/>
398 <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_D7G28FbjEeiGP_xq1PQlCQ" description="_D7GP4FbjEeiGP_xq1PQlCQ" sourceArrow="FillDiamond" routingStyle="manhattan" strokeColor="0,0,0">
399 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_D7G28VbjEeiGP_xq1PQlCQ" showIcon="false"/>
400 <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_D7G28lbjEeiGP_xq1PQlCQ" labelSize="6" showIcon="false" labelColor="39,76,114"/>
401 </ownedStyle>
402 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
403 </ownedDiagramElements>
404 <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_pLphoFapEeiGP_xq1PQlCQ" name="BinaryElementRelationLink" tooltipText="" outgoingEdges="_pMDxUFapEeiGP_xq1PQlCQ _EvQ8wFasEeiGP_xq1PQlCQ _EvSx8FasEeiGP_xq1PQlCQ" width="12" height="10"> 399 <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_pLphoFapEeiGP_xq1PQlCQ" name="BinaryElementRelationLink" tooltipText="" outgoingEdges="_pMDxUFapEeiGP_xq1PQlCQ _EvQ8wFasEeiGP_xq1PQlCQ _EvSx8FasEeiGP_xq1PQlCQ" width="12" height="10">
405 <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//BinaryElementRelationLink"/> 400 <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//BinaryElementRelationLink"/>
406 <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//BinaryElementRelationLink"/> 401 <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//BinaryElementRelationLink"/>
@@ -496,7 +491,7 @@
496 </ownedStyle> 491 </ownedStyle>
497 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> 492 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
498 </ownedDiagramElements> 493 </ownedDiagramElements>
499 <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_EvBFIFasEeiGP_xq1PQlCQ" name="DefinedElement" tooltipText="" incomingEdges="_EvQ8wFasEeiGP_xq1PQlCQ _EvSx8FasEeiGP_xq1PQlCQ _EvUnIFasEeiGP_xq1PQlCQ" width="12" height="10"> 494 <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_EvBFIFasEeiGP_xq1PQlCQ" name="DefinedElement" tooltipText="" incomingEdges="_EvQ8wFasEeiGP_xq1PQlCQ _EvSx8FasEeiGP_xq1PQlCQ _EvUnIFasEeiGP_xq1PQlCQ _Kry1cIhYEeiAfMiSPJ9dBw" width="12" height="10">
500 <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> 495 <target xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/>
501 <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> 496 <semanticElements xmi:type="ecore:EClass" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/>
502 <decorations xmi:type="viewpoint:Decoration" xmi:id="_EvC6UFasEeiGP_xq1PQlCQ"> 497 <decorations xmi:type="viewpoint:Decoration" xmi:id="_EvC6UFasEeiGP_xq1PQlCQ">
@@ -512,8 +507,8 @@
512 <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_EvOggFasEeiGP_xq1PQlCQ" name=" definedInType : TypeDefinition" tooltipText=""> 507 <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_EvOggFasEeiGP_xq1PQlCQ" name=" definedInType : TypeDefinition" tooltipText="">
513 <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement/definedInType"/> 508 <target xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement/definedInType"/>
514 <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement/definedInType"/> 509 <semanticElements xmi:type="ecore:EReference" href="platform:/resource/hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement/definedInType"/>
515 <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_EvPHkFasEeiGP_xq1PQlCQ" labelAlignment="LEFT" description="_ou9tAFamEeiGP_xq1PQlCQ" color="114,159,207"> 510 <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_GToiYIhYEeiAfMiSPJ9dBw" labelAlignment="LEFT" color="114,159,207">
516 <labelFormat>bold</labelFormat> 511 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EReferenceNode']/@style"/>
517 </ownedStyle> 512 </ownedStyle>
518 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EReferenceNode']"/> 513 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EReferenceNode']"/>
519 </ownedElements> 514 </ownedElements>
@@ -647,6 +642,44 @@
647 </ownedStyle> 642 </ownedStyle>
648 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> 643 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
649 </ownedDiagramElements> 644 </ownedDiagramElements>
645 <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_KrCAcIhYEeiAfMiSPJ9dBw" name="PrimitiveElement" tooltipText="" outgoingEdges="_Kry1cIhYEeiAfMiSPJ9dBw" width="12" height="10">
646 <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PrimitiveElement"/>
647 <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PrimitiveElement"/>
648 <decorations xmi:type="viewpoint:Decoration" xmi:id="_KrFDwYhYEeiAfMiSPJ9dBw">
649 <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/>
650 </decorations>
651 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
652 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
653 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
654 <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_KrFDwIhYEeiAfMiSPJ9dBw" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="228,228,228">
655 <labelFormat>italic</labelFormat>
656 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/>
657 </ownedStyle>
658 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
659 <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_KrmoMIhYEeiAfMiSPJ9dBw" name="valueSet : EBoolean = false" tooltipText="">
660 <target xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PrimitiveElement/valueSet"/>
661 <semanticElements xmi:type="ecore:EAttribute" href="PartialInterpretation.ecore#//PrimitiveElement/valueSet"/>
662 <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_KrmoMYhYEeiAfMiSPJ9dBw" labelAlignment="LEFT" description="_fTh24FayEeiGP_xq1PQlCQ">
663 <labelFormat>bold</labelFormat>
664 </ownedStyle>
665 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
666 </ownedElements>
667 </ownedDiagramElements>
668 <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_Kry1cIhYEeiAfMiSPJ9dBw" sourceNode="_KrCAcIhYEeiAfMiSPJ9dBw" targetNode="_EvBFIFasEeiGP_xq1PQlCQ">
669 <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PrimitiveElement"/>
670 <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PrimitiveElement"/>
671 <decorations xmi:type="viewpoint:Decoration" xmi:id="_Kr3G44hYEeiAfMiSPJ9dBw">
672 <description xmi:type="description:SemanticBasedDecoration" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@decorationDescriptionsSet/@decorationDescriptions[name='External']"/>
673 </decorations>
674 <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_Kr3G4IhYEeiAfMiSPJ9dBw" targetArrow="InputClosedArrow" routingStyle="tree">
675 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
676 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_Kr3G4YhYEeiAfMiSPJ9dBw" showIcon="false">
677 <labelFormat>italic</labelFormat>
678 </beginLabelStyle>
679 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_Kr3G4ohYEeiAfMiSPJ9dBw" showIcon="false"/>
680 </ownedStyle>
681 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
682 </ownedDiagramElements>
650 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> 683 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
651 <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_aouXFFYiEeiGP_xq1PQlCQ"/> 684 <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_aouXFFYiEeiGP_xq1PQlCQ"/>
652 <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> 685 <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/>
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialModelAnnotations.ecore b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialModelAnnotations.ecore
index 3a1c20d1..412d8cbb 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialModelAnnotations.ecore
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialModelAnnotations.ecore
@@ -3,8 +3,6 @@
3 xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="partial2logicannotations" nsURI="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language/partial2logicannotation" 3 xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="partial2logicannotations" nsURI="http://www.bme.hu/mit/inf/dslreasoner/logic/model/language/partial2logicannotation"
4 nsPrefix="partial2logicannotations"> 4 nsPrefix="partial2logicannotations">
5 <eClassifiers xsi:type="ecore:EClass" name="PartialModelRelation2Assertion" eSuperTypes="../../hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//AssertionAnnotation"> 5 <eClassifiers xsi:type="ecore:EClass" name="PartialModelRelation2Assertion" eSuperTypes="../../hu.bme.mit.inf.dslreasoner.logic.model/model/logicproblem.ecore#//AssertionAnnotation">
6 <eStructuralFeatures xsi:type="ecore:EReference" name="links" upperBound="-1"
7 eType="ecore:EClass PartialInterpretation.ecore#//RelationLink" containment="true"/>
8 <eStructuralFeatures xsi:type="ecore:EReference" name="targetRelation" lowerBound="1" 6 <eStructuralFeatures xsi:type="ecore:EReference" name="targetRelation" lowerBound="1"
9 eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration"/> 7 eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//RelationDeclaration"/>
10 </eClassifiers> 8 </eClassifiers>
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend
index f4fc1fce..bd0f4ca4 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend
@@ -20,6 +20,10 @@ import org.eclipse.emf.ecore.EObject
20import org.eclipse.emf.ecore.resource.Resource 20import org.eclipse.emf.ecore.resource.Resource
21 21
22import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* 22import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.*
23import java.util.HashSet
24import java.util.Set
25import java.math.BigDecimal
26import org.eclipse.emf.ecore.EAttribute
23 27
24class InstanceModel2PartialInterpretation { 28class InstanceModel2PartialInterpretation {
25 val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE 29 val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE
@@ -43,7 +47,12 @@ class InstanceModel2PartialInterpretation {
43 { 47 {
44 val problem = metamodelTranslationResult.output 48 val problem = metamodelTranslationResult.output
45 val ecore2LogicTrace = metamodelTranslationResult.trace 49 val ecore2LogicTrace = metamodelTranslationResult.trace
46 val tracedOutput = partialInterpretationInitialiser.initialisePartialInterpretation(problem, new TypeScopes) 50
51 val referencesUsed = ecore2Logic.allReferencesInScope(ecore2LogicTrace).toSet
52 val attributesUsed = ecore2Logic.allAttributesInScope(ecore2LogicTrace).toSet
53
54 val typeScope = createTypeScopesFromKnownAttributeValues(objects,attributesUsed)
55 val tracedOutput = partialInterpretationInitialiser.initialisePartialInterpretation(problem, typeScope)
47 val partialInterpretation = tracedOutput.output 56 val partialInterpretation = tracedOutput.output
48 val partialInterpretationTrace = tracedOutput.trace 57 val partialInterpretationTrace = tracedOutput.trace
49 58
@@ -54,7 +63,7 @@ class InstanceModel2PartialInterpretation {
54 val object = objects.get(objectIndex) 63 val object = objects.get(objectIndex)
55 val element = createDefinedElement => [ 64 val element = createDefinedElement => [
56 it.name = if(withID) 65 it.name = if(withID)
57 { '''o «objectIndex»''' } else 66 { '''o «objectIndex+1»''' } else
58 { null } 67 { null }
59 ] 68 ]
60 69
@@ -71,8 +80,6 @@ class InstanceModel2PartialInterpretation {
71 object2DefinedElement.put(object, element) 80 object2DefinedElement.put(object, element)
72 } 81 }
73 82
74 val referencesUsed = ecore2Logic.allReferencesInScope(ecore2LogicTrace).toSet
75 val attributesUsed = ecore2Logic.allAttributesInScope(ecore2LogicTrace).toSet
76 for(source : objects) { 83 for(source : objects) {
77 // Translating the references 84 // Translating the references
78 for(reference : source.eClass.EAllReferences.filter[ 85 for(reference : source.eClass.EAllReferences.filter[
@@ -126,6 +133,52 @@ class InstanceModel2PartialInterpretation {
126 return partialInterpretation 133 return partialInterpretation
127 } 134 }
128 135
136 private def createTypeScopesFromKnownAttributeValues(List<EObject> objects, Set<EAttribute> attributesUsed) {
137 val Set<Integer> integers = new HashSet
138 val Set<BigDecimal> reals = new HashSet
139 val Set<String> strings = new HashSet
140 for(object: objects) {
141 for(attribute : object.eClass.EAllAttributes.filter[attributesUsed.contains(it)]) {
142 val value = object.eGet(attribute)
143 if(value !== null) {
144 if(value instanceof List<?>) {
145 for(v : value) {
146 shortValue(v,integers,reals,strings)
147 }
148 } else {
149 shortValue(value,integers,reals,strings)
150 }
151 }
152 }
153 }
154 return new TypeScopes => [
155 it.knownIntegers += integers
156 it.knownReals += reals
157 it.knownStrings += strings
158 ]
159 }
160 private def dispatch shortValue(Boolean value, Set<Integer> integers, Set<BigDecimal> reals, Set<String> strings) {
161 // Do nothing
162 }
163 private def dispatch shortValue(Integer value, Set<Integer> integers, Set<BigDecimal> reals, Set<String> strings) {
164 integers += value
165 }
166 private def dispatch shortValue(Float value, Set<Integer> integers, Set<BigDecimal> reals, Set<String> strings) {
167 reals += BigDecimal.valueOf(value)
168 }
169 private def dispatch shortValue(Double value, Set<Integer> integers, Set<BigDecimal> reals, Set<String> strings) {
170 reals += BigDecimal.valueOf(value)
171 }
172 private def dispatch shortValue(String value, Set<Integer> integers, Set<BigDecimal> reals, Set<String> strings) {
173 strings += value
174 }
175 private def dispatch shortValue(Void value, Set<Integer> integers, Set<BigDecimal> reals, Set<String> strings) {
176 // Do nothing
177 }
178 private def dispatch shortValue(Object value, Set<Integer> integers, Set<BigDecimal> reals, Set<String> strings) {
179 // Do nothing
180 }
181
129 protected def translateLink(PartialRelationInterpretation interpretation, DefinedElement source, DefinedElement target) { 182 protected def translateLink(PartialRelationInterpretation interpretation, DefinedElement source, DefinedElement target) {
130 interpretation.relationlinks += createBinaryElementRelationLink => [it.param1 = source it.param2 = target] 183 interpretation.relationlinks += createBinaryElementRelationLink => [it.param1 = source it.param2 = target]
131 } 184 }
@@ -138,7 +191,23 @@ class InstanceModel2PartialInterpretation {
138 else throw new AssertionError('''term should be a defined element?''') 191 else throw new AssertionError('''term should be a defined element?''')
139 } 192 }
140 193
141 dispatch protected def translateValue(Object value, Ecore2Logic_Trace ecore2LogicTrace, Problem2PartialInterpretationTrace partialInterpretationTrace) { 194 dispatch protected def translateValue(Boolean value, Ecore2Logic_Trace ecore2LogicTrace, Problem2PartialInterpretationTrace partialInterpretationTrace) {
142 //throw new UnsupportedOperationException('''Mapping of «value.class.simpleName» in partial models is currently not supported!''') 195 value.lookup(partialInterpretationTrace.primitiveValues.booleanMap)
196 }
197
198 dispatch protected def translateValue(Integer value, Ecore2Logic_Trace ecore2LogicTrace, Problem2PartialInterpretationTrace partialInterpretationTrace) {
199 value.lookup(partialInterpretationTrace.primitiveValues.integerMap)
200 }
201
202 dispatch protected def translateValue(Double value, Ecore2Logic_Trace ecore2LogicTrace, Problem2PartialInterpretationTrace partialInterpretationTrace) {
203 BigDecimal.valueOf(value).lookup(partialInterpretationTrace.primitiveValues.realMap)
204 }
205
206 dispatch protected def translateValue(Float value, Ecore2Logic_Trace ecore2LogicTrace, Problem2PartialInterpretationTrace partialInterpretationTrace) {
207 BigDecimal.valueOf(value).lookup(partialInterpretationTrace.primitiveValues.realMap)
208 }
209
210 dispatch protected def translateValue(String value, Ecore2Logic_Trace ecore2LogicTrace, Problem2PartialInterpretationTrace partialInterpretationTrace) {
211 value.lookup(partialInterpretationTrace.primitiveValues.stringMap)
143 } 212 }
144} \ No newline at end of file 213} \ No newline at end of file
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend
index 5d8d9313..bba4ae92 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/PartialInterpretation2Logic.xtend
@@ -24,6 +24,9 @@ import org.eclipse.xtend.lib.annotations.Data
24 24
25import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* 25import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.*
26import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PrimitiveElement 26import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PrimitiveElement
27import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BooleanElement
28import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement
29import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement
27 30
28@Data class PartialInterpretation2Logic_Trace { 31@Data class PartialInterpretation2Logic_Trace {
29 Map<DefinedElement,DefinedElement> new2Old = new HashMap 32 Map<DefinedElement,DefinedElement> new2Old = new HashMap
@@ -148,7 +151,7 @@ class PartialInterpretation2Logic {
148 val ^annotation= Partial2logicannotationsFactory.eINSTANCE.createPartialModelRelation2Assertion 151 val ^annotation= Partial2logicannotationsFactory.eINSTANCE.createPartialModelRelation2Assertion
149 ^annotation.target = assertion 152 ^annotation.target = assertion
150 ^annotation.targetRelation = relation 153 ^annotation.targetRelation = relation
151 ^annotation.links += links.map[EcoreUtil.copy(it)] 154 //^annotation.links += links.map[EcoreUtil.copy(it)]
152 //val error= assertion.eAllContents.toIterable.filter(SymbolicValue).filter[it.symbolicReference === null] 155 //val error= assertion.eAllContents.toIterable.filter(SymbolicValue).filter[it.symbolicReference === null]
153 //error.forEach[println("error")] 156 //error.forEach[println("error")]
154 p.add(assertion) 157 p.add(assertion)
@@ -162,12 +165,25 @@ class PartialInterpretation2Logic {
162 if((link.param1 !== null) && (link.param2 !== null)) { 165 if((link.param1 !== null) && (link.param2 !== null)) {
163 return createSymbolicValue=>[ 166 return createSymbolicValue=>[
164 it.symbolicReference=relationDeclaration 167 it.symbolicReference=relationDeclaration
165 it.parameterSubstitutions += createSymbolicValue => [it.symbolicReference = link.param1] 168 it.parameterSubstitutions += createValueInLink(link.param1)
166 it.parameterSubstitutions += createSymbolicValue => [it.symbolicReference = link.param2] 169 it.parameterSubstitutions += createValueInLink(link.param2)
167 ] 170 ]
168 } else { 171 } else {
169 throw new IllegalArgumentException 172 throw new IllegalArgumentException
170 } 173 }
171 } else throw new UnsupportedOperationException 174 } else throw new UnsupportedOperationException
172 } 175 }
176
177 def private dispatch createValueInLink(BooleanElement element) {
178 return element.value.asTerm
179 }
180 def private dispatch createValueInLink(IntegerElement element) {
181 return element.value.asTerm
182 }
183 def private dispatch createValueInLink(RealElement element) {
184 return element.value.asTerm
185 }
186 def private dispatch createValueInLink(DefinedElement element) {
187 return createSymbolicValue => [it.symbolicReference = element]
188 }
173} \ No newline at end of file 189} \ No newline at end of file
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend
index 2a350d53..cc76ce3f 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend
@@ -2,6 +2,7 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage
2 2
3import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput 3import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput
4import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes 4import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes
5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement
5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory 6import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory
6import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration 7import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration
7import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type 8import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type
@@ -10,8 +11,10 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition
10import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem 11import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem
11import hu.bme.mit.inf.dslreasoner.logic.model.patterns.SupertypeStar 12import hu.bme.mit.inf.dslreasoner.logic.model.patterns.SupertypeStar
12import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion 13import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion
14import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink
13import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BooleanElement 15import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BooleanElement
14import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement 16import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement
17import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink
15import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialBooleanInterpretation 18import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialBooleanInterpretation
16import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation 19import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation
17import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialIntegerInterpretation 20import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialIntegerInterpretation
@@ -22,16 +25,22 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par
22import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory 25import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory
23import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement 26import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement
24import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.StringElement 27import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.StringElement
28import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink
25import java.math.BigDecimal 29import java.math.BigDecimal
26import java.util.HashMap 30import java.util.HashMap
27import java.util.Map 31import java.util.Map
28import java.util.SortedSet 32import java.util.SortedSet
29import org.eclipse.emf.ecore.util.EcoreUtil
30import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine 33import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine
31import org.eclipse.viatra.query.runtime.emf.EMFScope 34import org.eclipse.viatra.query.runtime.emf.EMFScope
32import org.eclipse.xtend.lib.annotations.Data 35import org.eclipse.xtend.lib.annotations.Data
33 36
34import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* 37import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.*
38import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.SymbolicValue
39import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.And
40import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolLiteral
41import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral
42import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral
43import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringLiteral
35 44
36@Data class Problem2PartialInterpretationTrace { 45@Data class Problem2PartialInterpretationTrace {
37 Map<TypeDeclaration, PartialComplexTypeInterpretation> type2Interpretation 46 Map<TypeDeclaration, PartialComplexTypeInterpretation> type2Interpretation
@@ -81,7 +90,7 @@ class PartialInterpretationInitialiser {
81 typeScopes.maxNewElements) 90 typeScopes.maxNewElements)
82 91
83 // Initialise relations 92 // Initialise relations
84 val relation2Interpretation = initRelations(res) 93 val relation2Interpretation = initRelations(res,primitiveTrace)
85 94
86 val trace = new Problem2PartialInterpretationTrace(type2Interpretation,primitiveTrace,relation2Interpretation) 95 val trace = new Problem2PartialInterpretationTrace(type2Interpretation,primitiveTrace,relation2Interpretation)
87 return new TracedOutput(res,trace) 96 return new TracedOutput(res,trace)
@@ -95,13 +104,13 @@ class PartialInterpretationInitialiser {
95 { 104 {
96 return new PrimitiveValueTrace( 105 return new PrimitiveValueTrace(
97 booleanType, 106 booleanType,
98 booleanType.elements.filter(BooleanElement).toMap[value], 107 booleanType.elements.filter(BooleanElement).filter[it.isValueSet].toMap[value],
99 integerType, 108 integerType,
100 integerType.elements.filter(IntegerElement).toMap[value], 109 integerType.elements.filter(IntegerElement).filter[it.isValueSet].toMap[value],
101 realType, 110 realType,
102 realType.elements.filter(RealElement).toMap[value], 111 realType.elements.filter(RealElement).filter[it.isValueSet].toMap[value],
103 stringType, 112 stringType,
104 stringType.elements.filter(StringElement).toMap[value] 113 stringType.elements.filter(StringElement).filter[it.isValueSet].toMap[value]
105 ) 114 )
106 } 115 }
107 116
@@ -130,7 +139,9 @@ class PartialInterpretationInitialiser {
130 partialInterpretation.newElements += integerElement 139 partialInterpretation.newElements += integerElement
131 } 140 }
132 if(maxNewIntegers>0) { 141 if(maxNewIntegers>0) {
133 throw new UnsupportedOperationException('''Unspecified Integers are currently not supported!''') 142 val newElements = createIntegerElement => [it.name = "New Integers" it.valueSet = false]
143 partialInterpretation.openWorldElements += newElements
144 integerInterpretation.elements += newElements
134 } 145 }
135 146
136 return integerInterpretation 147 return integerInterpretation
@@ -146,7 +157,9 @@ class PartialInterpretationInitialiser {
146 partialInterpretation.newElements += realElement 157 partialInterpretation.newElements += realElement
147 } 158 }
148 if(maxNewReals>0) { 159 if(maxNewReals>0) {
149 throw new UnsupportedOperationException('''Unspecified Real values are currently not supported!''') 160 val newElements = createRealElement => [it.name = "New Reals" it.valueSet = false]
161 partialInterpretation.openWorldElements += newElements
162 realInterpretation.elements += newElements
150 } 163 }
151 return realInterpretation 164 return realInterpretation
152 } 165 }
@@ -161,7 +174,9 @@ class PartialInterpretationInitialiser {
161 partialInterpretation.newElements += stringElement 174 partialInterpretation.newElements += stringElement
162 } 175 }
163 if(maxNewStrings>0) { 176 if(maxNewStrings>0) {
164 throw new UnsupportedOperationException('''Unspecified String values are currently not supported!''') 177 val newElements = createStringElement => [it.name = "New Strings" it.valueSet = false]
178 partialInterpretation.openWorldElements += newElements
179 stringInterpretation.elements += newElements
165 } 180 }
166 181
167 return stringInterpretation 182 return stringInterpretation
@@ -201,7 +216,7 @@ class PartialInterpretationInitialiser {
201 } 216 }
202 } 217 }
203 218
204 def private initRelations(PartialInterpretation interpretation) { 219 def private Map<RelationDeclaration, PartialRelationInterpretation> initRelations(PartialInterpretation interpretation, PrimitiveValueTrace trace) {
205 val Map<RelationDeclaration, PartialRelationInterpretation> relation2Interpretation = new HashMap 220 val Map<RelationDeclaration, PartialRelationInterpretation> relation2Interpretation = new HashMap
206 for(relation : interpretation.problem.relations.filter(RelationDeclaration)) { 221 for(relation : interpretation.problem.relations.filter(RelationDeclaration)) {
207 val partialInterpretation = relation.initialisePartialRelationInterpretation 222 val partialInterpretation = relation.initialisePartialRelationInterpretation
@@ -211,8 +226,24 @@ class PartialInterpretationInitialiser {
211 for(pMR2A : interpretation.problem.annotations.filter(PartialModelRelation2Assertion)) { 226 for(pMR2A : interpretation.problem.annotations.filter(PartialModelRelation2Assertion)) {
212 val relation = pMR2A.targetRelation 227 val relation = pMR2A.targetRelation
213 val r = relation.lookup(relation2Interpretation) 228 val r = relation.lookup(relation2Interpretation)
214 r.relationlinks+=pMR2A.links.map[EcoreUtil.copy(it)] 229 val assertion = pMR2A.target.value
230 val links = if(assertion instanceof SymbolicValue) {
231 #[assertion]
232 } else if(assertion instanceof And){
233 val res = assertion.operands.filter(SymbolicValue)
234 if(res.size != assertion.operands) {
235 throw new UnsupportedOperationException('''Assertion describing partial model of "«r.interpretationOf.name»" contains unsupported constructs''')
236 } else {
237 res
238 }
239 } else {
240 throw new UnsupportedOperationException('''Assertion describing partial model of "«r.interpretationOf.name»" contains unsupported constructs''')
241 }
242 for(link:links) {
243 r.relationlinks += createLink(link,trace)
244 }
215 } 245 }
246
216// interpretation.partialfunctioninterpretation += interpretation.problem.functions.filter(FunctionDeclaration) 247// interpretation.partialfunctioninterpretation += interpretation.problem.functions.filter(FunctionDeclaration)
217// .map[initialisePartialFunctionInterpretation(trace)] 248// .map[initialisePartialFunctionInterpretation(trace)]
218// interpretation.partialconstantinterpretation += interpretation.problem.constants.filter(ConstantDeclaration) 249// interpretation.partialconstantinterpretation += interpretation.problem.constants.filter(ConstantDeclaration)
@@ -220,6 +251,39 @@ class PartialInterpretationInitialiser {
220 251
221 return relation2Interpretation 252 return relation2Interpretation
222 } 253 }
254 def private createLink(SymbolicValue v, PrimitiveValueTrace trace) {
255 val translatedValues = v.parameterSubstitutions.map[getElement(trace)].toList
256 if(translatedValues.size == 1) {
257 return createUnaryElementRelationLink => [it.param1 = translatedValues.get(0)]
258 } else if(translatedValues.size == 2) {
259 return createBinaryElementRelationLink => [it.param1 = translatedValues.get(0) it.param2 = translatedValues.get(1)]
260 } else {
261 val res = createNaryRelationLink
262 for(i : 0..<translatedValues.size) {
263 res.elements += createNaryRelationLinkElement => [
264 it.index = i
265 it.param = translatedValues.get(i)
266 ]
267 }
268 return res
269 }
270 }
271
272 def private dispatch getElement(SymbolicValue element, PrimitiveValueTrace trace) {
273 return element.symbolicReference as DefinedElement
274 }
275 def private dispatch getElement(BoolLiteral element, PrimitiveValueTrace trace) {
276 element.value.lookup(trace.booleanMap)
277 }
278 def private dispatch getElement(IntLiteral element, PrimitiveValueTrace trace) {
279 element.value.lookup(trace.integerMap)
280 }
281 def private dispatch getElement(RealLiteral element, PrimitiveValueTrace trace) {
282 element.value.lookup(trace.realMap)
283 }
284 def private dispatch getElement(StringLiteral element, PrimitiveValueTrace trace) {
285 element.value.lookup(trace.stringMap)
286 }
223 287
224 def private initialisePartialTypeInterpretation(TypeDeclaration t, ViatraQueryEngine engine) { 288 def private initialisePartialTypeInterpretation(TypeDeclaration t, ViatraQueryEngine engine) {
225 val supertypeMatcher = SupertypeStar.Matcher.on(engine) 289 val supertypeMatcher = SupertypeStar.Matcher.on(engine)