aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage
diff options
context:
space:
mode:
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage')
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/META-INF/MANIFEST.MF3
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java24
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java60
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/Scope.java24
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BooleanElementImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/IntegerElementImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java6
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java1
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialComplexTypeInterpretationImpl.java3
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java73
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java7
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java19
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java88
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PrimitiveElementImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RealElementImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java64
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/StringElementImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore6
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel14
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend23
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend34
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend242
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodOptions.xtend22
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend16
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend491
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2PairwiseNeighbourhoodRepresentation.xtend68
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/AbstractNeighborhoodBasedStateCoderFactory.xtend137
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend294
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/PairwiseNeighbourhoodBasedStateCoderFactory.xtend75
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend36
36 files changed, 1260 insertions, 606 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/META-INF/MANIFEST.MF b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/META-INF/MANIFEST.MF
index 83c90829..639a8a9c 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/META-INF/MANIFEST.MF
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/META-INF/MANIFEST.MF
@@ -28,7 +28,8 @@ Require-Bundle: org.eclipse.core.runtime,
28 org.eclipse.xtend.lib.macro, 28 org.eclipse.xtend.lib.macro,
29 org.eclipse.viatra.query.runtime;bundle-version="1.5.0", 29 org.eclipse.viatra.query.runtime;bundle-version="1.5.0",
30 org.eclipse.viatra.dse;bundle-version="0.15.0", 30 org.eclipse.viatra.dse;bundle-version="0.15.0",
31 hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0" 31 hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0",
32 org.eclipse.collections;bundle-version="10.1.0"
32Bundle-ActivationPolicy: lazy 33Bundle-ActivationPolicy: lazy
33Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage 34Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage
34 35
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java
index 098cc15b..9d0c3fea 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java
@@ -30,6 +30,7 @@ import org.eclipse.emf.ecore.EObject;
30 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getScopes <em>Scopes</em>}</li> 30 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getScopes <em>Scopes</em>}</li>
31 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElements <em>Min New Elements</em>}</li> 31 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElements <em>Min New Elements</em>}</li>
32 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMaxNewElements <em>Max New Elements</em>}</li> 32 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMaxNewElements <em>Max New Elements</em>}</li>
33 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElementsHeuristic <em>Min New Elements Heuristic</em>}</li>
33 * </ul> 34 * </ul>
34 * 35 *
35 * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation() 36 * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation()
@@ -255,4 +256,27 @@ public interface PartialInterpretation extends EObject {
255 */ 256 */
256 void setMaxNewElements(int value); 257 void setMaxNewElements(int value);
257 258
259 /**
260 * Returns the value of the '<em><b>Min New Elements Heuristic</b></em>' attribute.
261 * The default value is <code>"0"</code>.
262 * <!-- begin-user-doc -->
263 * <!-- end-user-doc -->
264 * @return the value of the '<em>Min New Elements Heuristic</em>' attribute.
265 * @see #setMinNewElementsHeuristic(int)
266 * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_MinNewElementsHeuristic()
267 * @model default="0" required="true"
268 * @generated
269 */
270 int getMinNewElementsHeuristic();
271
272 /**
273 * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElementsHeuristic <em>Min New Elements Heuristic</em>}' attribute.
274 * <!-- begin-user-doc -->
275 * <!-- end-user-doc -->
276 * @param value the new value of the '<em>Min New Elements Heuristic</em>' attribute.
277 * @see #getMinNewElementsHeuristic()
278 * @generated
279 */
280 void setMinNewElementsHeuristic(int value);
281
258} // PartialInterpretation 282} // PartialInterpretation
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java
index 4f34b9b7..f462ebe4 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java
@@ -167,13 +167,22 @@ public interface PartialinterpretationPackage extends EPackage {
167 int PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS = 10; 167 int PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS = 10;
168 168
169 /** 169 /**
170 * The feature id for the '<em><b>Min New Elements Heuristic</b></em>' attribute.
171 * <!-- begin-user-doc -->
172 * <!-- end-user-doc -->
173 * @generated
174 * @ordered
175 */
176 int PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC = 11;
177
178 /**
170 * The number of structural features of the '<em>Partial Interpretation</em>' class. 179 * The number of structural features of the '<em>Partial Interpretation</em>' class.
171 * <!-- begin-user-doc --> 180 * <!-- begin-user-doc -->
172 * <!-- end-user-doc --> 181 * <!-- end-user-doc -->
173 * @generated 182 * @generated
174 * @ordered 183 * @ordered
175 */ 184 */
176 int PARTIAL_INTERPRETATION_FEATURE_COUNT = 11; 185 int PARTIAL_INTERPRETATION_FEATURE_COUNT = 12;
177 186
178 /** 187 /**
179 * The number of operations of the '<em>Partial Interpretation</em>' class. 188 * The number of operations of the '<em>Partial Interpretation</em>' class.
@@ -913,13 +922,22 @@ public interface PartialinterpretationPackage extends EPackage {
913 int SCOPE__TARGET_TYPE_INTERPRETATION = 2; 922 int SCOPE__TARGET_TYPE_INTERPRETATION = 2;
914 923
915 /** 924 /**
925 * The feature id for the '<em><b>Min New Elements Heuristic</b></em>' attribute.
926 * <!-- begin-user-doc -->
927 * <!-- end-user-doc -->
928 * @generated
929 * @ordered
930 */
931 int SCOPE__MIN_NEW_ELEMENTS_HEURISTIC = 3;
932
933 /**
916 * The number of structural features of the '<em>Scope</em>' class. 934 * The number of structural features of the '<em>Scope</em>' class.
917 * <!-- begin-user-doc --> 935 * <!-- begin-user-doc -->
918 * <!-- end-user-doc --> 936 * <!-- end-user-doc -->
919 * @generated 937 * @generated
920 * @ordered 938 * @ordered
921 */ 939 */
922 int SCOPE_FEATURE_COUNT = 3; 940 int SCOPE_FEATURE_COUNT = 4;
923 941
924 /** 942 /**
925 * The number of operations of the '<em>Scope</em>' class. 943 * The number of operations of the '<em>Scope</em>' class.
@@ -1358,6 +1376,17 @@ public interface PartialinterpretationPackage extends EPackage {
1358 EAttribute getPartialInterpretation_MaxNewElements(); 1376 EAttribute getPartialInterpretation_MaxNewElements();
1359 1377
1360 /** 1378 /**
1379 * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElementsHeuristic <em>Min New Elements Heuristic</em>}'.
1380 * <!-- begin-user-doc -->
1381 * <!-- end-user-doc -->
1382 * @return the meta object for the attribute '<em>Min New Elements Heuristic</em>'.
1383 * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElementsHeuristic()
1384 * @see #getPartialInterpretation()
1385 * @generated
1386 */
1387 EAttribute getPartialInterpretation_MinNewElementsHeuristic();
1388
1389 /**
1361 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation <em>Partial Constant Interpretation</em>}'. 1390 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation <em>Partial Constant Interpretation</em>}'.
1362 * <!-- begin-user-doc --> 1391 * <!-- begin-user-doc -->
1363 * <!-- end-user-doc --> 1392 * <!-- end-user-doc -->
@@ -1750,6 +1779,17 @@ public interface PartialinterpretationPackage extends EPackage {
1750 EReference getScope_TargetTypeInterpretation(); 1779 EReference getScope_TargetTypeInterpretation();
1751 1780
1752 /** 1781 /**
1782 * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElementsHeuristic <em>Min New Elements Heuristic</em>}'.
1783 * <!-- begin-user-doc -->
1784 * <!-- end-user-doc -->
1785 * @return the meta object for the attribute '<em>Min New Elements Heuristic</em>'.
1786 * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElementsHeuristic()
1787 * @see #getScope()
1788 * @generated
1789 */
1790 EAttribute getScope_MinNewElementsHeuristic();
1791
1792 /**
1753 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation <em>Partial Primitive Interpretation</em>}'. 1793 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation <em>Partial Primitive Interpretation</em>}'.
1754 * <!-- begin-user-doc --> 1794 * <!-- begin-user-doc -->
1755 * <!-- end-user-doc --> 1795 * <!-- end-user-doc -->
@@ -1953,6 +1993,14 @@ public interface PartialinterpretationPackage extends EPackage {
1953 EAttribute PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS = eINSTANCE.getPartialInterpretation_MaxNewElements(); 1993 EAttribute PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS = eINSTANCE.getPartialInterpretation_MaxNewElements();
1954 1994
1955 /** 1995 /**
1996 * The meta object literal for the '<em><b>Min New Elements Heuristic</b></em>' attribute feature.
1997 * <!-- begin-user-doc -->
1998 * <!-- end-user-doc -->
1999 * @generated
2000 */
2001 EAttribute PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC = eINSTANCE.getPartialInterpretation_MinNewElementsHeuristic();
2002
2003 /**
1956 * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialConstantInterpretationImpl <em>Partial Constant Interpretation</em>}' class. 2004 * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialConstantInterpretationImpl <em>Partial Constant Interpretation</em>}' class.
1957 * <!-- begin-user-doc --> 2005 * <!-- begin-user-doc -->
1958 * <!-- end-user-doc --> 2006 * <!-- end-user-doc -->
@@ -2279,6 +2327,14 @@ public interface PartialinterpretationPackage extends EPackage {
2279 EReference SCOPE__TARGET_TYPE_INTERPRETATION = eINSTANCE.getScope_TargetTypeInterpretation(); 2327 EReference SCOPE__TARGET_TYPE_INTERPRETATION = eINSTANCE.getScope_TargetTypeInterpretation();
2280 2328
2281 /** 2329 /**
2330 * The meta object literal for the '<em><b>Min New Elements Heuristic</b></em>' attribute feature.
2331 * <!-- begin-user-doc -->
2332 * <!-- end-user-doc -->
2333 * @generated
2334 */
2335 EAttribute SCOPE__MIN_NEW_ELEMENTS_HEURISTIC = eINSTANCE.getScope_MinNewElementsHeuristic();
2336
2337 /**
2282 * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialPrimitiveInterpretationImpl <em>Partial Primitive Interpretation</em>}' class. 2338 * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialPrimitiveInterpretationImpl <em>Partial Primitive Interpretation</em>}' class.
2283 * <!-- begin-user-doc --> 2339 * <!-- begin-user-doc -->
2284 * <!-- end-user-doc --> 2340 * <!-- 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/partialinterpretation/Scope.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/Scope.java
index 155b9f00..a0b58615 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/Scope.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/Scope.java
@@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EObject;
16 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElements <em>Min New Elements</em>}</li> 16 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElements <em>Min New Elements</em>}</li>
17 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMaxNewElements <em>Max New Elements</em>}</li> 17 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMaxNewElements <em>Max New Elements</em>}</li>
18 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getTargetTypeInterpretation <em>Target Type Interpretation</em>}</li> 18 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getTargetTypeInterpretation <em>Target Type Interpretation</em>}</li>
19 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElementsHeuristic <em>Min New Elements Heuristic</em>}</li>
19 * </ul> 20 * </ul>
20 * 21 *
21 * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getScope() 22 * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getScope()
@@ -105,4 +106,27 @@ public interface Scope extends EObject {
105 */ 106 */
106 void setTargetTypeInterpretation(PartialTypeInterpratation value); 107 void setTargetTypeInterpretation(PartialTypeInterpratation value);
107 108
109 /**
110 * Returns the value of the '<em><b>Min New Elements Heuristic</b></em>' attribute.
111 * The default value is <code>"0"</code>.
112 * <!-- begin-user-doc -->
113 * <!-- end-user-doc -->
114 * @return the value of the '<em>Min New Elements Heuristic</em>' attribute.
115 * @see #setMinNewElementsHeuristic(int)
116 * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getScope_MinNewElementsHeuristic()
117 * @model default="0" required="true"
118 * @generated
119 */
120 int getMinNewElementsHeuristic();
121
122 /**
123 * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElementsHeuristic <em>Min New Elements Heuristic</em>}' attribute.
124 * <!-- begin-user-doc -->
125 * <!-- end-user-doc -->
126 * @param value the new value of the '<em>Min New Elements Heuristic</em>' attribute.
127 * @see #getMinNewElementsHeuristic()
128 * @generated
129 */
130 void setMinNewElementsHeuristic(int value);
131
108} // Scope 132} // Scope
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java
index f5efe02a..ca33dd65 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java
@@ -73,6 +73,7 @@ public class BinaryElementRelationLinkImpl extends RelationLinkImpl implements B
73 * <!-- end-user-doc --> 73 * <!-- end-user-doc -->
74 * @generated 74 * @generated
75 */ 75 */
76 @Override
76 public DefinedElement getParam1() { 77 public DefinedElement getParam1() {
77 if (param1 != null && param1.eIsProxy()) { 78 if (param1 != null && param1.eIsProxy()) {
78 InternalEObject oldParam1 = (InternalEObject)param1; 79 InternalEObject oldParam1 = (InternalEObject)param1;
@@ -99,6 +100,7 @@ public class BinaryElementRelationLinkImpl extends RelationLinkImpl implements B
99 * <!-- end-user-doc --> 100 * <!-- end-user-doc -->
100 * @generated 101 * @generated
101 */ 102 */
103 @Override
102 public void setParam1(DefinedElement newParam1) { 104 public void setParam1(DefinedElement newParam1) {
103 DefinedElement oldParam1 = param1; 105 DefinedElement oldParam1 = param1;
104 param1 = newParam1; 106 param1 = newParam1;
@@ -111,6 +113,7 @@ public class BinaryElementRelationLinkImpl extends RelationLinkImpl implements B
111 * <!-- end-user-doc --> 113 * <!-- end-user-doc -->
112 * @generated 114 * @generated
113 */ 115 */
116 @Override
114 public DefinedElement getParam2() { 117 public DefinedElement getParam2() {
115 if (param2 != null && param2.eIsProxy()) { 118 if (param2 != null && param2.eIsProxy()) {
116 InternalEObject oldParam2 = (InternalEObject)param2; 119 InternalEObject oldParam2 = (InternalEObject)param2;
@@ -137,6 +140,7 @@ public class BinaryElementRelationLinkImpl extends RelationLinkImpl implements B
137 * <!-- end-user-doc --> 140 * <!-- end-user-doc -->
138 * @generated 141 * @generated
139 */ 142 */
143 @Override
140 public void setParam2(DefinedElement newParam2) { 144 public void setParam2(DefinedElement newParam2) {
141 DefinedElement oldParam2 = param2; 145 DefinedElement oldParam2 = param2;
142 param2 = newParam2; 146 param2 = newParam2;
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BooleanElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BooleanElementImpl.java
index e906e07d..5f12d9e4 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BooleanElementImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BooleanElementImpl.java
@@ -69,6 +69,7 @@ public class BooleanElementImpl extends PrimitiveElementImpl implements BooleanE
69 * <!-- end-user-doc --> 69 * <!-- end-user-doc -->
70 * @generated 70 * @generated
71 */ 71 */
72 @Override
72 public boolean isValue() { 73 public boolean isValue() {
73 return value; 74 return value;
74 } 75 }
@@ -78,6 +79,7 @@ public class BooleanElementImpl extends PrimitiveElementImpl implements BooleanE
78 * <!-- end-user-doc --> 79 * <!-- end-user-doc -->
79 * @generated 80 * @generated
80 */ 81 */
82 @Override
81 public void setValue(boolean newValue) { 83 public void setValue(boolean newValue) {
82 boolean oldValue = value; 84 boolean oldValue = value;
83 value = newValue; 85 value = newValue;
@@ -152,7 +154,7 @@ public class BooleanElementImpl extends PrimitiveElementImpl implements BooleanE
152 public String toString() { 154 public String toString() {
153 if (eIsProxy()) return super.toString(); 155 if (eIsProxy()) return super.toString();
154 156
155 StringBuffer result = new StringBuffer(super.toString()); 157 StringBuilder result = new StringBuilder(super.toString());
156 result.append(" (value: "); 158 result.append(" (value: ");
157 result.append(value); 159 result.append(value);
158 result.append(')'); 160 result.append(')');
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/IntegerElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/IntegerElementImpl.java
index ef1a4b96..c8fbe1dd 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/IntegerElementImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/IntegerElementImpl.java
@@ -69,6 +69,7 @@ public class IntegerElementImpl extends PrimitiveElementImpl implements IntegerE
69 * <!-- end-user-doc --> 69 * <!-- end-user-doc -->
70 * @generated 70 * @generated
71 */ 71 */
72 @Override
72 public int getValue() { 73 public int getValue() {
73 return value; 74 return value;
74 } 75 }
@@ -78,6 +79,7 @@ public class IntegerElementImpl extends PrimitiveElementImpl implements IntegerE
78 * <!-- end-user-doc --> 79 * <!-- end-user-doc -->
79 * @generated 80 * @generated
80 */ 81 */
82 @Override
81 public void setValue(int newValue) { 83 public void setValue(int newValue) {
82 int oldValue = value; 84 int oldValue = value;
83 value = newValue; 85 value = newValue;
@@ -152,7 +154,7 @@ public class IntegerElementImpl extends PrimitiveElementImpl implements IntegerE
152 public String toString() { 154 public String toString() {
153 if (eIsProxy()) return super.toString(); 155 if (eIsProxy()) return super.toString();
154 156
155 StringBuffer result = new StringBuffer(super.toString()); 157 StringBuilder result = new StringBuilder(super.toString());
156 result.append(" (value: "); 158 result.append(" (value: ");
157 result.append(value); 159 result.append(value);
158 result.append(')'); 160 result.append(')');
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java
index 749a03c5..c319a3f4 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java
@@ -83,6 +83,7 @@ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container im
83 * <!-- end-user-doc --> 83 * <!-- end-user-doc -->
84 * @generated 84 * @generated
85 */ 85 */
86 @Override
86 public int getIndex() { 87 public int getIndex() {
87 return index; 88 return index;
88 } 89 }
@@ -92,6 +93,7 @@ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container im
92 * <!-- end-user-doc --> 93 * <!-- end-user-doc -->
93 * @generated 94 * @generated
94 */ 95 */
96 @Override
95 public void setIndex(int newIndex) { 97 public void setIndex(int newIndex) {
96 int oldIndex = index; 98 int oldIndex = index;
97 index = newIndex; 99 index = newIndex;
@@ -104,6 +106,7 @@ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container im
104 * <!-- end-user-doc --> 106 * <!-- end-user-doc -->
105 * @generated 107 * @generated
106 */ 108 */
109 @Override
107 public DefinedElement getParam() { 110 public DefinedElement getParam() {
108 if (param != null && param.eIsProxy()) { 111 if (param != null && param.eIsProxy()) {
109 InternalEObject oldParam = (InternalEObject)param; 112 InternalEObject oldParam = (InternalEObject)param;
@@ -130,6 +133,7 @@ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container im
130 * <!-- end-user-doc --> 133 * <!-- end-user-doc -->
131 * @generated 134 * @generated
132 */ 135 */
136 @Override
133 public void setParam(DefinedElement newParam) { 137 public void setParam(DefinedElement newParam) {
134 DefinedElement oldParam = param; 138 DefinedElement oldParam = param;
135 param = newParam; 139 param = newParam;
@@ -215,7 +219,7 @@ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container im
215 public String toString() { 219 public String toString() {
216 if (eIsProxy()) return super.toString(); 220 if (eIsProxy()) return super.toString();
217 221
218 StringBuffer result = new StringBuffer(super.toString()); 222 StringBuilder result = new StringBuilder(super.toString());
219 result.append(" (index: "); 223 result.append(" (index: ");
220 result.append(index); 224 result.append(index);
221 result.append(')'); 225 result.append(')');
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java
index f387ee06..9f7628cf 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java
@@ -66,6 +66,7 @@ public class NaryRelationLinkImpl extends RelationLinkImpl implements NaryRelati
66 * <!-- end-user-doc --> 66 * <!-- end-user-doc -->
67 * @generated 67 * @generated
68 */ 68 */
69 @Override
69 public EList<NaryRelationLinkElement> getElements() { 70 public EList<NaryRelationLinkElement> getElements() {
70 if (elements == null) { 71 if (elements == null) {
71 elements = new EObjectContainmentEList<NaryRelationLinkElement>(NaryRelationLinkElement.class, this, PartialinterpretationPackage.NARY_RELATION_LINK__ELEMENTS); 72 elements = new EObjectContainmentEList<NaryRelationLinkElement>(NaryRelationLinkElement.class, this, PartialinterpretationPackage.NARY_RELATION_LINK__ELEMENTS);
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialComplexTypeInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialComplexTypeInterpretationImpl.java
index 07ee282d..c00b4278 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialComplexTypeInterpretationImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialComplexTypeInterpretationImpl.java
@@ -79,6 +79,7 @@ public class PartialComplexTypeInterpretationImpl extends PartialTypeInterpratat
79 * <!-- end-user-doc --> 79 * <!-- end-user-doc -->
80 * @generated 80 * @generated
81 */ 81 */
82 @Override
82 public EList<PartialComplexTypeInterpretation> getSupertypeInterpretation() { 83 public EList<PartialComplexTypeInterpretation> getSupertypeInterpretation() {
83 if (supertypeInterpretation == null) { 84 if (supertypeInterpretation == null) {
84 supertypeInterpretation = new EObjectResolvingEList<PartialComplexTypeInterpretation>(PartialComplexTypeInterpretation.class, this, PartialinterpretationPackage.PARTIAL_COMPLEX_TYPE_INTERPRETATION__SUPERTYPE_INTERPRETATION); 85 supertypeInterpretation = new EObjectResolvingEList<PartialComplexTypeInterpretation>(PartialComplexTypeInterpretation.class, this, PartialinterpretationPackage.PARTIAL_COMPLEX_TYPE_INTERPRETATION__SUPERTYPE_INTERPRETATION);
@@ -91,6 +92,7 @@ public class PartialComplexTypeInterpretationImpl extends PartialTypeInterpratat
91 * <!-- end-user-doc --> 92 * <!-- end-user-doc -->
92 * @generated 93 * @generated
93 */ 94 */
95 @Override
94 public TypeDeclaration getInterpretationOf() { 96 public TypeDeclaration getInterpretationOf() {
95 if (interpretationOf != null && interpretationOf.eIsProxy()) { 97 if (interpretationOf != null && interpretationOf.eIsProxy()) {
96 InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; 98 InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf;
@@ -117,6 +119,7 @@ public class PartialComplexTypeInterpretationImpl extends PartialTypeInterpratat
117 * <!-- end-user-doc --> 119 * <!-- end-user-doc -->
118 * @generated 120 * @generated
119 */ 121 */
122 @Override
120 public void setInterpretationOf(TypeDeclaration newInterpretationOf) { 123 public void setInterpretationOf(TypeDeclaration newInterpretationOf) {
121 TypeDeclaration oldInterpretationOf = interpretationOf; 124 TypeDeclaration oldInterpretationOf = interpretationOf;
122 interpretationOf = newInterpretationOf; 125 interpretationOf = newInterpretationOf;
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java
index 81b2ce8d..6d51f0db 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java
@@ -63,6 +63,7 @@ public class PartialConstantInterpretationImpl extends MinimalEObjectImpl.Contai
63 * <!-- end-user-doc --> 63 * <!-- end-user-doc -->
64 * @generated 64 * @generated
65 */ 65 */
66 @Override
66 public ConstantDeclaration getInterpretationOf() { 67 public ConstantDeclaration getInterpretationOf() {
67 if (interpretationOf != null && interpretationOf.eIsProxy()) { 68 if (interpretationOf != null && interpretationOf.eIsProxy()) {
68 InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; 69 InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf;
@@ -89,6 +90,7 @@ public class PartialConstantInterpretationImpl extends MinimalEObjectImpl.Contai
89 * <!-- end-user-doc --> 90 * <!-- end-user-doc -->
90 * @generated 91 * @generated
91 */ 92 */
93 @Override
92 public void setInterpretationOf(ConstantDeclaration newInterpretationOf) { 94 public void setInterpretationOf(ConstantDeclaration newInterpretationOf) {
93 ConstantDeclaration oldInterpretationOf = interpretationOf; 95 ConstantDeclaration oldInterpretationOf = interpretationOf;
94 interpretationOf = newInterpretationOf; 96 interpretationOf = newInterpretationOf;
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java
index 2d361e8e..855c4abc 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java
@@ -63,6 +63,7 @@ public class PartialFunctionInterpretationImpl extends MinimalEObjectImpl.Contai
63 * <!-- end-user-doc --> 63 * <!-- end-user-doc -->
64 * @generated 64 * @generated
65 */ 65 */
66 @Override
66 public FunctionDeclaration getInterpretationOf() { 67 public FunctionDeclaration getInterpretationOf() {
67 if (interpretationOf != null && interpretationOf.eIsProxy()) { 68 if (interpretationOf != null && interpretationOf.eIsProxy()) {
68 InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; 69 InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf;
@@ -89,6 +90,7 @@ public class PartialFunctionInterpretationImpl extends MinimalEObjectImpl.Contai
89 * <!-- end-user-doc --> 90 * <!-- end-user-doc -->
90 * @generated 91 * @generated
91 */ 92 */
93 @Override
92 public void setInterpretationOf(FunctionDeclaration newInterpretationOf) { 94 public void setInterpretationOf(FunctionDeclaration newInterpretationOf) {
93 FunctionDeclaration oldInterpretationOf = interpretationOf; 95 FunctionDeclaration oldInterpretationOf = interpretationOf;
94 interpretationOf = newInterpretationOf; 96 interpretationOf = newInterpretationOf;
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java
index bce3e2e0..9afdd8d2 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java
@@ -47,6 +47,7 @@ import org.eclipse.emf.ecore.util.InternalEList;
47 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getScopes <em>Scopes</em>}</li> 47 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getScopes <em>Scopes</em>}</li>
48 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getMinNewElements <em>Min New Elements</em>}</li> 48 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getMinNewElements <em>Min New Elements</em>}</li>
49 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getMaxNewElements <em>Max New Elements</em>}</li> 49 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getMaxNewElements <em>Max New Elements</em>}</li>
50 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getMinNewElementsHeuristic <em>Min New Elements Heuristic</em>}</li>
50 * </ul> 51 * </ul>
51 * 52 *
52 * @generated 53 * @generated
@@ -183,6 +184,26 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
183 protected int maxNewElements = MAX_NEW_ELEMENTS_EDEFAULT; 184 protected int maxNewElements = MAX_NEW_ELEMENTS_EDEFAULT;
184 185
185 /** 186 /**
187 * The default value of the '{@link #getMinNewElementsHeuristic() <em>Min New Elements Heuristic</em>}' attribute.
188 * <!-- begin-user-doc -->
189 * <!-- end-user-doc -->
190 * @see #getMinNewElementsHeuristic()
191 * @generated
192 * @ordered
193 */
194 protected static final int MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT = 0;
195
196 /**
197 * The cached value of the '{@link #getMinNewElementsHeuristic() <em>Min New Elements Heuristic</em>}' attribute.
198 * <!-- begin-user-doc -->
199 * <!-- end-user-doc -->
200 * @see #getMinNewElementsHeuristic()
201 * @generated
202 * @ordered
203 */
204 protected int minNewElementsHeuristic = MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT;
205
206 /**
186 * <!-- begin-user-doc --> 207 * <!-- begin-user-doc -->
187 * <!-- end-user-doc --> 208 * <!-- end-user-doc -->
188 * @generated 209 * @generated
@@ -206,6 +227,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
206 * <!-- end-user-doc --> 227 * <!-- end-user-doc -->
207 * @generated 228 * @generated
208 */ 229 */
230 @Override
209 public LogicProblem getProblem() { 231 public LogicProblem getProblem() {
210 if (problem != null && problem.eIsProxy()) { 232 if (problem != null && problem.eIsProxy()) {
211 InternalEObject oldProblem = (InternalEObject)problem; 233 InternalEObject oldProblem = (InternalEObject)problem;
@@ -232,6 +254,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
232 * <!-- end-user-doc --> 254 * <!-- end-user-doc -->
233 * @generated 255 * @generated
234 */ 256 */
257 @Override
235 public void setProblem(LogicProblem newProblem) { 258 public void setProblem(LogicProblem newProblem) {
236 LogicProblem oldProblem = problem; 259 LogicProblem oldProblem = problem;
237 problem = newProblem; 260 problem = newProblem;
@@ -244,6 +267,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
244 * <!-- end-user-doc --> 267 * <!-- end-user-doc -->
245 * @generated 268 * @generated
246 */ 269 */
270 @Override
247 public EList<PartialConstantInterpretation> getPartialconstantinterpretation() { 271 public EList<PartialConstantInterpretation> getPartialconstantinterpretation() {
248 if (partialconstantinterpretation == null) { 272 if (partialconstantinterpretation == null) {
249 partialconstantinterpretation = new EObjectContainmentEList<PartialConstantInterpretation>(PartialConstantInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION); 273 partialconstantinterpretation = new EObjectContainmentEList<PartialConstantInterpretation>(PartialConstantInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION);
@@ -256,6 +280,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
256 * <!-- end-user-doc --> 280 * <!-- end-user-doc -->
257 * @generated 281 * @generated
258 */ 282 */
283 @Override
259 public EList<PartialRelationInterpretation> getPartialrelationinterpretation() { 284 public EList<PartialRelationInterpretation> getPartialrelationinterpretation() {
260 if (partialrelationinterpretation == null) { 285 if (partialrelationinterpretation == null) {
261 partialrelationinterpretation = new EObjectContainmentEList<PartialRelationInterpretation>(PartialRelationInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION); 286 partialrelationinterpretation = new EObjectContainmentEList<PartialRelationInterpretation>(PartialRelationInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION);
@@ -268,6 +293,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
268 * <!-- end-user-doc --> 293 * <!-- end-user-doc -->
269 * @generated 294 * @generated
270 */ 295 */
296 @Override
271 public EList<PartialFunctionInterpretation> getPartialfunctioninterpretation() { 297 public EList<PartialFunctionInterpretation> getPartialfunctioninterpretation() {
272 if (partialfunctioninterpretation == null) { 298 if (partialfunctioninterpretation == null) {
273 partialfunctioninterpretation = new EObjectContainmentEList<PartialFunctionInterpretation>(PartialFunctionInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION); 299 partialfunctioninterpretation = new EObjectContainmentEList<PartialFunctionInterpretation>(PartialFunctionInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION);
@@ -280,6 +306,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
280 * <!-- end-user-doc --> 306 * <!-- end-user-doc -->
281 * @generated 307 * @generated
282 */ 308 */
309 @Override
283 public EList<DefinedElement> getNewElements() { 310 public EList<DefinedElement> getNewElements() {
284 if (newElements == null) { 311 if (newElements == null) {
285 newElements = new EObjectContainmentEList<DefinedElement>(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS); 312 newElements = new EObjectContainmentEList<DefinedElement>(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS);
@@ -292,6 +319,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
292 * <!-- end-user-doc --> 319 * <!-- end-user-doc -->
293 * @generated 320 * @generated
294 */ 321 */
322 @Override
295 public EList<PartialTypeInterpratation> getPartialtypeinterpratation() { 323 public EList<PartialTypeInterpratation> getPartialtypeinterpratation() {
296 if (partialtypeinterpratation == null) { 324 if (partialtypeinterpratation == null) {
297 partialtypeinterpratation = new EObjectContainmentEList<PartialTypeInterpratation>(PartialTypeInterpratation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION); 325 partialtypeinterpratation = new EObjectContainmentEList<PartialTypeInterpratation>(PartialTypeInterpratation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION);
@@ -304,6 +332,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
304 * <!-- end-user-doc --> 332 * <!-- end-user-doc -->
305 * @generated 333 * @generated
306 */ 334 */
335 @Override
307 public EList<DefinedElement> getOpenWorldElements() { 336 public EList<DefinedElement> getOpenWorldElements() {
308 if (openWorldElements == null) { 337 if (openWorldElements == null) {
309 openWorldElements = new EObjectContainmentEList<DefinedElement>(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENTS); 338 openWorldElements = new EObjectContainmentEList<DefinedElement>(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENTS);
@@ -316,6 +345,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
316 * <!-- end-user-doc --> 345 * <!-- end-user-doc -->
317 * @generated 346 * @generated
318 */ 347 */
348 @Override
319 public LogicProblem getProblemConainer() { 349 public LogicProblem getProblemConainer() {
320 return problemConainer; 350 return problemConainer;
321 } 351 }
@@ -340,6 +370,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
340 * <!-- end-user-doc --> 370 * <!-- end-user-doc -->
341 * @generated 371 * @generated
342 */ 372 */
373 @Override
343 public void setProblemConainer(LogicProblem newProblemConainer) { 374 public void setProblemConainer(LogicProblem newProblemConainer) {
344 if (newProblemConainer != problemConainer) { 375 if (newProblemConainer != problemConainer) {
345 NotificationChain msgs = null; 376 NotificationChain msgs = null;
@@ -359,6 +390,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
359 * <!-- end-user-doc --> 390 * <!-- end-user-doc -->
360 * @generated 391 * @generated
361 */ 392 */
393 @Override
362 public EList<Scope> getScopes() { 394 public EList<Scope> getScopes() {
363 if (scopes == null) { 395 if (scopes == null) {
364 scopes = new EObjectContainmentEList<Scope>(Scope.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__SCOPES); 396 scopes = new EObjectContainmentEList<Scope>(Scope.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__SCOPES);
@@ -371,6 +403,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
371 * <!-- end-user-doc --> 403 * <!-- end-user-doc -->
372 * @generated 404 * @generated
373 */ 405 */
406 @Override
374 public int getMinNewElements() { 407 public int getMinNewElements() {
375 return minNewElements; 408 return minNewElements;
376 } 409 }
@@ -380,6 +413,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
380 * <!-- end-user-doc --> 413 * <!-- end-user-doc -->
381 * @generated 414 * @generated
382 */ 415 */
416 @Override
383 public void setMinNewElements(int newMinNewElements) { 417 public void setMinNewElements(int newMinNewElements) {
384 int oldMinNewElements = minNewElements; 418 int oldMinNewElements = minNewElements;
385 minNewElements = newMinNewElements; 419 minNewElements = newMinNewElements;
@@ -392,6 +426,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
392 * <!-- end-user-doc --> 426 * <!-- end-user-doc -->
393 * @generated 427 * @generated
394 */ 428 */
429 @Override
395 public int getMaxNewElements() { 430 public int getMaxNewElements() {
396 return maxNewElements; 431 return maxNewElements;
397 } 432 }
@@ -401,6 +436,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
401 * <!-- end-user-doc --> 436 * <!-- end-user-doc -->
402 * @generated 437 * @generated
403 */ 438 */
439 @Override
404 public void setMaxNewElements(int newMaxNewElements) { 440 public void setMaxNewElements(int newMaxNewElements) {
405 int oldMaxNewElements = maxNewElements; 441 int oldMaxNewElements = maxNewElements;
406 maxNewElements = newMaxNewElements; 442 maxNewElements = newMaxNewElements;
@@ -414,6 +450,29 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
414 * @generated 450 * @generated
415 */ 451 */
416 @Override 452 @Override
453 public int getMinNewElementsHeuristic() {
454 return minNewElementsHeuristic;
455 }
456
457 /**
458 * <!-- begin-user-doc -->
459 * <!-- end-user-doc -->
460 * @generated
461 */
462 @Override
463 public void setMinNewElementsHeuristic(int newMinNewElementsHeuristic) {
464 int oldMinNewElementsHeuristic = minNewElementsHeuristic;
465 minNewElementsHeuristic = newMinNewElementsHeuristic;
466 if (eNotificationRequired())
467 eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC, oldMinNewElementsHeuristic, minNewElementsHeuristic));
468 }
469
470 /**
471 * <!-- begin-user-doc -->
472 * <!-- end-user-doc -->
473 * @generated
474 */
475 @Override
417 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { 476 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
418 switch (featureID) { 477 switch (featureID) {
419 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION: 478 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION:
@@ -467,6 +526,8 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
467 return getMinNewElements(); 526 return getMinNewElements();
468 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: 527 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS:
469 return getMaxNewElements(); 528 return getMaxNewElements();
529 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC:
530 return getMinNewElementsHeuristic();
470 } 531 }
471 return super.eGet(featureID, resolve, coreType); 532 return super.eGet(featureID, resolve, coreType);
472 } 533 }
@@ -520,6 +581,9 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
520 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: 581 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS:
521 setMaxNewElements((Integer)newValue); 582 setMaxNewElements((Integer)newValue);
522 return; 583 return;
584 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC:
585 setMinNewElementsHeuristic((Integer)newValue);
586 return;
523 } 587 }
524 super.eSet(featureID, newValue); 588 super.eSet(featureID, newValue);
525 } 589 }
@@ -565,6 +629,9 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
565 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: 629 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS:
566 setMaxNewElements(MAX_NEW_ELEMENTS_EDEFAULT); 630 setMaxNewElements(MAX_NEW_ELEMENTS_EDEFAULT);
567 return; 631 return;
632 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC:
633 setMinNewElementsHeuristic(MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT);
634 return;
568 } 635 }
569 super.eUnset(featureID); 636 super.eUnset(featureID);
570 } 637 }
@@ -599,6 +666,8 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
599 return minNewElements != MIN_NEW_ELEMENTS_EDEFAULT; 666 return minNewElements != MIN_NEW_ELEMENTS_EDEFAULT;
600 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: 667 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS:
601 return maxNewElements != MAX_NEW_ELEMENTS_EDEFAULT; 668 return maxNewElements != MAX_NEW_ELEMENTS_EDEFAULT;
669 case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC:
670 return minNewElementsHeuristic != MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT;
602 } 671 }
603 return super.eIsSet(featureID); 672 return super.eIsSet(featureID);
604 } 673 }
@@ -612,11 +681,13 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl
612 public String toString() { 681 public String toString() {
613 if (eIsProxy()) return super.toString(); 682 if (eIsProxy()) return super.toString();
614 683
615 StringBuffer result = new StringBuffer(super.toString()); 684 StringBuilder result = new StringBuilder(super.toString());
616 result.append(" (minNewElements: "); 685 result.append(" (minNewElements: ");
617 result.append(minNewElements); 686 result.append(minNewElements);
618 result.append(", maxNewElements: "); 687 result.append(", maxNewElements: ");
619 result.append(maxNewElements); 688 result.append(maxNewElements);
689 result.append(", minNewElementsHeuristic: ");
690 result.append(minNewElementsHeuristic);
620 result.append(')'); 691 result.append(')');
621 return result.toString(); 692 return result.toString();
622 } 693 }
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java
index 71aef9af..7ad06504 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java
@@ -106,6 +106,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai
106 * <!-- end-user-doc --> 106 * <!-- end-user-doc -->
107 * @generated 107 * @generated
108 */ 108 */
109 @Override
109 public RelationDeclaration getInterpretationOf() { 110 public RelationDeclaration getInterpretationOf() {
110 if (interpretationOf != null && interpretationOf.eIsProxy()) { 111 if (interpretationOf != null && interpretationOf.eIsProxy()) {
111 InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; 112 InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf;
@@ -132,6 +133,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai
132 * <!-- end-user-doc --> 133 * <!-- end-user-doc -->
133 * @generated 134 * @generated
134 */ 135 */
136 @Override
135 public void setInterpretationOf(RelationDeclaration newInterpretationOf) { 137 public void setInterpretationOf(RelationDeclaration newInterpretationOf) {
136 RelationDeclaration oldInterpretationOf = interpretationOf; 138 RelationDeclaration oldInterpretationOf = interpretationOf;
137 interpretationOf = newInterpretationOf; 139 interpretationOf = newInterpretationOf;
@@ -144,6 +146,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai
144 * <!-- end-user-doc --> 146 * <!-- end-user-doc -->
145 * @generated 147 * @generated
146 */ 148 */
149 @Override
147 public EList<RelationLink> getRelationlinks() { 150 public EList<RelationLink> getRelationlinks() {
148 if (relationlinks == null) { 151 if (relationlinks == null) {
149 relationlinks = new EObjectContainmentEList<RelationLink>(RelationLink.class, this, PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS); 152 relationlinks = new EObjectContainmentEList<RelationLink>(RelationLink.class, this, PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS);
@@ -156,6 +159,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai
156 * <!-- end-user-doc --> 159 * <!-- end-user-doc -->
157 * @generated 160 * @generated
158 */ 161 */
162 @Override
159 public TypeReference getParam1() { 163 public TypeReference getParam1() {
160 if (param1 != null && param1.eIsProxy()) { 164 if (param1 != null && param1.eIsProxy()) {
161 InternalEObject oldParam1 = (InternalEObject)param1; 165 InternalEObject oldParam1 = (InternalEObject)param1;
@@ -182,6 +186,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai
182 * <!-- end-user-doc --> 186 * <!-- end-user-doc -->
183 * @generated 187 * @generated
184 */ 188 */
189 @Override
185 public void setParam1(TypeReference newParam1) { 190 public void setParam1(TypeReference newParam1) {
186 TypeReference oldParam1 = param1; 191 TypeReference oldParam1 = param1;
187 param1 = newParam1; 192 param1 = newParam1;
@@ -194,6 +199,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai
194 * <!-- end-user-doc --> 199 * <!-- end-user-doc -->
195 * @generated 200 * @generated
196 */ 201 */
202 @Override
197 public TypeReference getParam2() { 203 public TypeReference getParam2() {
198 if (param2 != null && param2.eIsProxy()) { 204 if (param2 != null && param2.eIsProxy()) {
199 InternalEObject oldParam2 = (InternalEObject)param2; 205 InternalEObject oldParam2 = (InternalEObject)param2;
@@ -220,6 +226,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai
220 * <!-- end-user-doc --> 226 * <!-- end-user-doc -->
221 * @generated 227 * @generated
222 */ 228 */
229 @Override
223 public void setParam2(TypeReference newParam2) { 230 public void setParam2(TypeReference newParam2) {
224 TypeReference oldParam2 = param2; 231 TypeReference oldParam2 = param2;
225 param2 = newParam2; 232 param2 = newParam2;
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java
index da9b1472..51eabd2c 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java
@@ -76,6 +76,7 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C
76 * <!-- end-user-doc --> 76 * <!-- end-user-doc -->
77 * @generated 77 * @generated
78 */ 78 */
79 @Override
79 public EList<DefinedElement> getElements() { 80 public EList<DefinedElement> getElements() {
80 if (elements == null) { 81 if (elements == null) {
81 elements = new EObjectResolvingEList<DefinedElement>(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS); 82 elements = new EObjectResolvingEList<DefinedElement>(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS);
@@ -88,6 +89,7 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C
88 * <!-- end-user-doc --> 89 * <!-- end-user-doc -->
89 * @generated 90 * @generated
90 */ 91 */
92 @Override
91 public EList<Scope> getScopes() { 93 public EList<Scope> getScopes() {
92 if (scopes == null) { 94 if (scopes == null) {
93 scopes = new EObjectWithInverseResolvingEList<Scope>(Scope.class, this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION); 95 scopes = new EObjectWithInverseResolvingEList<Scope>(Scope.class, this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION);
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java
index af1db8a1..06ca4e37 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java
@@ -84,6 +84,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
84 * <!-- end-user-doc --> 84 * <!-- end-user-doc -->
85 * @generated 85 * @generated
86 */ 86 */
87 @Override
87 public PartialInterpretation createPartialInterpretation() { 88 public PartialInterpretation createPartialInterpretation() {
88 PartialInterpretationImpl partialInterpretation = new PartialInterpretationImpl(); 89 PartialInterpretationImpl partialInterpretation = new PartialInterpretationImpl();
89 return partialInterpretation; 90 return partialInterpretation;
@@ -94,6 +95,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
94 * <!-- end-user-doc --> 95 * <!-- end-user-doc -->
95 * @generated 96 * @generated
96 */ 97 */
98 @Override
97 public PartialConstantInterpretation createPartialConstantInterpretation() { 99 public PartialConstantInterpretation createPartialConstantInterpretation() {
98 PartialConstantInterpretationImpl partialConstantInterpretation = new PartialConstantInterpretationImpl(); 100 PartialConstantInterpretationImpl partialConstantInterpretation = new PartialConstantInterpretationImpl();
99 return partialConstantInterpretation; 101 return partialConstantInterpretation;
@@ -104,6 +106,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
104 * <!-- end-user-doc --> 106 * <!-- end-user-doc -->
105 * @generated 107 * @generated
106 */ 108 */
109 @Override
107 public PartialRelationInterpretation createPartialRelationInterpretation() { 110 public PartialRelationInterpretation createPartialRelationInterpretation() {
108 PartialRelationInterpretationImpl partialRelationInterpretation = new PartialRelationInterpretationImpl(); 111 PartialRelationInterpretationImpl partialRelationInterpretation = new PartialRelationInterpretationImpl();
109 return partialRelationInterpretation; 112 return partialRelationInterpretation;
@@ -114,6 +117,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
114 * <!-- end-user-doc --> 117 * <!-- end-user-doc -->
115 * @generated 118 * @generated
116 */ 119 */
120 @Override
117 public PartialFunctionInterpretation createPartialFunctionInterpretation() { 121 public PartialFunctionInterpretation createPartialFunctionInterpretation() {
118 PartialFunctionInterpretationImpl partialFunctionInterpretation = new PartialFunctionInterpretationImpl(); 122 PartialFunctionInterpretationImpl partialFunctionInterpretation = new PartialFunctionInterpretationImpl();
119 return partialFunctionInterpretation; 123 return partialFunctionInterpretation;
@@ -124,6 +128,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
124 * <!-- end-user-doc --> 128 * <!-- end-user-doc -->
125 * @generated 129 * @generated
126 */ 130 */
131 @Override
127 public UnaryElementRelationLink createUnaryElementRelationLink() { 132 public UnaryElementRelationLink createUnaryElementRelationLink() {
128 UnaryElementRelationLinkImpl unaryElementRelationLink = new UnaryElementRelationLinkImpl(); 133 UnaryElementRelationLinkImpl unaryElementRelationLink = new UnaryElementRelationLinkImpl();
129 return unaryElementRelationLink; 134 return unaryElementRelationLink;
@@ -134,6 +139,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
134 * <!-- end-user-doc --> 139 * <!-- end-user-doc -->
135 * @generated 140 * @generated
136 */ 141 */
142 @Override
137 public BinaryElementRelationLink createBinaryElementRelationLink() { 143 public BinaryElementRelationLink createBinaryElementRelationLink() {
138 BinaryElementRelationLinkImpl binaryElementRelationLink = new BinaryElementRelationLinkImpl(); 144 BinaryElementRelationLinkImpl binaryElementRelationLink = new BinaryElementRelationLinkImpl();
139 return binaryElementRelationLink; 145 return binaryElementRelationLink;
@@ -144,6 +150,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
144 * <!-- end-user-doc --> 150 * <!-- end-user-doc -->
145 * @generated 151 * @generated
146 */ 152 */
153 @Override
147 public NaryRelationLink createNaryRelationLink() { 154 public NaryRelationLink createNaryRelationLink() {
148 NaryRelationLinkImpl naryRelationLink = new NaryRelationLinkImpl(); 155 NaryRelationLinkImpl naryRelationLink = new NaryRelationLinkImpl();
149 return naryRelationLink; 156 return naryRelationLink;
@@ -154,6 +161,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
154 * <!-- end-user-doc --> 161 * <!-- end-user-doc -->
155 * @generated 162 * @generated
156 */ 163 */
164 @Override
157 public NaryRelationLinkElement createNaryRelationLinkElement() { 165 public NaryRelationLinkElement createNaryRelationLinkElement() {
158 NaryRelationLinkElementImpl naryRelationLinkElement = new NaryRelationLinkElementImpl(); 166 NaryRelationLinkElementImpl naryRelationLinkElement = new NaryRelationLinkElementImpl();
159 return naryRelationLinkElement; 167 return naryRelationLinkElement;
@@ -164,6 +172,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
164 * <!-- end-user-doc --> 172 * <!-- end-user-doc -->
165 * @generated 173 * @generated
166 */ 174 */
175 @Override
167 public BooleanElement createBooleanElement() { 176 public BooleanElement createBooleanElement() {
168 BooleanElementImpl booleanElement = new BooleanElementImpl(); 177 BooleanElementImpl booleanElement = new BooleanElementImpl();
169 return booleanElement; 178 return booleanElement;
@@ -174,6 +183,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
174 * <!-- end-user-doc --> 183 * <!-- end-user-doc -->
175 * @generated 184 * @generated
176 */ 185 */
186 @Override
177 public IntegerElement createIntegerElement() { 187 public IntegerElement createIntegerElement() {
178 IntegerElementImpl integerElement = new IntegerElementImpl(); 188 IntegerElementImpl integerElement = new IntegerElementImpl();
179 return integerElement; 189 return integerElement;
@@ -184,6 +194,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
184 * <!-- end-user-doc --> 194 * <!-- end-user-doc -->
185 * @generated 195 * @generated
186 */ 196 */
197 @Override
187 public RealElement createRealElement() { 198 public RealElement createRealElement() {
188 RealElementImpl realElement = new RealElementImpl(); 199 RealElementImpl realElement = new RealElementImpl();
189 return realElement; 200 return realElement;
@@ -194,6 +205,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
194 * <!-- end-user-doc --> 205 * <!-- end-user-doc -->
195 * @generated 206 * @generated
196 */ 207 */
208 @Override
197 public StringElement createStringElement() { 209 public StringElement createStringElement() {
198 StringElementImpl stringElement = new StringElementImpl(); 210 StringElementImpl stringElement = new StringElementImpl();
199 return stringElement; 211 return stringElement;
@@ -204,6 +216,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
204 * <!-- end-user-doc --> 216 * <!-- end-user-doc -->
205 * @generated 217 * @generated
206 */ 218 */
219 @Override
207 public Scope createScope() { 220 public Scope createScope() {
208 ScopeImpl scope = new ScopeImpl(); 221 ScopeImpl scope = new ScopeImpl();
209 return scope; 222 return scope;
@@ -214,6 +227,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
214 * <!-- end-user-doc --> 227 * <!-- end-user-doc -->
215 * @generated 228 * @generated
216 */ 229 */
230 @Override
217 public PartialBooleanInterpretation createPartialBooleanInterpretation() { 231 public PartialBooleanInterpretation createPartialBooleanInterpretation() {
218 PartialBooleanInterpretationImpl partialBooleanInterpretation = new PartialBooleanInterpretationImpl(); 232 PartialBooleanInterpretationImpl partialBooleanInterpretation = new PartialBooleanInterpretationImpl();
219 return partialBooleanInterpretation; 233 return partialBooleanInterpretation;
@@ -224,6 +238,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
224 * <!-- end-user-doc --> 238 * <!-- end-user-doc -->
225 * @generated 239 * @generated
226 */ 240 */
241 @Override
227 public PartialIntegerInterpretation createPartialIntegerInterpretation() { 242 public PartialIntegerInterpretation createPartialIntegerInterpretation() {
228 PartialIntegerInterpretationImpl partialIntegerInterpretation = new PartialIntegerInterpretationImpl(); 243 PartialIntegerInterpretationImpl partialIntegerInterpretation = new PartialIntegerInterpretationImpl();
229 return partialIntegerInterpretation; 244 return partialIntegerInterpretation;
@@ -234,6 +249,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
234 * <!-- end-user-doc --> 249 * <!-- end-user-doc -->
235 * @generated 250 * @generated
236 */ 251 */
252 @Override
237 public PartialRealInterpretation createPartialRealInterpretation() { 253 public PartialRealInterpretation createPartialRealInterpretation() {
238 PartialRealInterpretationImpl partialRealInterpretation = new PartialRealInterpretationImpl(); 254 PartialRealInterpretationImpl partialRealInterpretation = new PartialRealInterpretationImpl();
239 return partialRealInterpretation; 255 return partialRealInterpretation;
@@ -244,6 +260,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
244 * <!-- end-user-doc --> 260 * <!-- end-user-doc -->
245 * @generated 261 * @generated
246 */ 262 */
263 @Override
247 public PartialStringInterpretation createPartialStringInterpretation() { 264 public PartialStringInterpretation createPartialStringInterpretation() {
248 PartialStringInterpretationImpl partialStringInterpretation = new PartialStringInterpretationImpl(); 265 PartialStringInterpretationImpl partialStringInterpretation = new PartialStringInterpretationImpl();
249 return partialStringInterpretation; 266 return partialStringInterpretation;
@@ -254,6 +271,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
254 * <!-- end-user-doc --> 271 * <!-- end-user-doc -->
255 * @generated 272 * @generated
256 */ 273 */
274 @Override
257 public PartialComplexTypeInterpretation createPartialComplexTypeInterpretation() { 275 public PartialComplexTypeInterpretation createPartialComplexTypeInterpretation() {
258 PartialComplexTypeInterpretationImpl partialComplexTypeInterpretation = new PartialComplexTypeInterpretationImpl(); 276 PartialComplexTypeInterpretationImpl partialComplexTypeInterpretation = new PartialComplexTypeInterpretationImpl();
259 return partialComplexTypeInterpretation; 277 return partialComplexTypeInterpretation;
@@ -264,6 +282,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa
264 * <!-- end-user-doc --> 282 * <!-- end-user-doc -->
265 * @generated 283 * @generated
266 */ 284 */
285 @Override
267 public PartialinterpretationPackage getPartialinterpretationPackage() { 286 public PartialinterpretationPackage getPartialinterpretationPackage() {
268 return (PartialinterpretationPackage)getEPackage(); 287 return (PartialinterpretationPackage)getEPackage();
269 } 288 }
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java
index a21dc306..1ea3a11d 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java
@@ -227,7 +227,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
227 227
228 /** 228 /**
229 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. 229 * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
230 * 230 *
231 * <p>This method is used to initialize {@link PartialinterpretationPackage#eINSTANCE} when that field is accessed. 231 * <p>This method is used to initialize {@link PartialinterpretationPackage#eINSTANCE} when that field is accessed.
232 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. 232 * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
233 * <!-- begin-user-doc --> 233 * <!-- begin-user-doc -->
@@ -241,7 +241,8 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
241 if (isInited) return (PartialinterpretationPackage)EPackage.Registry.INSTANCE.getEPackage(PartialinterpretationPackage.eNS_URI); 241 if (isInited) return (PartialinterpretationPackage)EPackage.Registry.INSTANCE.getEPackage(PartialinterpretationPackage.eNS_URI);
242 242
243 // Obtain or create and register package 243 // Obtain or create and register package
244 PartialinterpretationPackageImpl thePartialinterpretationPackage = (PartialinterpretationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PartialinterpretationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PartialinterpretationPackageImpl()); 244 Object registeredPartialinterpretationPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
245 PartialinterpretationPackageImpl thePartialinterpretationPackage = registeredPartialinterpretationPackage instanceof PartialinterpretationPackageImpl ? (PartialinterpretationPackageImpl)registeredPartialinterpretationPackage : new PartialinterpretationPackageImpl();
245 246
246 isInited = true; 247 isInited = true;
247 248
@@ -258,7 +259,6 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
258 // Mark meta-data to indicate it can't be changed 259 // Mark meta-data to indicate it can't be changed
259 thePartialinterpretationPackage.freeze(); 260 thePartialinterpretationPackage.freeze();
260 261
261
262 // Update the registry and return the package 262 // Update the registry and return the package
263 EPackage.Registry.INSTANCE.put(PartialinterpretationPackage.eNS_URI, thePartialinterpretationPackage); 263 EPackage.Registry.INSTANCE.put(PartialinterpretationPackage.eNS_URI, thePartialinterpretationPackage);
264 return thePartialinterpretationPackage; 264 return thePartialinterpretationPackage;
@@ -269,6 +269,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
269 * <!-- end-user-doc --> 269 * <!-- end-user-doc -->
270 * @generated 270 * @generated
271 */ 271 */
272 @Override
272 public EClass getPartialInterpretation() { 273 public EClass getPartialInterpretation() {
273 return partialInterpretationEClass; 274 return partialInterpretationEClass;
274 } 275 }
@@ -278,6 +279,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
278 * <!-- end-user-doc --> 279 * <!-- end-user-doc -->
279 * @generated 280 * @generated
280 */ 281 */
282 @Override
281 public EReference getPartialInterpretation_Problem() { 283 public EReference getPartialInterpretation_Problem() {
282 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(0); 284 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(0);
283 } 285 }
@@ -287,6 +289,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
287 * <!-- end-user-doc --> 289 * <!-- end-user-doc -->
288 * @generated 290 * @generated
289 */ 291 */
292 @Override
290 public EReference getPartialInterpretation_Partialconstantinterpretation() { 293 public EReference getPartialInterpretation_Partialconstantinterpretation() {
291 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(1); 294 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(1);
292 } 295 }
@@ -296,6 +299,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
296 * <!-- end-user-doc --> 299 * <!-- end-user-doc -->
297 * @generated 300 * @generated
298 */ 301 */
302 @Override
299 public EReference getPartialInterpretation_Partialrelationinterpretation() { 303 public EReference getPartialInterpretation_Partialrelationinterpretation() {
300 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(2); 304 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(2);
301 } 305 }
@@ -305,6 +309,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
305 * <!-- end-user-doc --> 309 * <!-- end-user-doc -->
306 * @generated 310 * @generated
307 */ 311 */
312 @Override
308 public EReference getPartialInterpretation_Partialfunctioninterpretation() { 313 public EReference getPartialInterpretation_Partialfunctioninterpretation() {
309 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(3); 314 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(3);
310 } 315 }
@@ -314,6 +319,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
314 * <!-- end-user-doc --> 319 * <!-- end-user-doc -->
315 * @generated 320 * @generated
316 */ 321 */
322 @Override
317 public EReference getPartialInterpretation_NewElements() { 323 public EReference getPartialInterpretation_NewElements() {
318 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(4); 324 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(4);
319 } 325 }
@@ -323,6 +329,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
323 * <!-- end-user-doc --> 329 * <!-- end-user-doc -->
324 * @generated 330 * @generated
325 */ 331 */
332 @Override
326 public EReference getPartialInterpretation_Partialtypeinterpratation() { 333 public EReference getPartialInterpretation_Partialtypeinterpratation() {
327 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(5); 334 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(5);
328 } 335 }
@@ -332,6 +339,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
332 * <!-- end-user-doc --> 339 * <!-- end-user-doc -->
333 * @generated 340 * @generated
334 */ 341 */
342 @Override
335 public EReference getPartialInterpretation_OpenWorldElements() { 343 public EReference getPartialInterpretation_OpenWorldElements() {
336 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(6); 344 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(6);
337 } 345 }
@@ -341,6 +349,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
341 * <!-- end-user-doc --> 349 * <!-- end-user-doc -->
342 * @generated 350 * @generated
343 */ 351 */
352 @Override
344 public EReference getPartialInterpretation_ProblemConainer() { 353 public EReference getPartialInterpretation_ProblemConainer() {
345 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(7); 354 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(7);
346 } 355 }
@@ -350,6 +359,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
350 * <!-- end-user-doc --> 359 * <!-- end-user-doc -->
351 * @generated 360 * @generated
352 */ 361 */
362 @Override
353 public EReference getPartialInterpretation_Scopes() { 363 public EReference getPartialInterpretation_Scopes() {
354 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(8); 364 return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(8);
355 } 365 }
@@ -359,6 +369,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
359 * <!-- end-user-doc --> 369 * <!-- end-user-doc -->
360 * @generated 370 * @generated
361 */ 371 */
372 @Override
362 public EAttribute getPartialInterpretation_MinNewElements() { 373 public EAttribute getPartialInterpretation_MinNewElements() {
363 return (EAttribute)partialInterpretationEClass.getEStructuralFeatures().get(9); 374 return (EAttribute)partialInterpretationEClass.getEStructuralFeatures().get(9);
364 } 375 }
@@ -368,6 +379,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
368 * <!-- end-user-doc --> 379 * <!-- end-user-doc -->
369 * @generated 380 * @generated
370 */ 381 */
382 @Override
371 public EAttribute getPartialInterpretation_MaxNewElements() { 383 public EAttribute getPartialInterpretation_MaxNewElements() {
372 return (EAttribute)partialInterpretationEClass.getEStructuralFeatures().get(10); 384 return (EAttribute)partialInterpretationEClass.getEStructuralFeatures().get(10);
373 } 385 }
@@ -377,6 +389,17 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
377 * <!-- end-user-doc --> 389 * <!-- end-user-doc -->
378 * @generated 390 * @generated
379 */ 391 */
392 @Override
393 public EAttribute getPartialInterpretation_MinNewElementsHeuristic() {
394 return (EAttribute)partialInterpretationEClass.getEStructuralFeatures().get(11);
395 }
396
397 /**
398 * <!-- begin-user-doc -->
399 * <!-- end-user-doc -->
400 * @generated
401 */
402 @Override
380 public EClass getPartialConstantInterpretation() { 403 public EClass getPartialConstantInterpretation() {
381 return partialConstantInterpretationEClass; 404 return partialConstantInterpretationEClass;
382 } 405 }
@@ -386,6 +409,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
386 * <!-- end-user-doc --> 409 * <!-- end-user-doc -->
387 * @generated 410 * @generated
388 */ 411 */
412 @Override
389 public EReference getPartialConstantInterpretation_InterpretationOf() { 413 public EReference getPartialConstantInterpretation_InterpretationOf() {
390 return (EReference)partialConstantInterpretationEClass.getEStructuralFeatures().get(0); 414 return (EReference)partialConstantInterpretationEClass.getEStructuralFeatures().get(0);
391 } 415 }
@@ -395,6 +419,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
395 * <!-- end-user-doc --> 419 * <!-- end-user-doc -->
396 * @generated 420 * @generated
397 */ 421 */
422 @Override
398 public EClass getPartialRelationInterpretation() { 423 public EClass getPartialRelationInterpretation() {
399 return partialRelationInterpretationEClass; 424 return partialRelationInterpretationEClass;
400 } 425 }
@@ -404,6 +429,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
404 * <!-- end-user-doc --> 429 * <!-- end-user-doc -->
405 * @generated 430 * @generated
406 */ 431 */
432 @Override
407 public EReference getPartialRelationInterpretation_InterpretationOf() { 433 public EReference getPartialRelationInterpretation_InterpretationOf() {
408 return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(0); 434 return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(0);
409 } 435 }
@@ -413,6 +439,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
413 * <!-- end-user-doc --> 439 * <!-- end-user-doc -->
414 * @generated 440 * @generated
415 */ 441 */
442 @Override
416 public EReference getPartialRelationInterpretation_Relationlinks() { 443 public EReference getPartialRelationInterpretation_Relationlinks() {
417 return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(1); 444 return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(1);
418 } 445 }
@@ -422,6 +449,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
422 * <!-- end-user-doc --> 449 * <!-- end-user-doc -->
423 * @generated 450 * @generated
424 */ 451 */
452 @Override
425 public EReference getPartialRelationInterpretation_Param1() { 453 public EReference getPartialRelationInterpretation_Param1() {
426 return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(2); 454 return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(2);
427 } 455 }
@@ -431,6 +459,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
431 * <!-- end-user-doc --> 459 * <!-- end-user-doc -->
432 * @generated 460 * @generated
433 */ 461 */
462 @Override
434 public EReference getPartialRelationInterpretation_Param2() { 463 public EReference getPartialRelationInterpretation_Param2() {
435 return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(3); 464 return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(3);
436 } 465 }
@@ -440,6 +469,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
440 * <!-- end-user-doc --> 469 * <!-- end-user-doc -->
441 * @generated 470 * @generated
442 */ 471 */
472 @Override
443 public EClass getPartialFunctionInterpretation() { 473 public EClass getPartialFunctionInterpretation() {
444 return partialFunctionInterpretationEClass; 474 return partialFunctionInterpretationEClass;
445 } 475 }
@@ -449,6 +479,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
449 * <!-- end-user-doc --> 479 * <!-- end-user-doc -->
450 * @generated 480 * @generated
451 */ 481 */
482 @Override
452 public EReference getPartialFunctionInterpretation_InterpretationOf() { 483 public EReference getPartialFunctionInterpretation_InterpretationOf() {
453 return (EReference)partialFunctionInterpretationEClass.getEStructuralFeatures().get(0); 484 return (EReference)partialFunctionInterpretationEClass.getEStructuralFeatures().get(0);
454 } 485 }
@@ -458,6 +489,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
458 * <!-- end-user-doc --> 489 * <!-- end-user-doc -->
459 * @generated 490 * @generated
460 */ 491 */
492 @Override
461 public EClass getPartialTypeInterpratation() { 493 public EClass getPartialTypeInterpratation() {
462 return partialTypeInterpratationEClass; 494 return partialTypeInterpratationEClass;
463 } 495 }
@@ -467,6 +499,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
467 * <!-- end-user-doc --> 499 * <!-- end-user-doc -->
468 * @generated 500 * @generated
469 */ 501 */
502 @Override
470 public EReference getPartialTypeInterpratation_Elements() { 503 public EReference getPartialTypeInterpratation_Elements() {
471 return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(0); 504 return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(0);
472 } 505 }
@@ -476,6 +509,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
476 * <!-- end-user-doc --> 509 * <!-- end-user-doc -->
477 * @generated 510 * @generated
478 */ 511 */
512 @Override
479 public EReference getPartialTypeInterpratation_Scopes() { 513 public EReference getPartialTypeInterpratation_Scopes() {
480 return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(1); 514 return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(1);
481 } 515 }
@@ -485,6 +519,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
485 * <!-- end-user-doc --> 519 * <!-- end-user-doc -->
486 * @generated 520 * @generated
487 */ 521 */
522 @Override
488 public EClass getRelationLink() { 523 public EClass getRelationLink() {
489 return relationLinkEClass; 524 return relationLinkEClass;
490 } 525 }
@@ -494,6 +529,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
494 * <!-- end-user-doc --> 529 * <!-- end-user-doc -->
495 * @generated 530 * @generated
496 */ 531 */
532 @Override
497 public EClass getUnaryElementRelationLink() { 533 public EClass getUnaryElementRelationLink() {
498 return unaryElementRelationLinkEClass; 534 return unaryElementRelationLinkEClass;
499 } 535 }
@@ -503,6 +539,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
503 * <!-- end-user-doc --> 539 * <!-- end-user-doc -->
504 * @generated 540 * @generated
505 */ 541 */
542 @Override
506 public EReference getUnaryElementRelationLink_Param1() { 543 public EReference getUnaryElementRelationLink_Param1() {
507 return (EReference)unaryElementRelationLinkEClass.getEStructuralFeatures().get(0); 544 return (EReference)unaryElementRelationLinkEClass.getEStructuralFeatures().get(0);
508 } 545 }
@@ -512,6 +549,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
512 * <!-- end-user-doc --> 549 * <!-- end-user-doc -->
513 * @generated 550 * @generated
514 */ 551 */
552 @Override
515 public EClass getBinaryElementRelationLink() { 553 public EClass getBinaryElementRelationLink() {
516 return binaryElementRelationLinkEClass; 554 return binaryElementRelationLinkEClass;
517 } 555 }
@@ -521,6 +559,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
521 * <!-- end-user-doc --> 559 * <!-- end-user-doc -->
522 * @generated 560 * @generated
523 */ 561 */
562 @Override
524 public EReference getBinaryElementRelationLink_Param1() { 563 public EReference getBinaryElementRelationLink_Param1() {
525 return (EReference)binaryElementRelationLinkEClass.getEStructuralFeatures().get(0); 564 return (EReference)binaryElementRelationLinkEClass.getEStructuralFeatures().get(0);
526 } 565 }
@@ -530,6 +569,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
530 * <!-- end-user-doc --> 569 * <!-- end-user-doc -->
531 * @generated 570 * @generated
532 */ 571 */
572 @Override
533 public EReference getBinaryElementRelationLink_Param2() { 573 public EReference getBinaryElementRelationLink_Param2() {
534 return (EReference)binaryElementRelationLinkEClass.getEStructuralFeatures().get(1); 574 return (EReference)binaryElementRelationLinkEClass.getEStructuralFeatures().get(1);
535 } 575 }
@@ -539,6 +579,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
539 * <!-- end-user-doc --> 579 * <!-- end-user-doc -->
540 * @generated 580 * @generated
541 */ 581 */
582 @Override
542 public EClass getNaryRelationLink() { 583 public EClass getNaryRelationLink() {
543 return naryRelationLinkEClass; 584 return naryRelationLinkEClass;
544 } 585 }
@@ -548,6 +589,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
548 * <!-- end-user-doc --> 589 * <!-- end-user-doc -->
549 * @generated 590 * @generated
550 */ 591 */
592 @Override
551 public EReference getNaryRelationLink_Elements() { 593 public EReference getNaryRelationLink_Elements() {
552 return (EReference)naryRelationLinkEClass.getEStructuralFeatures().get(0); 594 return (EReference)naryRelationLinkEClass.getEStructuralFeatures().get(0);
553 } 595 }
@@ -557,6 +599,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
557 * <!-- end-user-doc --> 599 * <!-- end-user-doc -->
558 * @generated 600 * @generated
559 */ 601 */
602 @Override
560 public EClass getNaryRelationLinkElement() { 603 public EClass getNaryRelationLinkElement() {
561 return naryRelationLinkElementEClass; 604 return naryRelationLinkElementEClass;
562 } 605 }
@@ -566,6 +609,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
566 * <!-- end-user-doc --> 609 * <!-- end-user-doc -->
567 * @generated 610 * @generated
568 */ 611 */
612 @Override
569 public EAttribute getNaryRelationLinkElement_Index() { 613 public EAttribute getNaryRelationLinkElement_Index() {
570 return (EAttribute)naryRelationLinkElementEClass.getEStructuralFeatures().get(0); 614 return (EAttribute)naryRelationLinkElementEClass.getEStructuralFeatures().get(0);
571 } 615 }
@@ -575,6 +619,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
575 * <!-- end-user-doc --> 619 * <!-- end-user-doc -->
576 * @generated 620 * @generated
577 */ 621 */
622 @Override
578 public EReference getNaryRelationLinkElement_Param() { 623 public EReference getNaryRelationLinkElement_Param() {
579 return (EReference)naryRelationLinkElementEClass.getEStructuralFeatures().get(1); 624 return (EReference)naryRelationLinkElementEClass.getEStructuralFeatures().get(1);
580 } 625 }
@@ -584,6 +629,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
584 * <!-- end-user-doc --> 629 * <!-- end-user-doc -->
585 * @generated 630 * @generated
586 */ 631 */
632 @Override
587 public EClass getPrimitiveElement() { 633 public EClass getPrimitiveElement() {
588 return primitiveElementEClass; 634 return primitiveElementEClass;
589 } 635 }
@@ -593,6 +639,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
593 * <!-- end-user-doc --> 639 * <!-- end-user-doc -->
594 * @generated 640 * @generated
595 */ 641 */
642 @Override
596 public EAttribute getPrimitiveElement_ValueSet() { 643 public EAttribute getPrimitiveElement_ValueSet() {
597 return (EAttribute)primitiveElementEClass.getEStructuralFeatures().get(0); 644 return (EAttribute)primitiveElementEClass.getEStructuralFeatures().get(0);
598 } 645 }
@@ -602,6 +649,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
602 * <!-- end-user-doc --> 649 * <!-- end-user-doc -->
603 * @generated 650 * @generated
604 */ 651 */
652 @Override
605 public EClass getBooleanElement() { 653 public EClass getBooleanElement() {
606 return booleanElementEClass; 654 return booleanElementEClass;
607 } 655 }
@@ -611,6 +659,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
611 * <!-- end-user-doc --> 659 * <!-- end-user-doc -->
612 * @generated 660 * @generated
613 */ 661 */
662 @Override
614 public EAttribute getBooleanElement_Value() { 663 public EAttribute getBooleanElement_Value() {
615 return (EAttribute)booleanElementEClass.getEStructuralFeatures().get(0); 664 return (EAttribute)booleanElementEClass.getEStructuralFeatures().get(0);
616 } 665 }
@@ -620,6 +669,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
620 * <!-- end-user-doc --> 669 * <!-- end-user-doc -->
621 * @generated 670 * @generated
622 */ 671 */
672 @Override
623 public EClass getIntegerElement() { 673 public EClass getIntegerElement() {
624 return integerElementEClass; 674 return integerElementEClass;
625 } 675 }
@@ -629,6 +679,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
629 * <!-- end-user-doc --> 679 * <!-- end-user-doc -->
630 * @generated 680 * @generated
631 */ 681 */
682 @Override
632 public EAttribute getIntegerElement_Value() { 683 public EAttribute getIntegerElement_Value() {
633 return (EAttribute)integerElementEClass.getEStructuralFeatures().get(0); 684 return (EAttribute)integerElementEClass.getEStructuralFeatures().get(0);
634 } 685 }
@@ -638,6 +689,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
638 * <!-- end-user-doc --> 689 * <!-- end-user-doc -->
639 * @generated 690 * @generated
640 */ 691 */
692 @Override
641 public EClass getRealElement() { 693 public EClass getRealElement() {
642 return realElementEClass; 694 return realElementEClass;
643 } 695 }
@@ -647,6 +699,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
647 * <!-- end-user-doc --> 699 * <!-- end-user-doc -->
648 * @generated 700 * @generated
649 */ 701 */
702 @Override
650 public EAttribute getRealElement_Value() { 703 public EAttribute getRealElement_Value() {
651 return (EAttribute)realElementEClass.getEStructuralFeatures().get(0); 704 return (EAttribute)realElementEClass.getEStructuralFeatures().get(0);
652 } 705 }
@@ -656,6 +709,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
656 * <!-- end-user-doc --> 709 * <!-- end-user-doc -->
657 * @generated 710 * @generated
658 */ 711 */
712 @Override
659 public EClass getStringElement() { 713 public EClass getStringElement() {
660 return stringElementEClass; 714 return stringElementEClass;
661 } 715 }
@@ -665,6 +719,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
665 * <!-- end-user-doc --> 719 * <!-- end-user-doc -->
666 * @generated 720 * @generated
667 */ 721 */
722 @Override
668 public EAttribute getStringElement_Value() { 723 public EAttribute getStringElement_Value() {
669 return (EAttribute)stringElementEClass.getEStructuralFeatures().get(0); 724 return (EAttribute)stringElementEClass.getEStructuralFeatures().get(0);
670 } 725 }
@@ -674,6 +729,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
674 * <!-- end-user-doc --> 729 * <!-- end-user-doc -->
675 * @generated 730 * @generated
676 */ 731 */
732 @Override
677 public EClass getScope() { 733 public EClass getScope() {
678 return scopeEClass; 734 return scopeEClass;
679 } 735 }
@@ -683,6 +739,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
683 * <!-- end-user-doc --> 739 * <!-- end-user-doc -->
684 * @generated 740 * @generated
685 */ 741 */
742 @Override
686 public EAttribute getScope_MinNewElements() { 743 public EAttribute getScope_MinNewElements() {
687 return (EAttribute)scopeEClass.getEStructuralFeatures().get(0); 744 return (EAttribute)scopeEClass.getEStructuralFeatures().get(0);
688 } 745 }
@@ -692,6 +749,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
692 * <!-- end-user-doc --> 749 * <!-- end-user-doc -->
693 * @generated 750 * @generated
694 */ 751 */
752 @Override
695 public EAttribute getScope_MaxNewElements() { 753 public EAttribute getScope_MaxNewElements() {
696 return (EAttribute)scopeEClass.getEStructuralFeatures().get(1); 754 return (EAttribute)scopeEClass.getEStructuralFeatures().get(1);
697 } 755 }
@@ -701,6 +759,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
701 * <!-- end-user-doc --> 759 * <!-- end-user-doc -->
702 * @generated 760 * @generated
703 */ 761 */
762 @Override
704 public EReference getScope_TargetTypeInterpretation() { 763 public EReference getScope_TargetTypeInterpretation() {
705 return (EReference)scopeEClass.getEStructuralFeatures().get(2); 764 return (EReference)scopeEClass.getEStructuralFeatures().get(2);
706 } 765 }
@@ -710,6 +769,17 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
710 * <!-- end-user-doc --> 769 * <!-- end-user-doc -->
711 * @generated 770 * @generated
712 */ 771 */
772 @Override
773 public EAttribute getScope_MinNewElementsHeuristic() {
774 return (EAttribute)scopeEClass.getEStructuralFeatures().get(3);
775 }
776
777 /**
778 * <!-- begin-user-doc -->
779 * <!-- end-user-doc -->
780 * @generated
781 */
782 @Override
713 public EClass getPartialPrimitiveInterpretation() { 783 public EClass getPartialPrimitiveInterpretation() {
714 return partialPrimitiveInterpretationEClass; 784 return partialPrimitiveInterpretationEClass;
715 } 785 }
@@ -719,6 +789,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
719 * <!-- end-user-doc --> 789 * <!-- end-user-doc -->
720 * @generated 790 * @generated
721 */ 791 */
792 @Override
722 public EClass getPartialBooleanInterpretation() { 793 public EClass getPartialBooleanInterpretation() {
723 return partialBooleanInterpretationEClass; 794 return partialBooleanInterpretationEClass;
724 } 795 }
@@ -728,6 +799,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
728 * <!-- end-user-doc --> 799 * <!-- end-user-doc -->
729 * @generated 800 * @generated
730 */ 801 */
802 @Override
731 public EClass getPartialIntegerInterpretation() { 803 public EClass getPartialIntegerInterpretation() {
732 return partialIntegerInterpretationEClass; 804 return partialIntegerInterpretationEClass;
733 } 805 }
@@ -737,6 +809,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
737 * <!-- end-user-doc --> 809 * <!-- end-user-doc -->
738 * @generated 810 * @generated
739 */ 811 */
812 @Override
740 public EClass getPartialRealInterpretation() { 813 public EClass getPartialRealInterpretation() {
741 return partialRealInterpretationEClass; 814 return partialRealInterpretationEClass;
742 } 815 }
@@ -746,6 +819,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
746 * <!-- end-user-doc --> 819 * <!-- end-user-doc -->
747 * @generated 820 * @generated
748 */ 821 */
822 @Override
749 public EClass getPartialStringInterpretation() { 823 public EClass getPartialStringInterpretation() {
750 return partialStringInterpretationEClass; 824 return partialStringInterpretationEClass;
751 } 825 }
@@ -755,6 +829,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
755 * <!-- end-user-doc --> 829 * <!-- end-user-doc -->
756 * @generated 830 * @generated
757 */ 831 */
832 @Override
758 public EClass getPartialComplexTypeInterpretation() { 833 public EClass getPartialComplexTypeInterpretation() {
759 return partialComplexTypeInterpretationEClass; 834 return partialComplexTypeInterpretationEClass;
760 } 835 }
@@ -764,6 +839,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
764 * <!-- end-user-doc --> 839 * <!-- end-user-doc -->
765 * @generated 840 * @generated
766 */ 841 */
842 @Override
767 public EReference getPartialComplexTypeInterpretation_SupertypeInterpretation() { 843 public EReference getPartialComplexTypeInterpretation_SupertypeInterpretation() {
768 return (EReference)partialComplexTypeInterpretationEClass.getEStructuralFeatures().get(0); 844 return (EReference)partialComplexTypeInterpretationEClass.getEStructuralFeatures().get(0);
769 } 845 }
@@ -773,6 +849,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
773 * <!-- end-user-doc --> 849 * <!-- end-user-doc -->
774 * @generated 850 * @generated
775 */ 851 */
852 @Override
776 public EReference getPartialComplexTypeInterpretation_InterpretationOf() { 853 public EReference getPartialComplexTypeInterpretation_InterpretationOf() {
777 return (EReference)partialComplexTypeInterpretationEClass.getEStructuralFeatures().get(1); 854 return (EReference)partialComplexTypeInterpretationEClass.getEStructuralFeatures().get(1);
778 } 855 }
@@ -782,6 +859,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
782 * <!-- end-user-doc --> 859 * <!-- end-user-doc -->
783 * @generated 860 * @generated
784 */ 861 */
862 @Override
785 public PartialinterpretationFactory getPartialinterpretationFactory() { 863 public PartialinterpretationFactory getPartialinterpretationFactory() {
786 return (PartialinterpretationFactory)getEFactoryInstance(); 864 return (PartialinterpretationFactory)getEFactoryInstance();
787 } 865 }
@@ -817,6 +895,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
817 createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__SCOPES); 895 createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__SCOPES);
818 createEAttribute(partialInterpretationEClass, PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS); 896 createEAttribute(partialInterpretationEClass, PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS);
819 createEAttribute(partialInterpretationEClass, PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS); 897 createEAttribute(partialInterpretationEClass, PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS);
898 createEAttribute(partialInterpretationEClass, PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC);
820 899
821 partialConstantInterpretationEClass = createEClass(PARTIAL_CONSTANT_INTERPRETATION); 900 partialConstantInterpretationEClass = createEClass(PARTIAL_CONSTANT_INTERPRETATION);
822 createEReference(partialConstantInterpretationEClass, PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF); 901 createEReference(partialConstantInterpretationEClass, PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF);
@@ -869,6 +948,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
869 createEAttribute(scopeEClass, SCOPE__MIN_NEW_ELEMENTS); 948 createEAttribute(scopeEClass, SCOPE__MIN_NEW_ELEMENTS);
870 createEAttribute(scopeEClass, SCOPE__MAX_NEW_ELEMENTS); 949 createEAttribute(scopeEClass, SCOPE__MAX_NEW_ELEMENTS);
871 createEReference(scopeEClass, SCOPE__TARGET_TYPE_INTERPRETATION); 950 createEReference(scopeEClass, SCOPE__TARGET_TYPE_INTERPRETATION);
951 createEAttribute(scopeEClass, SCOPE__MIN_NEW_ELEMENTS_HEURISTIC);
872 952
873 partialPrimitiveInterpretationEClass = createEClass(PARTIAL_PRIMITIVE_INTERPRETATION); 953 partialPrimitiveInterpretationEClass = createEClass(PARTIAL_PRIMITIVE_INTERPRETATION);
874 954
@@ -945,6 +1025,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
945 initEReference(getPartialInterpretation_Scopes(), this.getScope(), null, "scopes", null, 0, -1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 1025 initEReference(getPartialInterpretation_Scopes(), this.getScope(), null, "scopes", null, 0, -1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
946 initEAttribute(getPartialInterpretation_MinNewElements(), ecorePackage.getEInt(), "minNewElements", "0", 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 1026 initEAttribute(getPartialInterpretation_MinNewElements(), ecorePackage.getEInt(), "minNewElements", "0", 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
947 initEAttribute(getPartialInterpretation_MaxNewElements(), ecorePackage.getEInt(), "maxNewElements", "-1", 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 1027 initEAttribute(getPartialInterpretation_MaxNewElements(), ecorePackage.getEInt(), "maxNewElements", "-1", 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1028 initEAttribute(getPartialInterpretation_MinNewElementsHeuristic(), ecorePackage.getEInt(), "minNewElementsHeuristic", "0", 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
948 1029
949 initEClass(partialConstantInterpretationEClass, PartialConstantInterpretation.class, "PartialConstantInterpretation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 1030 initEClass(partialConstantInterpretationEClass, PartialConstantInterpretation.class, "PartialConstantInterpretation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
950 initEReference(getPartialConstantInterpretation_InterpretationOf(), theLogiclanguagePackage.getConstantDeclaration(), null, "interpretationOf", null, 1, 1, PartialConstantInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 1031 initEReference(getPartialConstantInterpretation_InterpretationOf(), theLogiclanguagePackage.getConstantDeclaration(), null, "interpretationOf", null, 1, 1, PartialConstantInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -997,6 +1078,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa
997 initEAttribute(getScope_MinNewElements(), ecorePackage.getEInt(), "minNewElements", "0", 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 1078 initEAttribute(getScope_MinNewElements(), ecorePackage.getEInt(), "minNewElements", "0", 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
998 initEAttribute(getScope_MaxNewElements(), ecorePackage.getEInt(), "maxNewElements", "-1", 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 1079 initEAttribute(getScope_MaxNewElements(), ecorePackage.getEInt(), "maxNewElements", "-1", 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
999 initEReference(getScope_TargetTypeInterpretation(), this.getPartialTypeInterpratation(), this.getPartialTypeInterpratation_Scopes(), "targetTypeInterpretation", null, 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 1080 initEReference(getScope_TargetTypeInterpretation(), this.getPartialTypeInterpratation(), this.getPartialTypeInterpratation_Scopes(), "targetTypeInterpretation", null, 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1081 initEAttribute(getScope_MinNewElementsHeuristic(), ecorePackage.getEInt(), "minNewElementsHeuristic", "0", 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
1000 1082
1001 initEClass(partialPrimitiveInterpretationEClass, PartialPrimitiveInterpretation.class, "PartialPrimitiveInterpretation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); 1083 initEClass(partialPrimitiveInterpretationEClass, PartialPrimitiveInterpretation.class, "PartialPrimitiveInterpretation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
1002 1084
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PrimitiveElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PrimitiveElementImpl.java
index 29a1e1be..a8ef81b0 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PrimitiveElementImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PrimitiveElementImpl.java
@@ -71,6 +71,7 @@ public abstract class PrimitiveElementImpl extends DefinedElementImpl implements
71 * <!-- end-user-doc --> 71 * <!-- end-user-doc -->
72 * @generated 72 * @generated
73 */ 73 */
74 @Override
74 public boolean isValueSet() { 75 public boolean isValueSet() {
75 return valueSet; 76 return valueSet;
76 } 77 }
@@ -80,6 +81,7 @@ public abstract class PrimitiveElementImpl extends DefinedElementImpl implements
80 * <!-- end-user-doc --> 81 * <!-- end-user-doc -->
81 * @generated 82 * @generated
82 */ 83 */
84 @Override
83 public void setValueSet(boolean newValueSet) { 85 public void setValueSet(boolean newValueSet) {
84 boolean oldValueSet = valueSet; 86 boolean oldValueSet = valueSet;
85 valueSet = newValueSet; 87 valueSet = newValueSet;
@@ -154,7 +156,7 @@ public abstract class PrimitiveElementImpl extends DefinedElementImpl implements
154 public String toString() { 156 public String toString() {
155 if (eIsProxy()) return super.toString(); 157 if (eIsProxy()) return super.toString();
156 158
157 StringBuffer result = new StringBuffer(super.toString()); 159 StringBuilder result = new StringBuilder(super.toString());
158 result.append(" (valueSet: "); 160 result.append(" (valueSet: ");
159 result.append(valueSet); 161 result.append(valueSet);
160 result.append(')'); 162 result.append(')');
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RealElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RealElementImpl.java
index 0361a3e9..67cff5a2 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RealElementImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RealElementImpl.java
@@ -71,6 +71,7 @@ public class RealElementImpl extends PrimitiveElementImpl implements RealElement
71 * <!-- end-user-doc --> 71 * <!-- end-user-doc -->
72 * @generated 72 * @generated
73 */ 73 */
74 @Override
74 public BigDecimal getValue() { 75 public BigDecimal getValue() {
75 return value; 76 return value;
76 } 77 }
@@ -80,6 +81,7 @@ public class RealElementImpl extends PrimitiveElementImpl implements RealElement
80 * <!-- end-user-doc --> 81 * <!-- end-user-doc -->
81 * @generated 82 * @generated
82 */ 83 */
84 @Override
83 public void setValue(BigDecimal newValue) { 85 public void setValue(BigDecimal newValue) {
84 BigDecimal oldValue = value; 86 BigDecimal oldValue = value;
85 value = newValue; 87 value = newValue;
@@ -154,7 +156,7 @@ public class RealElementImpl extends PrimitiveElementImpl implements RealElement
154 public String toString() { 156 public String toString() {
155 if (eIsProxy()) return super.toString(); 157 if (eIsProxy()) return super.toString();
156 158
157 StringBuffer result = new StringBuffer(super.toString()); 159 StringBuilder result = new StringBuilder(super.toString());
158 result.append(" (value: "); 160 result.append(" (value: ");
159 result.append(value); 161 result.append(value);
160 result.append(')'); 162 result.append(')');
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java
index d8ade871..a1b6de35 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java
@@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
26 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getMinNewElements <em>Min New Elements</em>}</li> 26 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getMinNewElements <em>Min New Elements</em>}</li>
27 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getMaxNewElements <em>Max New Elements</em>}</li> 27 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getMaxNewElements <em>Max New Elements</em>}</li>
28 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getTargetTypeInterpretation <em>Target Type Interpretation</em>}</li> 28 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getTargetTypeInterpretation <em>Target Type Interpretation</em>}</li>
29 * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getMinNewElementsHeuristic <em>Min New Elements Heuristic</em>}</li>
29 * </ul> 30 * </ul>
30 * 31 *
31 * @generated 32 * @generated
@@ -82,6 +83,26 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
82 protected PartialTypeInterpratation targetTypeInterpretation; 83 protected PartialTypeInterpratation targetTypeInterpretation;
83 84
84 /** 85 /**
86 * The default value of the '{@link #getMinNewElementsHeuristic() <em>Min New Elements Heuristic</em>}' attribute.
87 * <!-- begin-user-doc -->
88 * <!-- end-user-doc -->
89 * @see #getMinNewElementsHeuristic()
90 * @generated
91 * @ordered
92 */
93 protected static final int MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT = 0;
94
95 /**
96 * The cached value of the '{@link #getMinNewElementsHeuristic() <em>Min New Elements Heuristic</em>}' attribute.
97 * <!-- begin-user-doc -->
98 * <!-- end-user-doc -->
99 * @see #getMinNewElementsHeuristic()
100 * @generated
101 * @ordered
102 */
103 protected int minNewElementsHeuristic = MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT;
104
105 /**
85 * <!-- begin-user-doc --> 106 * <!-- begin-user-doc -->
86 * <!-- end-user-doc --> 107 * <!-- end-user-doc -->
87 * @generated 108 * @generated
@@ -105,6 +126,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
105 * <!-- end-user-doc --> 126 * <!-- end-user-doc -->
106 * @generated 127 * @generated
107 */ 128 */
129 @Override
108 public int getMinNewElements() { 130 public int getMinNewElements() {
109 return minNewElements; 131 return minNewElements;
110 } 132 }
@@ -114,6 +136,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
114 * <!-- end-user-doc --> 136 * <!-- end-user-doc -->
115 * @generated 137 * @generated
116 */ 138 */
139 @Override
117 public void setMinNewElements(int newMinNewElements) { 140 public void setMinNewElements(int newMinNewElements) {
118 int oldMinNewElements = minNewElements; 141 int oldMinNewElements = minNewElements;
119 minNewElements = newMinNewElements; 142 minNewElements = newMinNewElements;
@@ -126,6 +149,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
126 * <!-- end-user-doc --> 149 * <!-- end-user-doc -->
127 * @generated 150 * @generated
128 */ 151 */
152 @Override
129 public int getMaxNewElements() { 153 public int getMaxNewElements() {
130 return maxNewElements; 154 return maxNewElements;
131 } 155 }
@@ -135,6 +159,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
135 * <!-- end-user-doc --> 159 * <!-- end-user-doc -->
136 * @generated 160 * @generated
137 */ 161 */
162 @Override
138 public void setMaxNewElements(int newMaxNewElements) { 163 public void setMaxNewElements(int newMaxNewElements) {
139 int oldMaxNewElements = maxNewElements; 164 int oldMaxNewElements = maxNewElements;
140 maxNewElements = newMaxNewElements; 165 maxNewElements = newMaxNewElements;
@@ -147,6 +172,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
147 * <!-- end-user-doc --> 172 * <!-- end-user-doc -->
148 * @generated 173 * @generated
149 */ 174 */
175 @Override
150 public PartialTypeInterpratation getTargetTypeInterpretation() { 176 public PartialTypeInterpratation getTargetTypeInterpretation() {
151 if (targetTypeInterpretation != null && targetTypeInterpretation.eIsProxy()) { 177 if (targetTypeInterpretation != null && targetTypeInterpretation.eIsProxy()) {
152 InternalEObject oldTargetTypeInterpretation = (InternalEObject)targetTypeInterpretation; 178 InternalEObject oldTargetTypeInterpretation = (InternalEObject)targetTypeInterpretation;
@@ -188,6 +214,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
188 * <!-- end-user-doc --> 214 * <!-- end-user-doc -->
189 * @generated 215 * @generated
190 */ 216 */
217 @Override
191 public void setTargetTypeInterpretation(PartialTypeInterpratation newTargetTypeInterpretation) { 218 public void setTargetTypeInterpretation(PartialTypeInterpratation newTargetTypeInterpretation) {
192 if (newTargetTypeInterpretation != targetTypeInterpretation) { 219 if (newTargetTypeInterpretation != targetTypeInterpretation) {
193 NotificationChain msgs = null; 220 NotificationChain msgs = null;
@@ -208,6 +235,29 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
208 * @generated 235 * @generated
209 */ 236 */
210 @Override 237 @Override
238 public int getMinNewElementsHeuristic() {
239 return minNewElementsHeuristic;
240 }
241
242 /**
243 * <!-- begin-user-doc -->
244 * <!-- end-user-doc -->
245 * @generated
246 */
247 @Override
248 public void setMinNewElementsHeuristic(int newMinNewElementsHeuristic) {
249 int oldMinNewElementsHeuristic = minNewElementsHeuristic;
250 minNewElementsHeuristic = newMinNewElementsHeuristic;
251 if (eNotificationRequired())
252 eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.SCOPE__MIN_NEW_ELEMENTS_HEURISTIC, oldMinNewElementsHeuristic, minNewElementsHeuristic));
253 }
254
255 /**
256 * <!-- begin-user-doc -->
257 * <!-- end-user-doc -->
258 * @generated
259 */
260 @Override
211 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { 261 public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
212 switch (featureID) { 262 switch (featureID) {
213 case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: 263 case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION:
@@ -247,6 +297,8 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
247 case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: 297 case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION:
248 if (resolve) return getTargetTypeInterpretation(); 298 if (resolve) return getTargetTypeInterpretation();
249 return basicGetTargetTypeInterpretation(); 299 return basicGetTargetTypeInterpretation();
300 case PartialinterpretationPackage.SCOPE__MIN_NEW_ELEMENTS_HEURISTIC:
301 return getMinNewElementsHeuristic();
250 } 302 }
251 return super.eGet(featureID, resolve, coreType); 303 return super.eGet(featureID, resolve, coreType);
252 } 304 }
@@ -268,6 +320,9 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
268 case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: 320 case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION:
269 setTargetTypeInterpretation((PartialTypeInterpratation)newValue); 321 setTargetTypeInterpretation((PartialTypeInterpratation)newValue);
270 return; 322 return;
323 case PartialinterpretationPackage.SCOPE__MIN_NEW_ELEMENTS_HEURISTIC:
324 setMinNewElementsHeuristic((Integer)newValue);
325 return;
271 } 326 }
272 super.eSet(featureID, newValue); 327 super.eSet(featureID, newValue);
273 } 328 }
@@ -289,6 +344,9 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
289 case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: 344 case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION:
290 setTargetTypeInterpretation((PartialTypeInterpratation)null); 345 setTargetTypeInterpretation((PartialTypeInterpratation)null);
291 return; 346 return;
347 case PartialinterpretationPackage.SCOPE__MIN_NEW_ELEMENTS_HEURISTIC:
348 setMinNewElementsHeuristic(MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT);
349 return;
292 } 350 }
293 super.eUnset(featureID); 351 super.eUnset(featureID);
294 } 352 }
@@ -307,6 +365,8 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
307 return maxNewElements != MAX_NEW_ELEMENTS_EDEFAULT; 365 return maxNewElements != MAX_NEW_ELEMENTS_EDEFAULT;
308 case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: 366 case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION:
309 return targetTypeInterpretation != null; 367 return targetTypeInterpretation != null;
368 case PartialinterpretationPackage.SCOPE__MIN_NEW_ELEMENTS_HEURISTIC:
369 return minNewElementsHeuristic != MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT;
310 } 370 }
311 return super.eIsSet(featureID); 371 return super.eIsSet(featureID);
312 } 372 }
@@ -320,11 +380,13 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope {
320 public String toString() { 380 public String toString() {
321 if (eIsProxy()) return super.toString(); 381 if (eIsProxy()) return super.toString();
322 382
323 StringBuffer result = new StringBuffer(super.toString()); 383 StringBuilder result = new StringBuilder(super.toString());
324 result.append(" (minNewElements: "); 384 result.append(" (minNewElements: ");
325 result.append(minNewElements); 385 result.append(minNewElements);
326 result.append(", maxNewElements: "); 386 result.append(", maxNewElements: ");
327 result.append(maxNewElements); 387 result.append(maxNewElements);
388 result.append(", minNewElementsHeuristic: ");
389 result.append(minNewElementsHeuristic);
328 result.append(')'); 390 result.append(')');
329 return result.toString(); 391 return result.toString();
330 } 392 }
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/StringElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/StringElementImpl.java
index f207401d..0242c9b2 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/StringElementImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/StringElementImpl.java
@@ -69,6 +69,7 @@ public class StringElementImpl extends PrimitiveElementImpl implements StringEle
69 * <!-- end-user-doc --> 69 * <!-- end-user-doc -->
70 * @generated 70 * @generated
71 */ 71 */
72 @Override
72 public String getValue() { 73 public String getValue() {
73 return value; 74 return value;
74 } 75 }
@@ -78,6 +79,7 @@ public class StringElementImpl extends PrimitiveElementImpl implements StringEle
78 * <!-- end-user-doc --> 79 * <!-- end-user-doc -->
79 * @generated 80 * @generated
80 */ 81 */
82 @Override
81 public void setValue(String newValue) { 83 public void setValue(String newValue) {
82 String oldValue = value; 84 String oldValue = value;
83 value = newValue; 85 value = newValue;
@@ -152,7 +154,7 @@ public class StringElementImpl extends PrimitiveElementImpl implements StringEle
152 public String toString() { 154 public String toString() {
153 if (eIsProxy()) return super.toString(); 155 if (eIsProxy()) return super.toString();
154 156
155 StringBuffer result = new StringBuffer(super.toString()); 157 StringBuilder result = new StringBuilder(super.toString());
156 result.append(" (value: "); 158 result.append(" (value: ");
157 result.append(value); 159 result.append(value);
158 result.append(')'); 160 result.append(')');
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java
index 2cb56323..e76a89b7 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java
@@ -62,6 +62,7 @@ public class UnaryElementRelationLinkImpl extends RelationLinkImpl implements Un
62 * <!-- end-user-doc --> 62 * <!-- end-user-doc -->
63 * @generated 63 * @generated
64 */ 64 */
65 @Override
65 public DefinedElement getParam1() { 66 public DefinedElement getParam1() {
66 if (param1 != null && param1.eIsProxy()) { 67 if (param1 != null && param1.eIsProxy()) {
67 InternalEObject oldParam1 = (InternalEObject)param1; 68 InternalEObject oldParam1 = (InternalEObject)param1;
@@ -88,6 +89,7 @@ public class UnaryElementRelationLinkImpl extends RelationLinkImpl implements Un
88 * <!-- end-user-doc --> 89 * <!-- end-user-doc -->
89 * @generated 90 * @generated
90 */ 91 */
92 @Override
91 public void setParam1(DefinedElement newParam1) { 93 public void setParam1(DefinedElement newParam1) {
92 DefinedElement oldParam1 = param1; 94 DefinedElement oldParam1 = param1;
93 param1 = newParam1; 95 param1 = newParam1;
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore
index acf82a3f..47d54258 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore
@@ -27,6 +27,9 @@
27 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="0"/> 27 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="0"/>
28 <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxNewElements" lowerBound="1" 28 <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxNewElements" lowerBound="1"
29 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/> 29 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/>
30 <eStructuralFeatures xsi:type="ecore:EAttribute" name="minNewElementsHeuristic"
31 lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
32 defaultValueLiteral="0"/>
30 </eClassifiers> 33 </eClassifiers>
31 <eClassifiers xsi:type="ecore:EClass" name="PartialConstantInterpretation"> 34 <eClassifiers xsi:type="ecore:EClass" name="PartialConstantInterpretation">
32 <eStructuralFeatures xsi:type="ecore:EReference" name="interpretationOf" lowerBound="1" 35 <eStructuralFeatures xsi:type="ecore:EReference" name="interpretationOf" lowerBound="1"
@@ -92,6 +95,9 @@
92 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/> 95 eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/>
93 <eStructuralFeatures xsi:type="ecore:EReference" name="targetTypeInterpretation" 96 <eStructuralFeatures xsi:type="ecore:EReference" name="targetTypeInterpretation"
94 lowerBound="1" eType="#//PartialTypeInterpratation" eOpposite="#//PartialTypeInterpratation/scopes"/> 97 lowerBound="1" eType="#//PartialTypeInterpratation" eOpposite="#//PartialTypeInterpratation/scopes"/>
98 <eStructuralFeatures xsi:type="ecore:EAttribute" name="minNewElementsHeuristic"
99 lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"
100 defaultValueLiteral="0"/>
95 </eClassifiers> 101 </eClassifiers>
96 <eClassifiers xsi:type="ecore:EClass" name="PartialPrimitiveInterpretation" abstract="true" 102 <eClassifiers xsi:type="ecore:EClass" name="PartialPrimitiveInterpretation" abstract="true"
97 eSuperTypes="#//PartialTypeInterpratation"/> 103 eSuperTypes="#//PartialTypeInterpratation"/>
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel
index 2ac0a4f3..daeaf594 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel
@@ -18,7 +18,10 @@
18 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/partialtypeinterpratation"/> 18 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/partialtypeinterpratation"/>
19 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/openWorldElements"/> 19 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/openWorldElements"/>
20 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/problemConainer"/> 20 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/problemConainer"/>
21 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/scope"/> 21 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialInterpretation/scopes"/>
22 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//PartialInterpretation/minNewElements"/>
23 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//PartialInterpretation/maxNewElements"/>
24 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//PartialInterpretation/minNewElementsHeuristic"/>
22 </genClasses> 25 </genClasses>
23 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialConstantInterpretation"> 26 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialConstantInterpretation">
24 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialConstantInterpretation/interpretationOf"/> 27 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialConstantInterpretation/interpretationOf"/>
@@ -33,9 +36,8 @@
33 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialFunctionInterpretation/interpretationOf"/> 36 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialFunctionInterpretation/interpretationOf"/>
34 </genClasses> 37 </genClasses>
35 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialTypeInterpratation"> 38 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialTypeInterpratation">
36 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialTypeInterpratation/interpretationOf"/>
37 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialTypeInterpratation/elements"/> 39 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialTypeInterpratation/elements"/>
38 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialTypeInterpratation/supertypeInterpretation"/> 40 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialTypeInterpratation/scopes"/>
39 </genClasses> 41 </genClasses>
40 <genClasses image="false" ecoreClass="PartialInterpretation.ecore#//RelationLink"/> 42 <genClasses image="false" ecoreClass="PartialInterpretation.ecore#//RelationLink"/>
41 <genClasses ecoreClass="PartialInterpretation.ecore#//UnaryElementRelationLink"> 43 <genClasses ecoreClass="PartialInterpretation.ecore#//UnaryElementRelationLink">
@@ -50,6 +52,7 @@
50 </genClasses> 52 </genClasses>
51 <genClasses ecoreClass="PartialInterpretation.ecore#//NaryRelationLinkElement"> 53 <genClasses ecoreClass="PartialInterpretation.ecore#//NaryRelationLinkElement">
52 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//NaryRelationLinkElement/index"/> 54 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//NaryRelationLinkElement/index"/>
55 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//NaryRelationLinkElement/param"/>
53 </genClasses> 56 </genClasses>
54 <genClasses image="false" ecoreClass="PartialInterpretation.ecore#//PrimitiveElement"> 57 <genClasses image="false" ecoreClass="PartialInterpretation.ecore#//PrimitiveElement">
55 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//PrimitiveElement/valueSet"/> 58 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//PrimitiveElement/valueSet"/>
@@ -70,11 +73,16 @@
70 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//Scope/minNewElements"/> 73 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//Scope/minNewElements"/>
71 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//Scope/maxNewElements"/> 74 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//Scope/maxNewElements"/>
72 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//Scope/targetTypeInterpretation"/> 75 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//Scope/targetTypeInterpretation"/>
76 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute PartialInterpretation.ecore#//Scope/minNewElementsHeuristic"/>
73 </genClasses> 77 </genClasses>
74 <genClasses image="false" ecoreClass="PartialInterpretation.ecore#//PartialPrimitiveInterpretation"/> 78 <genClasses image="false" ecoreClass="PartialInterpretation.ecore#//PartialPrimitiveInterpretation"/>
75 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialBooleanInterpretation"/> 79 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialBooleanInterpretation"/>
76 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialIntegerInterpretation"/> 80 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialIntegerInterpretation"/>
77 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialRealInterpretation"/> 81 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialRealInterpretation"/>
78 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialStringInterpretation"/> 82 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialStringInterpretation"/>
83 <genClasses ecoreClass="PartialInterpretation.ecore#//PartialComplexTypeInterpretation">
84 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialComplexTypeInterpretation/supertypeInterpretation"/>
85 <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference PartialInterpretation.ecore#//PartialComplexTypeInterpretation/interpretationOf"/>
86 </genClasses>
79 </genPackages> 87 </genPackages>
80</genmodel:GenModel> 88</genmodel:GenModel>
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 8aaaacb5..cb5b587f 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
@@ -1,5 +1,6 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic 1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic
2 2
3import com.google.common.collect.ImmutableList
3import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic 4import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic
4import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace 5import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace
5import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput 6import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput
@@ -12,18 +13,18 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.Par
12import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.Problem2PartialInterpretationTrace 13import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.Problem2PartialInterpretationTrace
13import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation 14import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation
14import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory 15import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory
16import java.math.BigDecimal
15import java.util.HashMap 17import java.util.HashMap
18import java.util.HashSet
16import java.util.List 19import java.util.List
17import java.util.Map 20import java.util.Map
21import java.util.Set
18import org.eclipse.emf.common.util.Enumerator 22import org.eclipse.emf.common.util.Enumerator
23import org.eclipse.emf.ecore.EAttribute
19import org.eclipse.emf.ecore.EObject 24import org.eclipse.emf.ecore.EObject
20import org.eclipse.emf.ecore.resource.Resource 25import org.eclipse.emf.ecore.resource.Resource
21 26
22import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* 27import 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
27 28
28class InstanceModel2PartialInterpretation { 29class InstanceModel2PartialInterpretation {
29 val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE 30 val extension LogiclanguageFactory factory = LogiclanguageFactory.eINSTANCE
@@ -36,7 +37,19 @@ class InstanceModel2PartialInterpretation {
36 Resource resource, 37 Resource resource,
37 boolean withID) 38 boolean withID)
38 { 39 {
39 val objects = resource.allContents.toList 40 val objectsBuilder = ImmutableList.builder
41 val treeIterator = resource.allContents
42 val referencesUsed = ecore2Logic.allReferencesInScope(metamodelTranslationResult.trace).toSet
43 while (treeIterator.hasNext) {
44 val object = treeIterator.next
45 val containingReference = object.eContainmentFeature
46 if (containingReference === null || referencesUsed.contains(containingReference)) {
47 objectsBuilder.add(object)
48 } else {
49 treeIterator.prune
50 }
51 }
52 val objects = objectsBuilder.build
40 return transform(metamodelTranslationResult,objects,withID) 53 return transform(metamodelTranslationResult,objects,withID)
41 } 54 }
42 55
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 f7a1ce4f..20ff58f2 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,19 +2,24 @@ 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.And
6import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolLiteral
5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement 7import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement
8import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral
6import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory 9import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory
10import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral
7import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration 11import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration
12import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDefinition
13import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringLiteral
14import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.SymbolicValue
8import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type 15import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type
9import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration 16import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration
10import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition 17import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition
11import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem 18import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem
12import hu.bme.mit.inf.dslreasoner.logic.model.patterns.SupertypeStar 19import hu.bme.mit.inf.dslreasoner.logic.model.patterns.SupertypeStar
13import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion 20import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion
14import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink
15import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BooleanElement 21import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BooleanElement
16import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement 22import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement
17import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.NaryRelationLink
18import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialBooleanInterpretation 23import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialBooleanInterpretation
19import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation 24import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation
20import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialIntegerInterpretation 25import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialIntegerInterpretation
@@ -22,10 +27,10 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par
22import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRealInterpretation 27import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRealInterpretation
23import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation 28import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation
24import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialStringInterpretation 29import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialStringInterpretation
30import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation
25import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory 31import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationFactory
26import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement 32import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement
27import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.StringElement 33import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.StringElement
28import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.UnaryElementRelationLink
29import java.math.BigDecimal 34import java.math.BigDecimal
30import java.util.HashMap 35import java.util.HashMap
31import java.util.Map 36import java.util.Map
@@ -35,13 +40,6 @@ import org.eclipse.viatra.query.runtime.emf.EMFScope
35import org.eclipse.xtend.lib.annotations.Data 40import org.eclipse.xtend.lib.annotations.Data
36 41
37import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* 42import 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
44import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation
45 43
46@Data class Problem2PartialInterpretationTrace { 44@Data class Problem2PartialInterpretationTrace {
47 Map<TypeDeclaration, PartialComplexTypeInterpretation> type2Interpretation 45 Map<TypeDeclaration, PartialComplexTypeInterpretation> type2Interpretation
@@ -193,7 +191,7 @@ class PartialInterpretationInitialiser {
193 interpretation.minNewElements = minNewElements 191 interpretation.minNewElements = minNewElements
194 interpretation.maxNewElements = maxNewElements 192 interpretation.maxNewElements = maxNewElements
195 // elements from problem are included 193 // elements from problem are included
196 if(maxNewElements>0) { 194 if(maxNewElements != 0) {
197 val newElements = createDefinedElement => [it.name = "New Objects"] 195 val newElements = createDefinedElement => [it.name = "New Objects"]
198 interpretation.openWorldElements += newElements 196 interpretation.openWorldElements += newElements
199 } 197 }
@@ -212,12 +210,8 @@ class PartialInterpretationInitialiser {
212 def private initialiseTypeScope(PartialTypeInterpratation interpretation, Integer min, Integer max) { 210 def private initialiseTypeScope(PartialTypeInterpratation interpretation, Integer min, Integer max) {
213 val res = createScope 211 val res = createScope
214 res.targetTypeInterpretation = interpretation 212 res.targetTypeInterpretation = interpretation
215 if(min !== null) { 213 res.minNewElements = min ?: 0
216 res.minNewElements = min 214 res.maxNewElements = max ?: -1
217 }
218 if(max !== null) {
219 res.maxNewElements = max
220 }
221 return res 215 return res
222 } 216 }
223 217
@@ -233,7 +227,11 @@ class PartialInterpretationInitialiser {
233 227
234 def private Map<RelationDeclaration, PartialRelationInterpretation> initRelations(PartialInterpretation interpretation, PrimitiveValueTrace trace) { 228 def private Map<RelationDeclaration, PartialRelationInterpretation> initRelations(PartialInterpretation interpretation, PrimitiveValueTrace trace) {
235 val Map<RelationDeclaration, PartialRelationInterpretation> relation2Interpretation = new HashMap 229 val Map<RelationDeclaration, PartialRelationInterpretation> relation2Interpretation = new HashMap
236 for(relation : interpretation.problem.relations.filter(RelationDeclaration)) { 230 val definedRelationDeclarations = interpretation.problem.relations.filter(RelationDefinition).map[defines]
231 val undefinedRelationDeclarations = interpretation.problem.relations.filter(RelationDeclaration).filter[
232 declared | !definedRelationDeclarations.exists[defined | defined === declared]
233 ]
234 for(relation : undefinedRelationDeclarations) {
237 val partialInterpretation = relation.initialisePartialRelationInterpretation 235 val partialInterpretation = relation.initialisePartialRelationInterpretation
238 interpretation.partialrelationinterpretation += partialInterpretation 236 interpretation.partialrelationinterpretation += partialInterpretation
239 relation2Interpretation.put(relation,partialInterpretation) 237 relation2Interpretation.put(relation,partialInterpretation)
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend
index 41482b28..685a1f5a 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend
@@ -4,10 +4,21 @@ import java.util.HashMap
4import java.util.Map 4import java.util.Map
5import java.util.Set 5import java.util.Set
6import org.eclipse.xtend.lib.annotations.Data 6import org.eclipse.xtend.lib.annotations.Data
7import org.eclipse.xtend2.lib.StringConcatenationClient
7 8
8@Data abstract class AbstractNodeDescriptor { 9@Data abstract class AbstractNodeDescriptor {
9 long dataHash 10 int dataHash
10 11
12 protected def StringConcatenationClient prettyPrint() {
13 '''(«dataHash»)[«class.simpleName»]'''
14 }
15
16 override toString() {
17 '''
18 «prettyPrint»
19 '''
20 }
21
11// @Pure 22// @Pure
12// @Override 23// @Override
13// override public boolean equals(Object obj) { 24// override public boolean equals(Object obj) {
@@ -24,34 +35,45 @@ import org.eclipse.xtend.lib.annotations.Data
24// } 35// }
25} 36}
26 37
27@Data class LocalNodeDescriptor extends AbstractNodeDescriptor{ 38@Data class LocalNodeDescriptor extends AbstractNodeDescriptor {
28 Set<String> types 39 Set<String> types
29 String id; 40 String id;
41
30 new(String id, Set<String> types) { 42 new(String id, Set<String> types) {
31 super(calcualteDataHash(id,types)) 43 super(calcualteDataHash(id, types))
32 this.types = types 44 this.types = types
33 this.id = id 45 this.id = id
34 } 46 }
35 47
36 def private static calcualteDataHash(String id, Set<String> types) { 48 def private static calcualteDataHash(String id, Set<String> types) {
37 val int prime = 31; 49 val int prime = 31;
38 var result = 0 50 var result = 0
39 if(id !== null) 51 if (id !== null)
40 result = id.hashCode(); 52 result = id.hashCode();
41 if(types !== null) { 53 if (types !== null) {
42 result = prime * result + types.hashCode 54 result = prime * result + types.hashCode
43 } 55 }
44 return result 56 return result
45 } 57 }
46 58
47 override hashCode() { 59 override hashCode() {
48 return this.dataHash.hashCode 60 return this.dataHash
49 } 61 }
50 62
63 override equals(Object other) {
64 other.class == LocalNodeDescriptor && (other as AbstractNodeDescriptor).hashCode == hashCode
65 }
66
67 override protected prettyPrint() {
68 '''(«dataHash»)[«IF id !== null»id = "«id»"«IF types === null || !types.empty», «ENDIF»«ENDIF»«IF types === null»TYPES = null«ELSE»«FOR type : types SEPARATOR ", "»«type»«ENDFOR»«ENDIF»]'''
69 }
70
51 override toString() { 71 override toString() {
52 return class.name + this.dataHash 72 '''
73 «prettyPrint»
74 '''
53 } 75 }
54 76
55// @Pure 77// @Pure
56// @Override 78// @Override
57// override public boolean equals(Object obj) { 79// override public boolean equals(Object obj) {
@@ -66,7 +88,6 @@ import org.eclipse.xtend.lib.annotations.Data
66// return false; 88// return false;
67// return true; 89// return true;
68// } 90// }
69
70// @Pure 91// @Pure
71// override public boolean equals(Object obj) { 92// override public boolean equals(Object obj) {
72// if (this === obj) 93// if (this === obj)
@@ -97,118 +118,91 @@ import org.eclipse.xtend.lib.annotations.Data
97 String type 118 String type
98} 119}
99 120
100@Data class FurtherNodeDescriptor<NodeRep> extends AbstractNodeDescriptor{ 121@Data class FurtherNodeDescriptor<NodeRep> extends AbstractNodeDescriptor {
101 122 NodeRep previousRepresentation
102 NodeRep previousRepresentation 123 Map<IncomingRelation<NodeRep>, Integer> incomingEdges
103 Map<IncomingRelation<NodeRep>,Integer> incomingEdges 124 Map<OutgoingRelation<NodeRep>, Integer> outgoingEdges
104 Map<OutgoingRelation<NodeRep>,Integer> outgoingEdges 125
105 126 new(NodeRep previousRepresentation, Map<IncomingRelation<NodeRep>, Integer> incomingEdges,
106 new( 127 Map<OutgoingRelation<NodeRep>, Integer> outgoingEdges) {
107 NodeRep previousRepresentation, 128 super(calculateDataHash(previousRepresentation, incomingEdges, outgoingEdges))
108 Map<IncomingRelation<NodeRep>,Integer> incomingEdges, 129 this.previousRepresentation = previousRepresentation
109 Map<OutgoingRelation<NodeRep>,Integer> outgoingEdges) 130 this.incomingEdges = incomingEdges
110 { 131 this.outgoingEdges = outgoingEdges
111 super(calculateDataHash(previousRepresentation,incomingEdges,outgoingEdges))
112 this.previousRepresentation = previousRepresentation
113 this.incomingEdges = new HashMap(incomingEdges)
114 this.outgoingEdges = new HashMap(outgoingEdges)
115 }
116
117 static def private <NodeRep> int calculateDataHash(
118 NodeRep previousRepresentation,
119 Map<IncomingRelation<NodeRep>,Integer> incomingEdges,
120 Map<OutgoingRelation<NodeRep>,Integer> outgoingEdges)
121 {
122 val int prime = 31;
123 var int result = previousRepresentation.hashCode;
124 if(incomingEdges !== null)
125 result = prime * result + incomingEdges.hashCode();
126 if(outgoingEdges !== null)
127 result = prime * result + outgoingEdges.hashCode();
128 return result;
129 }
130
131 override hashCode() {
132 return this.dataHash.hashCode
133 } 132 }
134 133
135 override toString() { 134 static def private <NodeRep> int calculateDataHash(NodeRep previousRepresentation,
136 return class.name + dataHash 135 Map<IncomingRelation<NodeRep>, Integer> incomingEdges, Map<OutgoingRelation<NodeRep>, Integer> outgoingEdges) {
137// return '''[«previousRepresentation»,(«FOR 136 val int prime = 31;
138// in: incomingEdges.entrySet»(«in.key.type.name»=«in.key.from»,«in.value»)«ENDFOR»),(«FOR 137 var int result = previousRepresentation.hashCode;
139// out: outgoingEdges.entrySet»(«out.key.type.name»=«out.key.to»,«out.value»)«ENDFOR»),«FOR 138 if (incomingEdges !== null)
140// att: attributeValues»(«att.type.name»=«att.value»)«ENDFOR»]''' 139 result = prime * result + hashIncomingNeighborhood(incomingEdges)
140 if (outgoingEdges !== null)
141 result = prime * result + hashOutgoingNeighborhood(outgoingEdges)
142 return result;
141 } 143 }
142
143// @Pure
144// @Override
145// override public boolean equals(Object obj) {
146// if (this === obj)
147// return true;
148// if (obj === null)
149// return false;
150// if (getClass() != obj.getClass())
151// return false;
152// val AbstractNodeDescriptor other = obj as AbstractNodeDescriptor;
153// if (other.dataHash != this.dataHash)
154// return false;
155// return true;
156// }
157
158// @Pure
159// override public boolean equals(Object obj) {
160// if (this === obj)
161// return true;
162// if (obj === null)
163// return false;
164// if (getClass() != obj.getClass())
165// return false;
166// if (!super.equals(obj))
167// return false;
168// val FurtherNodeDescriptor<?> other = obj as FurtherNodeDescriptor<?>;
169// if (this.previousRepresentation === null) {
170// if (other.previousRepresentation != null)
171// return false;
172//
173// }
174//// } else if (!this.previousRepresentation.equals(other.previousRepresentation))
175//// return false;
176// if (this.incomingEdges === null) {
177// if (other.incomingEdges != null)
178// return false;
179// } else if (!this.incomingEdges.equals(other.incomingEdges))
180// return false;
181// if (this.outgoingEdges === null) {
182// if (other.outgoingEdges != null)
183// return false;
184// } else if (!this.outgoingEdges.equals(other.outgoingEdges))
185// return false;
186// if (this.attributeValues === null) {
187// if (other.attributeValues != null)
188// return false;
189// } else if (!this.attributeValues.equals(other.attributeValues))
190// return false;
191// return true;
192// }
193}
194 144
195/* 145 override hashCode() {
196@Data 146 return this.dataHash
197class ModelDescriptor { 147 }
198 int dataHash 148
199 int unknownElements 149 override equals(Object other) {
200 Map<? extends AbstractNodeDescriptor,Integer> knownElements 150 other.class == FurtherNodeDescriptor && (other as AbstractNodeDescriptor).hashCode == hashCode
151 }
152
153 override prettyPrint() {
154 '''
155 («dataHash»)[
156 PREV = «previousRepresentation?.prettyPrint»
157 «IF incomingEdges === null»
158 IN null
159 «ELSE»
160 «FOR edge : incomingEdges.entrySet»
161 IN «edge.value» «edge.key.type» = «edge.key.from.prettyPrint»
162 «ENDFOR»
163 «ENDIF»
164 «IF outgoingEdges === null»
165 OUT null
166 «ELSE»
167 «FOR edge : outgoingEdges.entrySet»
168 OUT «edge.value» «edge.key.type» = «edge.key.to.prettyPrint»
169 «ENDFOR»
170 «ENDIF»
171 ]'''
172 }
173
174 private def StringConcatenationClient prettyPrint(NodeRep rep) {
175 if (rep instanceof AbstractNodeDescriptor) {
176 rep.prettyPrint
177 } else {
178 '''«rep»'''
179 }
180 }
201 181
202 public new(Map<? extends AbstractNodeDescriptor,Integer> knownElements, int unknownElements) { 182 private static def <NodeRep> hashIncomingNeighborhood(Map<IncomingRelation<NodeRep>, Integer> neighborhood) {
203 this.dataHash = calculateDataHash(knownElements,unknownElements) 183 val int prime = 31
204 this.unknownElements = unknownElements 184 var int hash = 0
205 this.knownElements = knownElements 185 for (entry : neighborhood.entrySet) {
186 val relation = entry.key
187 hash += (prime * relation.from.hashCode + relation.type.hashCode).bitwiseXor(entry.value.hashCode)
188 }
189 hash
206 } 190 }
207 191
208 def private static calculateDataHash(Map<? extends AbstractNodeDescriptor,Integer> knownElements, int unknownElements) 192 private static def <NodeRep> hashOutgoingNeighborhood(Map<OutgoingRelation<NodeRep>, Integer> neighborhood) {
209 { 193 val int prime = 31
210 val int prime = 31; 194 var int hash = 0
211 return knownElements.hashCode * prime + unknownElements.hashCode 195 for (entry : neighborhood.entrySet) {
196 val relation = entry.key
197 hash += (prime * relation.to.hashCode + relation.type.hashCode).bitwiseXor(entry.value.hashCode)
198 }
199 hash
200 }
201
202 override toString() {
203 '''
204 «prettyPrint»
205 '''
212 } 206 }
213} 207}
214*/ \ No newline at end of file 208
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodOptions.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodOptions.xtend
new file mode 100644
index 00000000..c6e03f75
--- /dev/null
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodOptions.xtend
@@ -0,0 +1,22 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood
2
3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration
4import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration
5import java.util.Set
6import org.eclipse.xtend.lib.annotations.Data
7
8@Data
9class NeighbourhoodOptions {
10 public static val FixPointRange = -1
11 public static val GraphWidthRange = -2
12 public static val FullParallels = Integer.MAX_VALUE
13 public static val MaxNumbers = Integer.MAX_VALUE
14
15 public static val DEFAULT = new NeighbourhoodOptions(FixPointRange, FullParallels, MaxNumbers, null, null)
16
17 val int range
18 val int parallels
19 val int maxNumber
20 val Set<TypeDeclaration> relevantTypes
21 val Set<RelationDeclaration> relevantRelations
22}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend
index d474877d..5da202eb 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend
@@ -1,25 +1,33 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood 1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood
2 2
3import java.util.Map
4import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement 3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement
4import java.util.Map
5import org.eclipse.collections.api.factory.Maps
5 6
6class PartialInterpretation2Hash extends PartialInterpretation2NeighbourhoodRepresentation<Integer, Integer>{ 7class PartialInterpretation2Hash extends PartialInterpretation2NeighbourhoodRepresentation<Integer, Integer>{
7 8
8 protected new() { 9 new() {
9 super(false, true) 10 super(false, true)
10 } 11 }
11 12
12 override protected createLocalRepresentation(Map<DefinedElement, LocalNodeDescriptor> node2Representation, Map<LocalNodeDescriptor, Integer> representation2Amount) { 13 override protected createLocalRepresentation(Map<DefinedElement, LocalNodeDescriptor> node2Representation, Map<LocalNodeDescriptor, Integer> representation2Amount) {
13 return new NeighbourhoodWithTraces( 14 return new NeighbourhoodWithTraces(
14 representation2Amount.hashCode,node2Representation.mapValues[it.hashCode], 15 representation2Amount.hashCode,node2Representation.hashValues,
15 null) 16 null)
16 } 17 }
17 18
18 override protected createFurtherRepresentation(Map<FurtherNodeDescriptor<Integer>, Integer> nodeDescriptors, Map<DefinedElement, FurtherNodeDescriptor<Integer>> node2Representation, NeighbourhoodWithTraces<Integer, Integer> previous, boolean deepRepresentation) { 19 override protected createFurtherRepresentation(Map<FurtherNodeDescriptor<Integer>, Integer> nodeDescriptors, Map<DefinedElement, FurtherNodeDescriptor<Integer>> node2Representation, NeighbourhoodWithTraces<Integer, Integer> previous, boolean deepRepresentation) {
19 return new NeighbourhoodWithTraces( 20 return new NeighbourhoodWithTraces(
20 nodeDescriptors.hashCode, 21 nodeDescriptors.hashCode,
21 node2Representation.mapValues[it.hashCode], 22 node2Representation.hashValues,
22 if(deepRepresentation) {previous} else {null}) 23 if(deepRepresentation) {previous} else {null})
23 } 24 }
24 25
26 private def <T> hashValues(Map<DefinedElement, T> map) {
27 val hashedMap = Maps.mutable.ofInitialCapacity(map.size)
28 for (entry : map.entrySet) {
29 hashedMap.put(entry.key, entry.value.hashCode)
30 }
31 hashedMap
32 }
25} 33}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend
index 6dc40705..93eab816 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend
@@ -4,32 +4,34 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement
4import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration 4import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration
5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration 5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration
6import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink 6import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink
7import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation
7import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation 8import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
8import java.util.HashMap 9import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation
9import java.util.HashSet 10import java.util.ArrayList
10import java.util.LinkedList
11import java.util.List 11import java.util.List
12import java.util.Map 12import java.util.Map
13import java.util.Set 13import java.util.Set
14import org.eclipse.collections.api.factory.Maps
15import org.eclipse.collections.impl.factory.Sets
14 16
15import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* 17import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.*
16import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation
17import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation
18 18
19abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresentation,NodeRepresentation> { 19abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresentation, NodeRepresentation> {
20 private val boolean deepRepresentation 20 val boolean deepRepresentation
21 private val boolean mergeSimilarNeighbourhood 21 val boolean mergeSimilarNeighbourhood
22 22
23 protected new(boolean deeprepresentation, boolean mergeSimilarNeighbourhood) { 23 protected new(boolean deeprepresentation, boolean mergeSimilarNeighbourhood) {
24 this.deepRepresentation = deeprepresentation 24 this.deepRepresentation = deeprepresentation
25 this.mergeSimilarNeighbourhood = mergeSimilarNeighbourhood 25 this.mergeSimilarNeighbourhood = mergeSimilarNeighbourhood
26 } 26 }
27 27
28 public static val FixPointRage = -1 28 public static val FixPointRange = NeighbourhoodOptions.FixPointRange
29 public static val GraphWidthRange = -2 29 public static val GraphWidthRange = NeighbourhoodOptions.GraphWidthRange
30 public static val FullParallels = Integer.MAX_VALUE 30 public static val FullParallels = NeighbourhoodOptions.FullParallels
31 public static val MaxNumbers = Integer.MAX_VALUE 31 public static val MaxNumbers = NeighbourhoodOptions.MaxNumbers
32 32
33 static val FOCUSED_ELEMENT_NAME = "<<THIS>>"
34
33 /** 35 /**
34 * Creates a neighbourhood representation with traces 36 * Creates a neighbourhood representation with traces
35 * @param model The model to be represented. 37 * @param model The model to be represented.
@@ -37,10 +39,15 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresenta
37 * @param parallels The maximal number of parallel references to be differentiated. 39 * @param parallels The maximal number of parallel references to be differentiated.
38 * @param maxNumber The maximal number of elements in a equivalence class that chan be differentiated. 40 * @param maxNumber The maximal number of elements in a equivalence class that chan be differentiated.
39 */ 41 */
40 def public createRepresentation(PartialInterpretation model, int range, int parallels, int maxNumber) { 42 def createRepresentation(PartialInterpretation model, int range, int parallels, int maxNumber) {
41 return createRepresentation(model,range,parallels,maxNumber,null,null) 43 return createRepresentation(model, range, parallels, maxNumber, null, null)
44 }
45
46 def createRepresentation(PartialInterpretation model, NeighbourhoodOptions options) {
47 createRepresentation(model, options.range, options.parallels, options.maxNumber, options.relevantTypes,
48 options.relevantRelations)
42 } 49 }
43 50
44 /** 51 /**
45 * Creates a neighbourhood representation with traces 52 * Creates a neighbourhood representation with traces
46 * @param model The model to be represented. 53 * @param model The model to be represented.
@@ -48,72 +55,87 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresenta
48 * @param parallels The maximal number of parallel references to be differentiated. 55 * @param parallels The maximal number of parallel references to be differentiated.
49 * @param maxNumber The maximal number of elements in a equivalence class that chan be differentiated. 56 * @param maxNumber The maximal number of elements in a equivalence class that chan be differentiated.
50 */ 57 */
51 def public createRepresentation( 58 def createRepresentation(PartialInterpretation model, int range, int parallels, int maxNumber,
52 PartialInterpretation model, 59 Set<TypeDeclaration> relevantTypes, Set<RelationDeclaration> relevantRelations) {
53 int range, int parallels, int maxNumber, 60 createRepresentationWithFocus(model, range, parallels, maxNumber, relevantTypes, relevantRelations, null)
54 Set<TypeDeclaration> relevantTypes, Set<RelationDeclaration> relevantRelations) 61 }
55 { 62
56 val Map<DefinedElement, Set<String>> types = new HashMap 63 def createRepresentationWithFocus(PartialInterpretation model, NeighbourhoodOptions options,
57 fillTypes(model,types,relevantTypes) 64 DefinedElement focusedElement) {
58 val Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations = new HashMap; 65 createRepresentationWithFocus(model, options.range, options.parallels, options.maxNumber, options.relevantTypes,
59 val Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations = new HashMap; 66 options.relevantRelations, focusedElement)
60 fillReferences(model,IncomingRelations,OutgoingRelations,relevantRelations) 67 }
61 68
62 val res = doRecursiveNeighbourCalculation(model,types,IncomingRelations,OutgoingRelations,range,parallels,maxNumber); 69 def createRepresentationWithFocus(PartialInterpretation model, int range, int parallels, int maxNumber,
63 70 Set<TypeDeclaration> relevantTypes, Set<RelationDeclaration> relevantRelations, DefinedElement focusedElement) {
71 val initialSize = model.elements.size
72 val Map<DefinedElement, Set<String>> types = Maps.mutable.ofInitialCapacity(initialSize)
73 fillTypes(model, types, relevantTypes)
74 val Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations = Maps.mutable.ofInitialCapacity(initialSize);
75 val Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations = Maps.mutable.ofInitialCapacity(initialSize);
76 fillReferences(model, IncomingRelations, OutgoingRelations, relevantRelations)
77
78 val res = doRecursiveNeighbourCalculation(model, types, IncomingRelations, OutgoingRelations, range, parallels,
79 maxNumber, focusedElement);
80
64 return res; 81 return res;
65 } 82 }
66 83
67 def private isRelevant(TypeDeclaration t, Set<TypeDeclaration> relevantTypes) { 84 def private isRelevant(TypeDeclaration t, Set<TypeDeclaration> relevantTypes) {
68 if(relevantTypes === null) { 85 if (relevantTypes === null) {
69 return true 86 return true
70 } else { 87 } else {
71 return relevantTypes.contains(t) 88 return relevantTypes.contains(t)
72 } 89 }
73 } 90 }
91
74 def private isRelevant(RelationDeclaration r, Set<RelationDeclaration> relevantRelations) { 92 def private isRelevant(RelationDeclaration r, Set<RelationDeclaration> relevantRelations) {
75 if(relevantRelations === null) { 93 if (relevantRelations === null) {
76 return true 94 return true
77 } else { 95 } else {
78 return relevantRelations.contains(r) 96 return relevantRelations.contains(r)
79 } 97 }
80 } 98 }
99
81 /** 100 /**
82 * Gets the largest 101 * Gets the minimal neighbourhood size such that every reachable node appears in the shape of every other at least once.
83 */ 102 */
84 def private getWidth(Map<DefinedElement, Set<String>> types, 103 def private getWidth(Map<DefinedElement, Set<String>> types,
85 Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, 104 Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations,
86 Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations) 105 Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations) {
87 { 106 val elements = types.keySet
88 val elements = types.keySet 107 var Map<DefinedElement, Set<DefinedElement>> reachable = Maps.mutable.ofInitialCapacity(elements.size)
89 val Map<DefinedElement,Set<DefinedElement>> reachable = new HashMap 108 var Map<DefinedElement, Set<DefinedElement>> newReachable = Maps.mutable.ofInitialCapacity(elements.size)
90 for(element : elements) { 109 for (element : elements) {
91 val set = new HashSet 110 val set = Sets.mutable.of
92 set.add(element) 111 set.add(element)
93 reachable.put(element,set) 112 reachable.put(element, Sets.mutable.of)
113 newReachable.put(element, set)
94 } 114 }
95 115
96 var int width = 0 116 var int width = 0
97 var boolean newAdded 117 var boolean newAdded
98 do { 118 do {
119 var tmp = reachable
120 reachable = newReachable
121 newReachable = tmp
99 newAdded = false 122 newAdded = false
100 for(element : elements) { 123 for (element : elements) {
101 val elementNeigbours = element.lookup(reachable) 124 val elementNeigbours = element.lookup(reachable)
102 val size = elementNeigbours.size 125 val newElementNeigbours = element.lookup(newReachable)
103 for(incoming : element.lookup(IncomingRelations)) { 126 newElementNeigbours.addAll(elementNeigbours)
104 elementNeigbours.addAll(incoming.from.lookup(reachable)) 127 for (incoming : element.lookup(IncomingRelations)) {
128 newElementNeigbours.addAll(incoming.from.lookup(reachable))
105 } 129 }
106 for(outgoing : element.lookup(OutgoingRelations)) { 130 for (outgoing : element.lookup(OutgoingRelations)) {
107 elementNeigbours.addAll(outgoing.to.lookup(reachable)) 131 newElementNeigbours.addAll(outgoing.to.lookup(reachable))
108 } 132 }
109 newAdded = newAdded || (elementNeigbours.size > size) 133 newAdded = newAdded || (newElementNeigbours.size > elementNeigbours.size)
110 } 134 }
111 135 width += 1
112 width +=1 136 } while (newAdded)
113 } while(newAdded)
114 return width 137 return width
115 } 138 }
116
117 /** 139 /**
118 * Creates a neighbourhood representation with traces 140 * Creates a neighbourhood representation with traces
119 * @param model The model to be represented. 141 * @param model The model to be represented.
@@ -122,68 +144,71 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresenta
122 * @param range The range of the neighbourhood. 144 * @param range The range of the neighbourhood.
123 * @param parallels The maximal number of parallel references to be differentiated. 145 * @param parallels The maximal number of parallel references to be differentiated.
124 */ 146 */
125 def private NeighbourhoodWithTraces<ModelRepresentation,NodeRepresentation> doRecursiveNeighbourCalculation( 147 def private NeighbourhoodWithTraces<ModelRepresentation, NodeRepresentation> doRecursiveNeighbourCalculation(
126 PartialInterpretation model, 148 PartialInterpretation model, Map<DefinedElement, Set<String>> types,
127 Map<DefinedElement, Set<String>> types,
128 Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, 149 Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations,
129 Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, 150 Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, int range, int parallels,
130 int range, int parallels, int maxNumber) 151 int maxNumber, DefinedElement focusedElement) {
131 { 152 if (range == 0) {
132 if(range == 0){ 153 val r = calculateLocalNodeDescriptors(model, types, maxNumber, focusedElement)
133 val r = calculateLocalNodeDescriptors(model,types,maxNumber) 154 val res = this.createLocalRepresentation(r.value, r.key)
134 val res = this.createLocalRepresentation(r.value,r.key) 155 if (res.modelRepresentation === null) {
135 if(res.modelRepresentation === null) {
136 throw new IllegalArgumentException('''Model representation is null''') 156 throw new IllegalArgumentException('''Model representation is null''')
137 } else if(res.nodeRepresentations === null || res.nodeRepresentations.empty) { 157 } else if (res.nodeRepresentations === null || res.nodeRepresentations.empty) {
138 throw new IllegalArgumentException('''No node representation''') 158 throw new IllegalArgumentException('''No node representation''')
139 } else if(res.previousRepresentation !== null) { 159 } else if (res.previousRepresentation !== null) {
140 throw new IllegalArgumentException('''The previous representation of the first neighbourhood have to be null''') 160 throw new IllegalArgumentException('''The previous representation of the first neighbourhood have to be null''')
141 } else return res 161 } else
142 } else if(range > 0) { 162 return res
143 val previous = doRecursiveNeighbourCalculation(model,types,IncomingRelations,OutgoingRelations,range-1,parallels,maxNumber) 163 } else if (range > 0) {
144 val r = calculateFurtherNodeDescriptors(model,previous,IncomingRelations,OutgoingRelations,parallels,maxNumber) 164 val previous = doRecursiveNeighbourCalculation(model, types, IncomingRelations, OutgoingRelations,
145 //println('''Level «range» finished.''') 165 range - 1, parallels, maxNumber, focusedElement)
146 val res = createFurtherRepresentation(r.key,r.value,previous,deepRepresentation) 166 val r = calculateFurtherNodeDescriptors(model, previous, IncomingRelations, OutgoingRelations, parallels,
147 if(res.modelRepresentation === null) { 167 maxNumber)
168 // println('''Level «range» finished.''')
169 val res = createFurtherRepresentation(r.key, r.value, previous, deepRepresentation)
170 if (res.modelRepresentation === null) {
148 throw new IllegalArgumentException('''Model representation is null''') 171 throw new IllegalArgumentException('''Model representation is null''')
149 } else if(res.nodeRepresentations === null || res.nodeRepresentations.empty) { 172 } else if (res.nodeRepresentations === null || res.nodeRepresentations.empty) {
150 throw new IllegalArgumentException('''No node representation''') 173 throw new IllegalArgumentException('''No node representation''')
151 } else if(res.previousRepresentation === null && deepRepresentation) { 174 } else if (res.previousRepresentation === null && deepRepresentation) {
152 throw new IllegalArgumentException('''Need previous representations''') 175 throw new IllegalArgumentException('''Need previous representations''')
153 } else return res 176 } else
154 } else if (range == FixPointRage) { 177 return res
155 return refineUntilFixpoint(model,types,IncomingRelations,OutgoingRelations,parallels,maxNumber) 178 } else if (range == FixPointRange) {
179 return refineUntilFixpoint(model, types, IncomingRelations, OutgoingRelations, parallels, maxNumber,
180 focusedElement)
156 } else if (range == GraphWidthRange) { 181 } else if (range == GraphWidthRange) {
157 val width = this.getWidth(types,IncomingRelations,OutgoingRelations) 182 val width = this.getWidth(types, IncomingRelations, OutgoingRelations)
158 //println(width) 183 // println(width)
159 return doRecursiveNeighbourCalculation(model,types,IncomingRelations,OutgoingRelations,width,parallels,maxNumber) 184 return doRecursiveNeighbourCalculation(model, types, IncomingRelations, OutgoingRelations, width, parallels,
185 maxNumber, focusedElement)
160 } 186 }
161 } 187 }
162 188
163 def private refineUntilFixpoint( 189 def private refineUntilFixpoint(PartialInterpretation model, Map<DefinedElement, Set<String>> types,
164 PartialInterpretation model,
165 Map<DefinedElement, Set<String>> types,
166 Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, 190 Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations,
167 Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, 191 Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, int parallels, int maxNumbers,
168 int parallels, int maxNumbers) 192 DefinedElement focusedElement) {
169 {
170 var lastRange = 0 193 var lastRange = 0
171 val last = calculateLocalNodeDescriptors(model,types,maxNumbers) 194 val last = calculateLocalNodeDescriptors(model, types, maxNumbers, focusedElement)
172 var lastRepresentation = this.createLocalRepresentation(last.value,last.key) 195 var lastRepresentation = this.createLocalRepresentation(last.value, last.key)
173 //println('''Level 0 finished.''') 196 // println('''Level 0 finished.''')
174 var boolean hasRefined 197 var boolean hasRefined
175 do { 198 do {
176 val nextRange = lastRange+1 199 val nextRange = lastRange + 1
177 val next = calculateFurtherNodeDescriptors(model,lastRepresentation,IncomingRelations,OutgoingRelations,parallels,maxNumbers) 200 val next = calculateFurtherNodeDescriptors(model, lastRepresentation, IncomingRelations, OutgoingRelations,
178 val nextRepresentation = createFurtherRepresentation(next.key,next.value,lastRepresentation,deepRepresentation) 201 parallels, maxNumbers)
179 202 val nextRepresentation = createFurtherRepresentation(next.key, next.value, lastRepresentation,
180 val previousNumberOfTypes =lastRepresentation.nodeRepresentations.values.toSet.size 203 deepRepresentation)
181 val nextNumberOfTypes = nextRepresentation.nodeRepresentations.values.toSet.size 204
182 hasRefined = nextNumberOfTypes > previousNumberOfTypes 205 val previousNumberOfTypes = Sets.immutable.withAll(lastRepresentation.nodeRepresentations.values).size
183 206 val nextNumberOfTypes = Sets.immutable.withAll(nextRepresentation.nodeRepresentations.values).size
207 hasRefined = nextNumberOfTypes > previousNumberOfTypes
208
184 lastRange = nextRange 209 lastRange = nextRange
185 lastRepresentation = nextRepresentation 210 lastRepresentation = nextRepresentation
186 211
187// if(hasRefined) { 212// if(hasRefined) {
188// println('''Level «nextRange» is calculated, number of types is refined: «previousNumberOfTypes» -> «nextNumberOfTypes»''') 213// println('''Level «nextRange» is calculated, number of types is refined: «previousNumberOfTypes» -> «nextNumberOfTypes»''')
189// } else { 214// } else {
@@ -192,211 +217,217 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresenta
192 } while (hasRefined) 217 } while (hasRefined)
193 return lastRepresentation 218 return lastRepresentation
194 } 219 }
195 220
196 def private getElements(PartialInterpretation model) { 221 def private getElements(PartialInterpretation model) {
197 return 222 return model.problem.elements + model.newElements + model.openWorldElements
198 model.problem.elements +
199 model.newElements +
200 model.openWorldElements
201 } 223 }
202 224
203 def private fillTypes(PartialInterpretation model, Map<DefinedElement, Set<String>> node2Type, Set<TypeDeclaration> relevantTypes) { 225 def private fillTypes(PartialInterpretation model, Map<DefinedElement, Set<String>> node2Type,
204 for(element : model.elements) { 226 Set<TypeDeclaration> relevantTypes) {
205 node2Type.put(element, new HashSet) 227 for (element : model.elements) {
228 node2Type.put(element, Sets.mutable.of)
206 } 229 }
207 230
208// for(typeDefinition : model.problem.types.filter(TypeDefinition)) { 231// for(typeDefinition : model.problem.types.filter(TypeDefinition)) {
209// // Dont need 232// // Dont need
210// } 233// }
211 for(typeInterpretation : model.partialtypeinterpratation) { 234 for (typeInterpretation : model.partialtypeinterpratation) {
212 if(typeInterpretation instanceof PartialPrimitiveInterpretation) { 235 if (typeInterpretation instanceof PartialPrimitiveInterpretation) {
213 236 } else if (typeInterpretation instanceof PartialComplexTypeInterpretation) {
214 } else if(typeInterpretation instanceof PartialComplexTypeInterpretation) {
215 val type = typeInterpretation.interpretationOf 237 val type = typeInterpretation.interpretationOf
216 if(type.isRelevant(relevantTypes)) { 238 if (type.isRelevant(relevantTypes)) {
217 for(element : typeInterpretation.elements) { 239 for (element : typeInterpretation.elements) {
218 element.lookup(node2Type).add(type.name) 240 element.lookup(node2Type).add(type.name)
219 } 241 }
220 } 242 }
221 } 243 }
222 } 244 }
223 } 245 }
224 246
225 /** 247 /**
226 * Indexes the references 248 * Indexes the references
227 */ 249 */
228 def private fillReferences(PartialInterpretation model, 250 def private fillReferences(PartialInterpretation model,
229 Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, 251 Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations,
230 Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, 252 Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations,
231 Set<RelationDeclaration> relevantRelations) 253 Set<RelationDeclaration> relevantRelations) {
232 { 254 for (object : model.elements) {
233 for(object : model.elements) { 255 IncomingRelations.put(object, new ArrayList)
234 IncomingRelations.put(object,new LinkedList) 256 OutgoingRelations.put(object, new ArrayList)
235 OutgoingRelations.put(object,new LinkedList)
236 } 257 }
237 for(relationInterpretation : model.partialrelationinterpretation) { 258 for (relationInterpretation : model.partialrelationinterpretation) {
238 val type = relationInterpretation.interpretationOf 259 val type = relationInterpretation.interpretationOf
239 if(type.isRelevant(relevantRelations)) { 260 if (type.isRelevant(relevantRelations)) {
240 for(link : relationInterpretation.relationlinks) { 261 for (link : relationInterpretation.relationlinks) {
241 if(link instanceof BinaryElementRelationLink) { 262 if (link instanceof BinaryElementRelationLink) {
242 OutgoingRelations.get(link.param1) += new OutgoingRelation(link.param2,type.name) 263 OutgoingRelations.get(link.param1) += new OutgoingRelation(link.param2, type.name)
243 IncomingRelations.get(link.param2) += new IncomingRelation(link.param1,type.name) 264 IncomingRelations.get(link.param2) += new IncomingRelation(link.param1, type.name)
244 } else throw new UnsupportedOperationException 265 } else
266 throw new UnsupportedOperationException
245 } 267 }
246 } 268 }
247 } 269 }
248 } 270 }
249 271
250 /** 272 /**
251 * Creates a local representation of the objects (aka zero range neighbourhood) 273 * Creates a local representation of the objects (aka zero range neighbourhood)
252 */ 274 */
253 def abstract protected NeighbourhoodWithTraces<ModelRepresentation,NodeRepresentation> createLocalRepresentation( 275 def abstract protected NeighbourhoodWithTraces<ModelRepresentation, NodeRepresentation> createLocalRepresentation(
254 Map<DefinedElement, LocalNodeDescriptor> node2Representation, 276 Map<DefinedElement, LocalNodeDescriptor> node2Representation,
255 Map<LocalNodeDescriptor, Integer> representation2Amount 277 Map<LocalNodeDescriptor, Integer> representation2Amount
256 ) 278 )
257 279
258 /** 280 /**
259 * Creates a 281 * Creates a
260 */ 282 */
261 def abstract protected NeighbourhoodWithTraces<ModelRepresentation,NodeRepresentation> createFurtherRepresentation( 283 def abstract protected NeighbourhoodWithTraces<ModelRepresentation, NodeRepresentation> createFurtherRepresentation(
262 Map<FurtherNodeDescriptor<NodeRepresentation>, Integer> nodeDescriptors, 284 Map<FurtherNodeDescriptor<NodeRepresentation>, Integer> nodeDescriptors,
263 Map<DefinedElement, FurtherNodeDescriptor<NodeRepresentation>> node2Representation, 285 Map<DefinedElement, FurtherNodeDescriptor<NodeRepresentation>> node2Representation,
264 NeighbourhoodWithTraces<ModelRepresentation,NodeRepresentation> previous, 286 NeighbourhoodWithTraces<ModelRepresentation, NodeRepresentation> previous,
265 boolean deepRepresentation 287 boolean deepRepresentation
266 ) 288 )
267 289
268 def private addOne(int original, int max) { 290 def private addOne(Integer originalObj, int max) {
291 if (originalObj === null) {
292 return 1
293 }
294 val original = originalObj.intValue
269 if(original == Integer.MAX_VALUE) return Integer.MAX_VALUE 295 if(original == Integer.MAX_VALUE) return Integer.MAX_VALUE
270 if(original +1 > max) return Integer.MAX_VALUE 296 if(original + 1 > max) return Integer.MAX_VALUE else return original + 1
271 else return original+1
272 } 297 }
273 298
274 private def calculateIncomingEdges(Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, 299 private def calculateIncomingEdges(Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations,
275 DefinedElement object, Map<DefinedElement, ? extends NodeRepresentation> previousNodeRepresentations, int parallel) 300 DefinedElement object, Map<DefinedElement, ? extends NodeRepresentation> previousNodeRepresentations,
276 { 301 int parallel) {
277 val Map<IncomingRelation<NodeRepresentation>, Integer> res = new HashMap 302 val Map<IncomingRelation<NodeRepresentation>, Integer> res = Maps.mutable.of
278 for (incomingConcreteEdge : IncomingRelations.get(object)) { 303 for (incomingConcreteEdge : IncomingRelations.get(object)) {
279 val IncomingRelation<NodeRepresentation> e = new IncomingRelation( 304 val IncomingRelation<NodeRepresentation> e = new IncomingRelation(
280 previousNodeRepresentations.get(incomingConcreteEdge.from), incomingConcreteEdge.type) 305 previousNodeRepresentations.get(incomingConcreteEdge.from), incomingConcreteEdge.type)
281 if (res.containsKey(e)) { 306 res.compute(e, [key, value | addOne(value, parallel)])
282 res.put(e, addOne(res.get(e),parallel))
283 } else {
284 res.put(e, 1)
285 }
286 } 307 }
287 return res 308 return res
288 } 309 }
289 310
290 private def calcuateOutgoingEdges(Map<DefinedElement,List<OutgoingRelation<DefinedElement>>> OutgoingRelations, 311 private def calcuateOutgoingEdges(Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations,
291 DefinedElement object, Map<DefinedElement, ? extends NodeRepresentation> previousNodeRepresentations, int parallel) 312 DefinedElement object, Map<DefinedElement, ? extends NodeRepresentation> previousNodeRepresentations,
292 { 313 int parallel) {
293 val Map<OutgoingRelation<NodeRepresentation>,Integer> res= new HashMap 314 val Map<OutgoingRelation<NodeRepresentation>, Integer> res = Maps.mutable.of
294 for(outgoingConcreteEdge : OutgoingRelations.get(object)) { 315 for (outgoingConcreteEdge : OutgoingRelations.get(object)) {
295 val OutgoingRelation<NodeRepresentation> e = 316 val OutgoingRelation<NodeRepresentation> e = new OutgoingRelation(
296 new OutgoingRelation( 317 previousNodeRepresentations.get(outgoingConcreteEdge.to), outgoingConcreteEdge.type)
297 previousNodeRepresentations.get(outgoingConcreteEdge.to), 318 res.compute(e, [key, value | addOne(value, parallel)])
298 outgoingConcreteEdge.type)
299 if(res.containsKey(e)) {
300 res.put(e,addOne(res.get(e),parallel))
301 } else {
302 res.put(e,1)
303 }
304 } 319 }
305 return res; 320 return res
306 } 321 }
307 322
308 /*def private <KEY,VALUE> void addOrCreate_Set(Map<KEY,Set<VALUE>> map, KEY key, VALUE value) { 323 /*def private <KEY,VALUE> void addOrCreate_Set(Map<KEY,Set<VALUE>> map, KEY key, VALUE value) {
309 var Set<VALUE> s; 324 * var Set<VALUE> s;
310 if(map.containsKey(key)) { 325 * if(map.containsKey(key)) {
311 s = map.get(key); 326 * s = map.get(key);
312 } else { 327 * } else {
313 s = new HashSet 328 * s = new HashSet
314 map.put(key,s) 329 * map.put(key,s)
315 } 330 * }
316 s.add(value) 331 * s.add(value)
317 }*/ 332 }*/
318 333 private def calculateFurtherNodeDescriptors(PartialInterpretation model,
319
320 private def calculateFurtherNodeDescriptors(
321 PartialInterpretation model,
322 NeighbourhoodWithTraces<ModelRepresentation, NodeRepresentation> previous, 334 NeighbourhoodWithTraces<ModelRepresentation, NodeRepresentation> previous,
323 Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations, 335 Map<DefinedElement, List<IncomingRelation<DefinedElement>>> IncomingRelations,
324 Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, 336 Map<DefinedElement, List<OutgoingRelation<DefinedElement>>> OutgoingRelations, int parallels, int maxNumber) {
325 int parallels, int maxNumber)
326 {
327 val previousNodeRepresentations = previous.nodeRepresentations 337 val previousNodeRepresentations = previous.nodeRepresentations
328 val node2Representation = new HashMap<DefinedElement,FurtherNodeDescriptor<NodeRepresentation>> 338 val size = previousNodeRepresentations.size
329 val Map<FurtherNodeDescriptor<NodeRepresentation>,Integer> descriptor2Number = 339 val node2Representation = Maps.mutable.<DefinedElement, FurtherNodeDescriptor<NodeRepresentation>>ofInitialCapacity(size)
330 if(this.mergeSimilarNeighbourhood){ new HashMap } else { null } 340 val Map<FurtherNodeDescriptor<NodeRepresentation>, Integer> descriptor2Number = if (this.
331 val Map<FurtherNodeDescriptor<NodeRepresentation>,FurtherNodeDescriptor<NodeRepresentation>> uniqueDescription = 341 mergeSimilarNeighbourhood) {
332 if(this.mergeSimilarNeighbourhood){ new HashMap } else { null } 342 Maps.mutable.ofInitialCapacity(size)
333 343 } else {
334 for(object: model.elements) { 344 null
335 val incomingEdges = this.calculateIncomingEdges(IncomingRelations, object, previousNodeRepresentations,parallels) 345 }
336 val outgoingEdges = this.calcuateOutgoingEdges(OutgoingRelations,object, previousNodeRepresentations,parallels) 346 val Map<FurtherNodeDescriptor<NodeRepresentation>, FurtherNodeDescriptor<NodeRepresentation>> uniqueDescription = if (this.
337 347 mergeSimilarNeighbourhood) {
348 Maps.mutable.ofInitialCapacity(size)
349 } else {
350 null
351 }
352
353 for (object : model.elements) {
354 val incomingEdges = this.calculateIncomingEdges(IncomingRelations, object, previousNodeRepresentations,
355 parallels)
356 val outgoingEdges = this.calcuateOutgoingEdges(OutgoingRelations, object, previousNodeRepresentations,
357 parallels)
358
338 val previousType = previousNodeRepresentations.get(object) 359 val previousType = previousNodeRepresentations.get(object)
339 360
340 if(previousType === null) { 361 if (previousType === null) {
341 println("Error in state coder") 362 println("Error in state coder")
342 } 363 }
343 364
344 val nodeDescriptor = new FurtherNodeDescriptor( 365 val nodeDescriptor = new FurtherNodeDescriptor(previousType, incomingEdges, outgoingEdges)
345 previousType, 366
346 incomingEdges, 367 if (this.mergeSimilarNeighbourhood) {
347 outgoingEdges) 368 if (descriptor2Number.containsKey(nodeDescriptor)) {
348
349 if(this.mergeSimilarNeighbourhood) {
350 if(descriptor2Number.containsKey(nodeDescriptor)) {
351 descriptor2Number.put( 369 descriptor2Number.put(
352 nodeDescriptor, 370 nodeDescriptor,
353 addOne(descriptor2Number.get(nodeDescriptor),maxNumber) 371 addOne(descriptor2Number.get(nodeDescriptor), maxNumber)
354 ) 372 )
355 node2Representation.put(object,uniqueDescription.get(nodeDescriptor)) 373 node2Representation.put(object, uniqueDescription.get(nodeDescriptor))
356 } else { 374 } else {
357 descriptor2Number.put(nodeDescriptor,if(1>maxNumber){Integer.MAX_VALUE}else{1}) 375 descriptor2Number.put(nodeDescriptor, if (1 > maxNumber) {
358 uniqueDescription.put(nodeDescriptor,nodeDescriptor) 376 Integer.MAX_VALUE
359 node2Representation.put(object,nodeDescriptor) 377 } else {
378 1
379 })
380 uniqueDescription.put(nodeDescriptor, nodeDescriptor)
381 node2Representation.put(object, nodeDescriptor)
360 } 382 }
361 } else { 383 } else {
362 node2Representation.put(object,nodeDescriptor) 384 node2Representation.put(object, nodeDescriptor)
363 } 385 }
364 } 386 }
365 387
366 return descriptor2Number -> node2Representation 388 return descriptor2Number -> node2Representation
367 } 389 }
368 390
369 private def calculateLocalNodeDescriptors( 391 private def calculateLocalNodeDescriptors(PartialInterpretation model, Map<DefinedElement, Set<String>> types,
370 PartialInterpretation model, 392 int maxNumber, DefinedElement focusedElement) {
371 Map<DefinedElement, Set<String>> types, 393 val size = types.size
372 int maxNumber) 394 val Map<DefinedElement, LocalNodeDescriptor> node2Representation = Maps.mutable.ofInitialCapacity(size)
373 { 395 val Map<LocalNodeDescriptor, Integer> representation2Amount = if (mergeSimilarNeighbourhood) {
374 val Map<DefinedElement, LocalNodeDescriptor> node2Representation = new HashMap 396 Maps.mutable.ofInitialCapacity(size)
375 val Map<LocalNodeDescriptor, Integer> representation2Amount = 397 } else {
376 if(mergeSimilarNeighbourhood){ new HashMap } else { null } 398 null
377 val Map<LocalNodeDescriptor, LocalNodeDescriptor> uniqueRepresentation = 399 }
378 if(this.mergeSimilarNeighbourhood){ new HashMap } else { null } 400 val Map<LocalNodeDescriptor, LocalNodeDescriptor> uniqueRepresentation = if (this.mergeSimilarNeighbourhood) {
379 401 Maps.mutable.ofInitialCapacity(size)
380 for(element : model.elements) { 402 } else {
381 var newDescriptor = new LocalNodeDescriptor(element.name,element.lookup(types)) 403 null
382 if(this.mergeSimilarNeighbourhood){ 404 }
383 if(uniqueRepresentation.containsKey(newDescriptor)) { 405
406 for (element : model.elements) {
407 val name = if(element == focusedElement) FOCUSED_ELEMENT_NAME else element.name
408 var newDescriptor = new LocalNodeDescriptor(name, element.lookup(types))
409 if (this.mergeSimilarNeighbourhood) {
410 if (uniqueRepresentation.containsKey(newDescriptor)) {
384 newDescriptor = newDescriptor.lookup(uniqueRepresentation) 411 newDescriptor = newDescriptor.lookup(uniqueRepresentation)
385 node2Representation.put(element,newDescriptor) 412 node2Representation.put(element, newDescriptor)
386 representation2Amount.put( 413 representation2Amount.put(
387 newDescriptor, 414 newDescriptor,
388 addOne(newDescriptor.lookup(representation2Amount),maxNumber) 415 addOne(newDescriptor.lookup(representation2Amount), maxNumber)
389 ) 416 )
390 } else { 417 } else {
391 uniqueRepresentation.put(newDescriptor,newDescriptor) 418 uniqueRepresentation.put(newDescriptor, newDescriptor)
392 node2Representation.put(element,newDescriptor) 419 node2Representation.put(element, newDescriptor)
393 representation2Amount.put(newDescriptor, if(1>maxNumber){Integer.MAX_VALUE}else{1}) 420 representation2Amount.put(newDescriptor, if (1 > maxNumber) {
421 Integer.MAX_VALUE
422 } else {
423 1
424 })
394 } 425 }
395 } else { 426 } else {
396 node2Representation.put(element,newDescriptor) 427 node2Representation.put(element, newDescriptor)
397 } 428 }
398 } 429 }
399 430
400 return representation2Amount -> node2Representation 431 return representation2Amount -> node2Representation
401 } 432 }
402} \ No newline at end of file 433}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2PairwiseNeighbourhoodRepresentation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2PairwiseNeighbourhoodRepresentation.xtend
new file mode 100644
index 00000000..c10457b0
--- /dev/null
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2PairwiseNeighbourhoodRepresentation.xtend
@@ -0,0 +1,68 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood
2
3import com.google.common.collect.Maps
4import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement
5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
6import java.util.HashMap
7import java.util.Map
8import org.eclipse.xtend.lib.annotations.Data
9import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
10
11@Data
12class PairwiseNeighbourhoodRepresentation<BasicNodeRepresentation> {
13 val Map<?, Integer> modelRepresentation
14 val Map<DefinedElement, BasicNodeRepresentation> basicNodeRepresentations
15 val Map<DefinedElement, ? extends Map<DefinedElement, ? extends BasicNodeRepresentation>> pairwiseNodeRepresentations
16
17 def getBasicRepresentation(DefinedElement a) {
18 basicNodeRepresentations.get(a)
19 }
20
21 def getPairwiseRepresentation(DefinedElement a, DefinedElement b) {
22 pairwiseNodeRepresentations.get(a).get(b)
23 }
24}
25
26@FinalFieldsConstructor
27class PartialInterpretation2PairwiseNeighbourhoodRepresentation<BasicNodeRepresentation> {
28 val PartialInterpretation2NeighbourhoodRepresentation<? extends Map<? extends BasicNodeRepresentation, Integer>, BasicNodeRepresentation> basicNeighbourhoodRepresenter
29
30 def createRepresentation(PartialInterpretation model, NeighbourhoodOptions options) {
31 val basicRepresentation = basicNeighbourhoodRepresenter.createRepresentation(model, options)
32 val basicModelRepresentation = basicRepresentation.modelRepresentation
33 val basicNodeRepresentations = basicRepresentation.nodeRepresentations
34 val pairwiseNodeRepresentations = Maps.newHashMapWithExpectedSize(basicNodeRepresentations.size)
35 val modelRepresentation = new HashMap<Object, Integer>
36 for (nodeWithBasicRepresentation : basicNodeRepresentations.entrySet) {
37 val node = nodeWithBasicRepresentation.key
38 val basicNodeRepresentation = nodeWithBasicRepresentation.value
39 val count = basicModelRepresentation.get(basicNodeRepresentation)
40 if (count == 1) {
41 pairwiseNodeRepresentations.put(node, basicNodeRepresentations)
42 modelRepresentation.put(basicNodeRepresentation, count)
43 } else {
44 val neighbourhoodRepresentation = basicNeighbourhoodRepresenter.
45 createRepresentationWithFocus(model, options, node)
46 pairwiseNodeRepresentations.put(node, neighbourhoodRepresentation.nodeRepresentations)
47 modelRepresentation.compute(neighbourhoodRepresentation.modelRepresentation) [ key, value |
48 if (value === null) {
49 if (1 > options.maxNumber) {
50 Integer.MAX_VALUE
51 } else {
52 1
53 }
54 } else {
55 addOne(value, options.maxNumber)
56 }
57 ]
58 }
59 }
60 new PairwiseNeighbourhoodRepresentation(modelRepresentation, basicNodeRepresentations,
61 pairwiseNodeRepresentations)
62 }
63
64 def private addOne(int original, int max) {
65 if(original == Integer.MAX_VALUE) return Integer.MAX_VALUE
66 if(original + 1 > max) return Integer.MAX_VALUE else return original + 1
67 }
68}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/AbstractNeighborhoodBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/AbstractNeighborhoodBasedStateCoderFactory.xtend
new file mode 100644
index 00000000..089880b1
--- /dev/null
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/AbstractNeighborhoodBasedStateCoderFactory.xtend
@@ -0,0 +1,137 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder
2
3import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem
4import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodOptions
5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation
6import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
7import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation
8import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation
9import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage
10import java.util.LinkedList
11import java.util.List
12import org.eclipse.emf.common.notify.Notifier
13import org.eclipse.emf.ecore.EClass
14import org.eclipse.emf.ecore.EObject
15import org.eclipse.emf.ecore.EStructuralFeature
16import org.eclipse.viatra.dse.statecode.IStateCoder
17import org.eclipse.viatra.dse.statecode.IStateCoderFactory
18import org.eclipse.viatra.query.runtime.api.IPatternMatch
19import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine
20import org.eclipse.viatra.query.runtime.base.api.FeatureListener
21import org.eclipse.viatra.query.runtime.base.api.IndexingLevel
22import org.eclipse.viatra.query.runtime.base.api.InstanceListener
23import org.eclipse.viatra.query.runtime.emf.EMFBaseIndexWrapper
24import org.eclipse.viatra.query.runtime.emf.EMFScope
25import org.eclipse.xtend.lib.annotations.Accessors
26
27abstract class AbstractNeighbourhoodBasedStateCoderFactory implements IStateCoderFactory {
28 val List<AbstractNeighbourhoodBasedPartialInterpretationStateCoder> statecoders = new LinkedList
29
30 val NeighbourhoodOptions options
31
32 protected new() {
33 this(NeighbourhoodOptions.DEFAULT)
34 }
35
36 protected new(NeighbourhoodOptions options) {
37 this.options = options
38 }
39
40 synchronized override createStateCoder() {
41 val res = doCreateStateCoder(options)
42 statecoders += res
43 return res
44 }
45
46 protected def AbstractNeighbourhoodBasedPartialInterpretationStateCoder doCreateStateCoder(
47 NeighbourhoodOptions options)
48
49 def getSumStatecoderRuntime() {
50 statecoders.map[statecoderRuntime].reduce[p1, p2|p1 + p2]
51 }
52}
53
54abstract class AbstractNeighbourhoodBasedPartialInterpretationStateCoder implements IStateCoder {
55 val NeighbourhoodOptions options
56
57 var PartialInterpretation target
58
59 protected new(NeighbourhoodOptions options) {
60 this.options = options
61 }
62
63 @Accessors(PUBLIC_GETTER) var long statecoderRuntime = 0
64
65 synchronized private def refreshStateCodes() {
66 if (refreshNeeded) {
67 val startTime = System.nanoTime
68 doRefreshStateCodes(target, options)
69 statecoderRuntime += (System.nanoTime - startTime)
70 }
71 }
72
73 protected def boolean isRefreshNeeded()
74
75 protected def void doRefreshStateCodes(PartialInterpretation target, NeighbourhoodOptions options)
76
77 synchronized override createActivationCode(IPatternMatch match) {
78 refreshStateCodes
79 val startTime = System.nanoTime
80 val code = doCreateActivationCode(match)
81 statecoderRuntime += (System.nanoTime - startTime)
82 code
83 }
84
85 protected def Object doCreateActivationCode(IPatternMatch match)
86
87 synchronized override createStateCode() {
88 refreshStateCodes
89 doCreateStateCode
90 }
91
92 protected def Object doCreateStateCode()
93
94 override init(Notifier notifier) {
95 this.target = notifier as PartialInterpretation
96 val queryEngine = ViatraQueryEngine.on(new EMFScope(notifier))
97 val baseIndex = queryEngine.getBaseIndex() as EMFBaseIndexWrapper
98 val navigationHelper = baseIndex.getNavigationHelper();
99
100 val classes = PartialinterpretationPackage.eINSTANCE.EClassifiers.filter(EClass).toSet
101 val features = classes.map[it.EAllStructuralFeatures].flatten.toSet
102 navigationHelper.registerObservedTypes(classes, null, features, IndexingLevel.FULL);
103
104 navigationHelper.addFeatureListener(features, new FeatureListener() {
105 override void featureInserted(EObject host, EStructuralFeature feature, Object value) { invalidate }
106
107 override void featureDeleted(EObject host, EStructuralFeature feature, Object value) { invalidate }
108 })
109 navigationHelper.addInstanceListener(classes, new InstanceListener() {
110 override void instanceInserted(EClass clazz, EObject instance) { invalidate }
111
112 override void instanceDeleted(EClass clazz, EObject instance) { invalidate }
113 })
114 }
115
116 synchronized def invalidate() {
117 doInvalidate
118 }
119
120 protected def void doInvalidate()
121
122 def protected getFallbackCode(Object o) {
123 switch (o) {
124 PartialInterpretation,
125 LogicProblem:
126 null
127 PartialRelationInterpretation:
128 o.interpretationOf.name
129 PartialPrimitiveInterpretation:
130 o.class.simpleName.hashCode
131 PartialComplexTypeInterpretation:
132 o.interpretationOf.name.hashCode
133 default:
134 throw new UnsupportedOperationException('''Unsupported type: «o.class.simpleName»''')
135 }
136 }
137}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend
index f55a501a..c7b8ee37 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend
@@ -62,13 +62,13 @@ class IdentifierBasedStateCode {
62 int numberOfNewElement 62 int numberOfNewElement
63 SortedSet<RelationStatecoder> relationStatecoders 63 SortedSet<RelationStatecoder> relationStatecoders
64 64
65 private static val comparator = new Comparator<RelationStatecoder>() { 65 static val comparator = new Comparator<RelationStatecoder>() {
66 override compare(RelationStatecoder o1, RelationStatecoder o2) { 66 override compare(RelationStatecoder o1, RelationStatecoder o2) {
67 o1.relationName.compareTo(o2.relationName) 67 o1.relationName.compareTo(o2.relationName)
68 } 68 }
69 } 69 }
70 70
71 public new(int numberOfNewElements) { 71 new(int numberOfNewElements) {
72 this.numberOfNewElement = numberOfNewElements 72 this.numberOfNewElement = numberOfNewElements
73 this.relationStatecoders = new TreeSet(comparator) 73 this.relationStatecoders = new TreeSet(comparator)
74 } 74 }
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend
index a86bcd1f..04c49506 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend
@@ -1,223 +1,109 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder 1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder
2 2
3import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.AbstractNodeDescriptor 3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement
4import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodOptions
5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2Hash
4import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice 6import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice
7import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2NeighbourhoodRepresentation
5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation 8import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
6import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage
7import java.util.ArrayList 9import java.util.ArrayList
8import java.util.LinkedList
9import java.util.List
10import java.util.Map 10import java.util.Map
11import org.eclipse.emf.common.notify.Notifier
12import org.eclipse.emf.ecore.EClass
13import org.eclipse.emf.ecore.EObject
14import org.eclipse.emf.ecore.EStructuralFeature
15import org.eclipse.viatra.dse.statecode.IStateCoder
16import org.eclipse.viatra.dse.statecode.IStateCoderFactory
17import org.eclipse.viatra.query.runtime.api.IPatternMatch 11import org.eclipse.viatra.query.runtime.api.IPatternMatch
18import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine 12import org.eclipse.viatra.query.runtime.api.IQuerySpecification
19import org.eclipse.viatra.query.runtime.base.api.FeatureListener
20import org.eclipse.viatra.query.runtime.base.api.IndexingLevel
21import org.eclipse.viatra.query.runtime.base.api.InstanceListener
22import org.eclipse.viatra.query.runtime.emf.EMFBaseIndexWrapper
23import org.eclipse.viatra.query.runtime.emf.EMFScope
24import org.eclipse.xtend.lib.annotations.Accessors
25import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement
26import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem
27import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation
28import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation
29import java.util.Set
30import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration
31import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration
32import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2NeighbourhoodRepresentation
33import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation
34import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation
35 13
36class NeighbourhoodBasedStateCoderFactory implements IStateCoderFactory { 14class NeighbourhoodBasedStateCoderFactory extends AbstractNeighbourhoodBasedStateCoderFactory {
37 val List<NeighbourhoodBasedPartialInterpretationStateCoder> statecoders = new LinkedList 15 new() {
38
39 val int range
40 val int parallels
41 val int maxNumber
42 val Set<TypeDeclaration> relevantTypes
43 val Set<RelationDeclaration> relevantRelations
44
45 public new() {
46 this.range = PartialInterpretation2NeighbourhoodRepresentation::GraphWidthRange
47 this.parallels = PartialInterpretation2NeighbourhoodRepresentation::FullParallels
48 this.maxNumber = PartialInterpretation2NeighbourhoodRepresentation::MaxNumbers
49 this.relevantTypes = null
50 this.relevantRelations = null
51 } 16 }
52 17
53 public new(int range, int parallels, int maxNumber, Set<TypeDeclaration> relevantTypes, Set<RelationDeclaration> relevantRelations) { 18 new(NeighbourhoodOptions options) {
54 this.range = range 19 super(options)
55 this.parallels = parallels 20 }
56 this.maxNumber = maxNumber 21
57 this.relevantTypes = relevantTypes 22 override protected doCreateStateCoder(NeighbourhoodOptions options) {
58 this.relevantRelations = relevantRelations 23 new NeighbourhoodBasedPartialInterpretationStateCoder(new PartialInterpretation2ImmutableTypeLattice, options)
59 } 24 }
60
61 synchronized override createStateCoder() {
62 val res = new NeighbourhoodBasedPartialInterpretationStateCoder(statecoders.size,
63 range,parallels,maxNumber,relevantTypes,relevantRelations)
64 statecoders += res
65 return res
66 }
67 def getSumStatecoderRuntime() {
68 statecoders.map[statecoderRuntime].reduce[p1, p2|p1+p2]
69 }
70} 25}
71 26
72class NeighbourhoodBasedPartialInterpretationStateCoder implements IStateCoder{ 27class NeighbourhoodBasedHashStateCoderFactory extends AbstractNeighbourhoodBasedStateCoderFactory {
73 val int id; 28 new() {
74 val int range 29 }
75 val int parallels 30
76 val int maxNumber 31 new(NeighbourhoodOptions options) {
77 val Set<TypeDeclaration> relevantTypes 32 super(options)
78 val Set<RelationDeclaration> relevantRelations 33 }
79 34
80 val calculator = 35 override protected doCreateStateCoder(NeighbourhoodOptions options) {
81 new PartialInterpretation2ImmutableTypeLattice 36 new NeighbourhoodBasedPartialInterpretationStateCoder(new PartialInterpretation2Hash, options)
82 var PartialInterpretation target 37 }
83 38}
84 private var Map<DefinedElement, ? extends AbstractNodeDescriptor> nodeRepresentations = null 39
85 private var Map<? extends AbstractNodeDescriptor, Integer> modelRepresentation = null 40class NeighbourhoodBasedPartialInterpretationStateCoder<ModelRep, NodeRep> extends AbstractNeighbourhoodBasedPartialInterpretationStateCoder {
86 41 val PartialInterpretation2NeighbourhoodRepresentation<ModelRep, NodeRep> calculator
87 /*public new(int id) { 42 val Map<IQuerySpecification<?>, String> fullyQualifiedNames = newHashMap
88 this.id = id 43 var Map<DefinedElement, ? extends NodeRep> nodeRepresentations = null
89 this.range = PartialInterpretation2NeighbourhoodRepresentation::FixPointRage 44 var ModelRep modelRepresentation = null
90 this.parallels = PartialInterpretation2NeighbourhoodRepresentation::FullParallels 45
91 this.maxNumber = maxNumber = PartialInterpretation2NeighbourhoodRepresentation::MaxNumbers 46 new(PartialInterpretation2NeighbourhoodRepresentation<ModelRep, NodeRep> calculator, NeighbourhoodOptions options) {
92 this.relevantTypes = relevantTypes 47 super(options)
93 this.relevantRelations = relevantRelations 48 this.calculator = calculator
94 }*/ 49 }
50
51 override protected isRefreshNeeded() {
52 nodeRepresentations === null || modelRepresentation === null
53 }
54
55 override doRefreshStateCodes(PartialInterpretation target, NeighbourhoodOptions options) {
56 val code = calculator.createRepresentation(target, options)
57 modelRepresentation = code.modelRepresentation
58 nodeRepresentations = code.nodeRepresentations
59 }
95 60
96 public new(int id, int range, int parallels, int maxNumber, Set<TypeDeclaration> relevantTypes, Set<RelationDeclaration> relevantRelations) { 61 private def getFullyQualifiedNameCached(IQuerySpecification<?> specification) {
97 this.id = id 62 fullyQualifiedNames.computeIfAbsent(specification, [fullyQualifiedName])
98 this.range = range
99 this.parallels = parallels
100 this.maxNumber = maxNumber
101 this.relevantTypes = relevantTypes
102 this.relevantRelations = relevantRelations
103 } 63 }
104 64
105 @Accessors(PUBLIC_GETTER) var long statecoderRuntime = 0 65 override doCreateActivationCode(IPatternMatch match) {
106 66 val size = match.specification.parameters.size
107// val range = -1 67 var int hash = 0
108// val par = Integer.MAX_VALUE 68 val prime = 31
109 //val deeprepresentation = false 69
110 70 for (var int index = 0; index < size; index++) {
111 ///////// 71 val matchArgument = match.get(index)
112 // Caching version 72 val code = getCode(matchArgument)
113 ///////// 73 val codeNumber = if (code === null) {
114 synchronized private def refreshStateCodes() { 74 0
115 if(this.nodeRepresentations === null || this.modelRepresentation === null) {
116 val startTime = System.nanoTime
117 //relevantObjects.forEach[println(it)]
118 val code = calculator.createRepresentation(target,range,parallels,maxNumber,relevantTypes,relevantRelations)
119 this.modelRepresentation = code.modelRepresentation
120 this.nodeRepresentations = code.nodeRepresentations
121 statecoderRuntime += (System.nanoTime - startTime)
122 }
123 }
124 synchronized override createActivationCode(IPatternMatch match) {
125 refreshStateCodes
126
127 val startTime = System.nanoTime
128 val size = match.specification.parameters.size
129 val res = new ArrayList(size)
130 var int index = 0
131 var int equivalenceHash = 0
132 val prime = 31
133
134 while(index < size) {
135 res.add(getCode(match.get(index)))
136 index++
137 for(var i = 0; i<index; i++) {
138 val number = if(match.get(index) === match.get(i)){1}else{0}
139 equivalenceHash = prime * equivalenceHash + number
140 }
141 }
142
143 statecoderRuntime += (System.nanoTime - startTime)
144 return match.specification.fullyQualifiedName->(res->equivalenceHash).hashCode
145 }
146
147
148 def private getCode(Object o) {
149 if(o instanceof DefinedElement) {
150 this.nodeRepresentations.get(o)
151 } else if(o instanceof PartialInterpretation || o instanceof LogicProblem) {
152 return null
153 } else if(o instanceof PartialRelationInterpretation) {
154 return o.interpretationOf.name
155 } else if(o instanceof PartialTypeInterpratation) {
156 if(o instanceof PartialPrimitiveInterpretation) {
157 o.class.simpleName.hashCode
158 } else if (o instanceof PartialComplexTypeInterpretation){
159 return o.interpretationOf.name.hashCode
160 } else { 75 } else {
161 throw new UnsupportedOperationException('''Unsupported type: «o.class.simpleName»''') 76 code.hashCode
77 }
78 hash = prime * hash + codeNumber
79 for (var i = 0; i < index; i++) {
80 val number = if (matchArgument === match.get(i)) {
81 1
82 } else {
83 0
84 }
85 hash = prime * hash + number
162 } 86 }
163 } else {
164 throw new UnsupportedOperationException('''Unsupported type: «o.class.simpleName»''')
165 } 87 }
166 } 88
167 89 match.specification.fullyQualifiedNameCached -> hash
168 synchronized override createStateCode() { 90 }
169 refreshStateCodes 91
170 return this.modelRepresentation.hashCode 92 def private getCode(Object o) {
171 } 93 switch (o) {
172 ///////// 94 DefinedElement:
173 // Caching version 95 nodeRepresentations.get(o)
174 ///////// 96 default:
175 97 getFallbackCode(o)
176 ///////// 98 }
177 // Recalculating version 99 }
178 ///////// 100
179// synchronized override createActivationCode(IPatternMatch match) { 101 override doCreateStateCode() {
180// val nodes = calculator.createRepresentation(getRelevantObjects().toList,range,par).nodeRepresentations 102 modelRepresentation.hashCode
181// val res = match.toArray.map[objectInMatch | 103 }
182// nodes.get(objectInMatch) 104
183// ] 105 override doInvalidate() {
184// return res 106 nodeRepresentations = null
185// } 107 modelRepresentation = null
186//
187// override createStateCode() {
188// return this.calculator.createRepresentation(getRelevantObjects().toList,range,par).modelRepresentation
189// }
190 /////////
191 // Recalculating version
192 /////////
193
194 override init(Notifier notifier) {
195 this.target = notifier as PartialInterpretation
196 val queryEngine = ViatraQueryEngine.on(new EMFScope(notifier))
197 val baseIndex = queryEngine.getBaseIndex() as EMFBaseIndexWrapper
198 val navigationHelper = baseIndex.getNavigationHelper();
199
200 val classes = PartialinterpretationPackage.eINSTANCE.EClassifiers.filter(EClass).toSet
201 val features = classes.map[it.EAllStructuralFeatures].flatten.toSet
202 navigationHelper.registerObservedTypes(
203 classes,
204 null,
205 features,
206 IndexingLevel.FULL);
207
208
209 navigationHelper.addFeatureListener(features, new FeatureListener() {
210 override public void featureInserted(EObject host, EStructuralFeature feature, Object value) { invalidate }
211 override public void featureDeleted(EObject host, EStructuralFeature feature, Object value) { invalidate }
212 });
213 navigationHelper.addInstanceListener(classes, new InstanceListener() {
214 override public void instanceInserted(EClass clazz, EObject instance) { invalidate }
215 override public void instanceDeleted(EClass clazz, EObject instance) { invalidate }
216 });
217 }
218
219 synchronized def public invalidate() {
220 this.nodeRepresentations = null
221 this.modelRepresentation = null
222 } 108 }
223} 109}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/PairwiseNeighbourhoodBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/PairwiseNeighbourhoodBasedStateCoderFactory.xtend
new file mode 100644
index 00000000..84e798f2
--- /dev/null
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/PairwiseNeighbourhoodBasedStateCoderFactory.xtend
@@ -0,0 +1,75 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder
2
3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement
4import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.AbstractNodeDescriptor
5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodOptions
6import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PairwiseNeighbourhoodRepresentation
7import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice
8import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2PairwiseNeighbourhoodRepresentation
9import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
10import java.util.ArrayList
11import org.eclipse.viatra.query.runtime.api.IPatternMatch
12
13class PairwiseNeighbourhoodBasedStateCoderFactory extends AbstractNeighbourhoodBasedStateCoderFactory {
14 new() {
15 }
16
17 new(NeighbourhoodOptions options) {
18 super(options)
19 }
20
21 override protected doCreateStateCoder(NeighbourhoodOptions options) {
22 new PairwiseNeighbourhoodBasedPartialInterpretationStateCoder(options)
23 }
24}
25
26class PairwiseNeighbourhoodBasedPartialInterpretationStateCoder extends AbstractNeighbourhoodBasedPartialInterpretationStateCoder {
27 val calculator = new PartialInterpretation2PairwiseNeighbourhoodRepresentation(
28 new PartialInterpretation2ImmutableTypeLattice)
29 var PairwiseNeighbourhoodRepresentation<? extends AbstractNodeDescriptor> representation
30
31 new(NeighbourhoodOptions options) {
32 super(options)
33 }
34
35 override protected isRefreshNeeded() {
36 representation === null
37 }
38
39 override protected doRefreshStateCodes(PartialInterpretation target, NeighbourhoodOptions options) {
40 representation = calculator.createRepresentation(target, options)
41 }
42
43 override protected doCreateActivationCode(IPatternMatch match) {
44 val size = match.specification.parameters.size
45 val res = new ArrayList(size * size)
46 for (var int i = 0; i < size; i++) {
47 val a = match.get(i)
48 for (var int j = 0; j < size; j++) {
49 val b = match.get(j)
50 res.add(getPairwiseRepresentation(a, b))
51 }
52 }
53 match.specification.fullyQualifiedName -> res.hashCode
54 }
55
56 private def getPairwiseRepresentation(Object a, Object b) {
57 if (b instanceof DefinedElement) {
58 if (a instanceof DefinedElement) {
59 representation.getPairwiseRepresentation(a, b)
60 } else {
61 representation.getBasicRepresentation(b)
62 }
63 } else {
64 getFallbackCode(b)
65 }
66 }
67
68 override protected doCreateStateCode() {
69 representation.modelRepresentation.hashCode
70 }
71
72 override protected doInvalidate() {
73 representation = null
74 }
75}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend
index 2b42a8b1..bdf402f3 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/visualisation/PartialInterpretation2Gml.xtend
@@ -5,9 +5,13 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation
5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type 5import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type
6import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition 6import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition
7import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink 7import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink
8import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BooleanElement
9import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement
8import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation 10import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation
9import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation 11import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
10import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation 12import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation
13import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement
14import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.StringElement
11import java.util.HashMap 15import java.util.HashMap
12import java.util.Map 16import java.util.Map
13import java.util.Set 17import java.util.Set
@@ -106,10 +110,38 @@ class PartialInterpretation2Gml {
106 ''' 110 '''
107 } 111 }
108 112
109 def protected transormTitle(DefinedElement object) { 113 def protected dispatch transormTitle(DefinedElement object) {
110 if(object.name!= null)object.name 114 if(object.name !== null) object.name.replace("\"", "")
111 else "null" 115 else "null"
112 } 116 }
117 def protected dispatch transormTitle(BooleanElement object) {
118 if(object.valueSet) {
119 object.value.toString
120 } else {
121 "?"
122 }
123 }
124 def protected dispatch transormTitle(IntegerElement object) {
125 if(object.valueSet) {
126 object.value.toString
127 } else {
128 "?"
129 }
130 }
131 def protected dispatch transormTitle(RealElement object) {
132 if(object.valueSet) {
133 object.value.toString
134 } else {
135 "?"
136 }
137 }
138 def protected dispatch transormTitle(StringElement object) {
139 if(object.valueSet) {
140 object.value.toString
141 } else {
142 "?"
143 }
144 }
113 145
114 def protected transformLink( 146 def protected transformLink(
115 PartialRelationInterpretation reference, 147 PartialRelationInterpretation reference,