diff options
100 files changed, 1976 insertions, 1667 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin index 069bd953..22db4093 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin | |||
Binary files differ | |||
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin index 624846d6..3ad5d167 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin +++ b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin | |||
Binary files differ | |||
diff --git a/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql b/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql index f0e48d42..1d9a6b6d 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql +++ b/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql | |||
@@ -10,7 +10,7 @@ pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { | |||
10 | InformationLink.to(I,In); | 10 | InformationLink.to(I,In); |
11 | FunctionalInput.terminator(In,T); | 11 | FunctionalInput.terminator(In,T); |
12 | } | 12 | } |
13 | 13 | /* | |
14 | @QueryBasedFeature | 14 | @QueryBasedFeature |
15 | pattern type(This : Function, Target : FunctionType) = { | 15 | pattern type(This : Function, Target : FunctionType) = { |
16 | find rootElements(_Model, This); | 16 | find rootElements(_Model, This); |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend index e4c758f0..503c06ea 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend | |||
@@ -35,18 +35,18 @@ class RuleBasedCpsSolver { | |||
35 | val dse = new DesignSpaceExplorer | 35 | val dse = new DesignSpaceExplorer |
36 | dse.addMetaModelPackage(CpsPackage.eINSTANCE) | 36 | dse.addMetaModelPackage(CpsPackage.eINSTANCE) |
37 | dse.initialModel = problem.eResource.resourceSet | 37 | dse.initialModel = problem.eResource.resourceSet |
38 | dse.addTransformationRule(createRule(RequirementNotSatisfied.instance).action [ | 38 | dse.addTransformationRule(createRule.precondition(RequirementNotSatisfied.instance).action [ |
39 | val app = createApplicationInstance | 39 | val app = createApplicationInstance |
40 | req.type.instances += app | 40 | req.type.instances += app |
41 | req.instances += app | 41 | req.instances += app |
42 | ].build) | 42 | ].build) |
43 | dse.addTransformationRule(createRule(Allocate.instance).action [ | 43 | dse.addTransformationRule(createRule.precondition(Allocate.instance).action [ |
44 | app.allocatedTo = host | 44 | app.allocatedTo = host |
45 | ].build) | 45 | ].build) |
46 | // dse.addTransformationRule(createRule(UnallocateAppInstance.instance).action [ | 46 | // dse.addTransformationRule(createRule(UnallocateAppInstance.instance).action [ |
47 | // app.allocatedTo = null | 47 | // app.allocatedTo = null |
48 | // ].build) | 48 | // ].build) |
49 | dse.addTransformationRule(createRule(CreateHostInstance.instance).action [ | 49 | dse.addTransformationRule(createRule.precondition(CreateHostInstance.instance).action [ |
50 | hostType.instances += createHostInstance | 50 | hostType.instances += createHostInstance |
51 | ].build) | 51 | ].build) |
52 | // dse.addTransformationRule(createRule(RemoveHostInstance.instance).action [ | 52 | // dse.addTransformationRule(createRule(RemoveHostInstance.instance).action [ |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.classpath b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.classpath index e5e58475..6781ea8f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.classpath +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.classpath | |||
@@ -3,9 +3,12 @@ | |||
3 | <classpathentry kind="src" path="ecore-gen"/> | 3 | <classpathentry kind="src" path="ecore-gen"/> |
4 | <classpathentry kind="src" path="src"/> | 4 | <classpathentry kind="src" path="src"/> |
5 | <classpathentry kind="src" path="xtend-gen"/> | 5 | <classpathentry kind="src" path="xtend-gen"/> |
6 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | 6 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"> |
7 | <attributes> | ||
8 | <attribute name="module" value="true"/> | ||
9 | </attributes> | ||
10 | </classpathentry> | ||
7 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | 11 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
8 | <classpathentry kind="src" path="src-gen"/> | 12 | <classpathentry kind="src" path="src-gen"/> |
9 | <classpathentry kind="con" path="uk.ac.kcl.inf.mdeoptimiser.languages.ui.Mopt.MDEO_CONTAINER/dsl"/> | ||
10 | <classpathentry kind="output" path="bin"/> | 13 | <classpathentry kind="output" path="bin"/> |
11 | </classpath> | 14 | </classpath> |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.project b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.project index 16db5fc5..e594a173 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.project +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.project | |||
@@ -32,6 +32,7 @@ | |||
32 | </buildCommand> | 32 | </buildCommand> |
33 | </buildSpec> | 33 | </buildSpec> |
34 | <natures> | 34 | <natures> |
35 | <nature>org.eclipse.sirius.nature.modelingproject</nature> | ||
35 | <nature>org.eclipse.jdt.core.javanature</nature> | 36 | <nature>org.eclipse.jdt.core.javanature</nature> |
36 | <nature>org.eclipse.pde.PluginNature</nature> | 37 | <nature>org.eclipse.pde.PluginNature</nature> |
37 | <nature>org.eclipse.viatra.query.projectnature</nature> | 38 | <nature>org.eclipse.viatra.query.projectnature</nature> |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.settings/org.eclipse.core.resources.prefs b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 4a3e59e4..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.settings/org.eclipse.core.resources.prefs +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | encoding//model/satellite.henshin=UTF-8 | ||
3 | encoding//model/satellite.henshin_diagram=UTF-8 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF index 36d729b4..966fc660 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF | |||
@@ -7,6 +7,7 @@ Bundle-ClassPath: . | |||
7 | Bundle-Vendor: %providerName | 7 | Bundle-Vendor: %providerName |
8 | Bundle-Localization: plugin | 8 | Bundle-Localization: plugin |
9 | Export-Package: hu.bme.mit.inf.dslreasoner.domains.satellite.queries, | 9 | Export-Package: hu.bme.mit.inf.dslreasoner.domains.satellite.queries, |
10 | hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal, | ||
10 | satellite, | 11 | satellite, |
11 | satellite.impl, | 12 | satellite.impl, |
12 | satellite.util | 13 | satellite.util |
@@ -22,20 +23,7 @@ Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime, | |||
22 | org.eclipse.viatra.dse.genetic, | 23 | org.eclipse.viatra.dse.genetic, |
23 | hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner;bundle-version="1.0.0", | 24 | hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner;bundle-version="1.0.0", |
24 | org.eclipse.emf.ecore.xmi;bundle-version="2.15.0", | 25 | org.eclipse.emf.ecore.xmi;bundle-version="2.15.0", |
25 | uk.ac.kcl.inf.mdeoptimiser.libraries.core;bundle-version="1.0.0", | 26 | org.eclipse.viatra.query.runtime.rete;bundle-version="2.0.0" |
26 | uk.ac.kcl.inf.mdeoptimiser.interfaces.cli;bundle-version="1.0.0", | ||
27 | org.eclipse.emf.henshin.interpreter;bundle-version="1.5.0", | ||
28 | uk.ac.kcl.inf.mdeoptimiser.libraries.rulegen;bundle-version="1.0.0", | ||
29 | org.sidiff.common;bundle-version="1.0.0", | ||
30 | org.sidiff.common.emf;bundle-version="1.0.0", | ||
31 | org.sidiff.common.emf.extensions;bundle-version="1.0.0", | ||
32 | org.moeaframework;bundle-version="2.13.0", | ||
33 | org.apache.commons.math3;bundle-version="3.6.1", | ||
34 | org.apache.commons.lang3;bundle-version="3.8.1", | ||
35 | com.google.inject;bundle-version="3.0.0", | ||
36 | org.sidiff.common.henshin;bundle-version="1.0.0", | ||
37 | org.sidiff.serge;bundle-version="1.0.0", | ||
38 | org.eclipse.viatra.query.runtime.rete;bundle-version="2.2.0" | ||
39 | Import-Package: org.apache.log4j | 27 | Import-Package: org.apache.log4j |
40 | Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.domains.satellite | 28 | Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.domains.satellite |
41 | Bundle-ActivationPolicy: lazy | 29 | Bundle-ActivationPolicy: lazy |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig index 66c468d0..2fb246c9 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig | |||
@@ -2,7 +2,7 @@ import epackage "model/satellite.ecore" | |||
2 | import viatra "src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql" | 2 | import viatra "src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql" |
3 | 3 | ||
4 | generate { | 4 | generate { |
5 | metamodel = { package satellite excluding { InterferometryMission.observationTime } } | 5 | metamodel = { package satellite } |
6 | constraints = { package hu.bme.mit.inf.dslreasoner.domains.satellite.queries } | 6 | constraints = { package hu.bme.mit.inf.dslreasoner.domains.satellite.queries } |
7 | partial-model = { "inputs/SatelliteInstance.xmi"} | 7 | partial-model = { "inputs/SatelliteInstance.xmi"} |
8 | solver = ViatraSolver | 8 | solver = ViatraSolver |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java index 90bca78c..3b9d7ecf 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java | |||
@@ -2,7 +2,6 @@ | |||
2 | */ | 2 | */ |
3 | package satellite; | 3 | package satellite; |
4 | 4 | ||
5 | import org.eclipse.emf.common.util.EList; | ||
6 | import org.eclipse.emf.ecore.EObject; | 5 | import org.eclipse.emf.ecore.EObject; |
7 | 6 | ||
8 | /** | 7 | /** |
@@ -15,7 +14,6 @@ import org.eclipse.emf.ecore.EObject; | |||
15 | * </p> | 14 | * </p> |
16 | * <ul> | 15 | * <ul> |
17 | * <li>{@link satellite.CommSubsystem#getTarget <em>Target</em>}</li> | 16 | * <li>{@link satellite.CommSubsystem#getTarget <em>Target</em>}</li> |
18 | * <li>{@link satellite.CommSubsystem#getSource <em>Source</em>}</li> | ||
19 | * </ul> | 17 | * </ul> |
20 | * | 18 | * |
21 | * @see satellite.SatellitePackage#getCommSubsystem() | 19 | * @see satellite.SatellitePackage#getCommSubsystem() |
@@ -26,14 +24,12 @@ public interface CommSubsystem extends EObject { | |||
26 | 24 | ||
27 | /** | 25 | /** |
28 | * Returns the value of the '<em><b>Target</b></em>' reference. | 26 | * Returns the value of the '<em><b>Target</b></em>' reference. |
29 | * It is bidirectional and its opposite is '{@link satellite.CommSubsystem#getSource <em>Source</em>}'. | ||
30 | * <!-- begin-user-doc --> | 27 | * <!-- begin-user-doc --> |
31 | * <!-- end-user-doc --> | 28 | * <!-- end-user-doc --> |
32 | * @return the value of the '<em>Target</em>' reference. | 29 | * @return the value of the '<em>Target</em>' reference. |
33 | * @see #setTarget(CommSubsystem) | 30 | * @see #setTarget(CommSubsystem) |
34 | * @see satellite.SatellitePackage#getCommSubsystem_Target() | 31 | * @see satellite.SatellitePackage#getCommSubsystem_Target() |
35 | * @see satellite.CommSubsystem#getSource | 32 | * @model |
36 | * @model opposite="source" | ||
37 | * @generated | 33 | * @generated |
38 | */ | 34 | */ |
39 | CommSubsystem getTarget(); | 35 | CommSubsystem getTarget(); |
@@ -48,18 +44,4 @@ public interface CommSubsystem extends EObject { | |||
48 | */ | 44 | */ |
49 | void setTarget(CommSubsystem value); | 45 | void setTarget(CommSubsystem value); |
50 | 46 | ||
51 | /** | ||
52 | * Returns the value of the '<em><b>Source</b></em>' reference list. | ||
53 | * The list contents are of type {@link satellite.CommSubsystem}. | ||
54 | * It is bidirectional and its opposite is '{@link satellite.CommSubsystem#getTarget <em>Target</em>}'. | ||
55 | * <!-- begin-user-doc --> | ||
56 | * <!-- end-user-doc --> | ||
57 | * @return the value of the '<em>Source</em>' reference list. | ||
58 | * @see satellite.SatellitePackage#getCommSubsystem_Source() | ||
59 | * @see satellite.CommSubsystem#getTarget | ||
60 | * @model opposite="target" | ||
61 | * @generated | ||
62 | */ | ||
63 | EList<CommSubsystem> getSource(); | ||
64 | |||
65 | } // CommSubsystem | 47 | } // CommSubsystem |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/ConstellationMission.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/ConstellationMission.java index 6182d7ad..8ff69955 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/ConstellationMission.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/ConstellationMission.java | |||
@@ -53,7 +53,7 @@ public interface ConstellationMission extends EObject { | |||
53 | * <!-- end-user-doc --> | 53 | * <!-- end-user-doc --> |
54 | * @return the value of the '<em>Spacecraft</em>' containment reference list. | 54 | * @return the value of the '<em>Spacecraft</em>' containment reference list. |
55 | * @see satellite.SatellitePackage#getConstellationMission_Spacecraft() | 55 | * @see satellite.SatellitePackage#getConstellationMission_Spacecraft() |
56 | * @model containment="true" lower="2" upper="50" | 56 | * @model containment="true" lower="2" |
57 | * @generated | 57 | * @generated |
58 | */ | 58 | */ |
59 | EList<Spacecraft> getSpacecraft(); | 59 | EList<Spacecraft> getSpacecraft(); |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/InterferometryMission.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/InterferometryMission.java index eb4ea064..4e28df38 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/InterferometryMission.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/InterferometryMission.java | |||
@@ -7,39 +7,11 @@ package satellite; | |||
7 | * A representation of the model object '<em><b>Interferometry Mission</b></em>'. | 7 | * A representation of the model object '<em><b>Interferometry Mission</b></em>'. |
8 | * <!-- end-user-doc --> | 8 | * <!-- end-user-doc --> |
9 | * | 9 | * |
10 | * <p> | ||
11 | * The following features are supported: | ||
12 | * </p> | ||
13 | * <ul> | ||
14 | * <li>{@link satellite.InterferometryMission#getObservationTime <em>Observation Time</em>}</li> | ||
15 | * </ul> | ||
16 | * | 10 | * |
17 | * @see satellite.SatellitePackage#getInterferometryMission() | 11 | * @see satellite.SatellitePackage#getInterferometryMission() |
18 | * @model | 12 | * @model |
19 | * @generated | 13 | * @generated |
20 | */ | 14 | */ |
21 | public interface InterferometryMission extends ConstellationMission { | 15 | public interface InterferometryMission extends ConstellationMission { |
22 | /** | ||
23 | * Returns the value of the '<em><b>Observation Time</b></em>' attribute. | ||
24 | * The default value is <code>"2.0"</code>. | ||
25 | * <!-- begin-user-doc --> | ||
26 | * <!-- end-user-doc --> | ||
27 | * @return the value of the '<em>Observation Time</em>' attribute. | ||
28 | * @see #setObservationTime(float) | ||
29 | * @see satellite.SatellitePackage#getInterferometryMission_ObservationTime() | ||
30 | * @model default="2.0" required="true" | ||
31 | * @generated | ||
32 | */ | ||
33 | float getObservationTime(); | ||
34 | |||
35 | /** | ||
36 | * Sets the value of the '{@link satellite.InterferometryMission#getObservationTime <em>Observation Time</em>}' attribute. | ||
37 | * <!-- begin-user-doc --> | ||
38 | * <!-- end-user-doc --> | ||
39 | * @param value the new value of the '<em>Observation Time</em>' attribute. | ||
40 | * @see #getObservationTime() | ||
41 | * @generated | ||
42 | */ | ||
43 | void setObservationTime(float value); | ||
44 | 16 | ||
45 | } // InterferometryMission | 17 | } // InterferometryMission |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java index 7be4ef84..9ca99311 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java | |||
@@ -2,7 +2,6 @@ | |||
2 | */ | 2 | */ |
3 | package satellite; | 3 | package satellite; |
4 | 4 | ||
5 | import org.eclipse.emf.ecore.EAttribute; | ||
6 | import org.eclipse.emf.ecore.EClass; | 5 | import org.eclipse.emf.ecore.EClass; |
7 | import org.eclipse.emf.ecore.EPackage; | 6 | import org.eclipse.emf.ecore.EPackage; |
8 | import org.eclipse.emf.ecore.EReference; | 7 | import org.eclipse.emf.ecore.EReference; |
@@ -131,22 +130,13 @@ public interface SatellitePackage extends EPackage { | |||
131 | int INTERFEROMETRY_MISSION__SPACECRAFT = CONSTELLATION_MISSION__SPACECRAFT; | 130 | int INTERFEROMETRY_MISSION__SPACECRAFT = CONSTELLATION_MISSION__SPACECRAFT; |
132 | 131 | ||
133 | /** | 132 | /** |
134 | * The feature id for the '<em><b>Observation Time</b></em>' attribute. | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @generated | ||
138 | * @ordered | ||
139 | */ | ||
140 | int INTERFEROMETRY_MISSION__OBSERVATION_TIME = CONSTELLATION_MISSION_FEATURE_COUNT + 0; | ||
141 | |||
142 | /** | ||
143 | * The number of structural features of the '<em>Interferometry Mission</em>' class. | 133 | * The number of structural features of the '<em>Interferometry Mission</em>' class. |
144 | * <!-- begin-user-doc --> | 134 | * <!-- begin-user-doc --> |
145 | * <!-- end-user-doc --> | 135 | * <!-- end-user-doc --> |
146 | * @generated | 136 | * @generated |
147 | * @ordered | 137 | * @ordered |
148 | */ | 138 | */ |
149 | int INTERFEROMETRY_MISSION_FEATURE_COUNT = CONSTELLATION_MISSION_FEATURE_COUNT + 1; | 139 | int INTERFEROMETRY_MISSION_FEATURE_COUNT = CONSTELLATION_MISSION_FEATURE_COUNT + 0; |
150 | 140 | ||
151 | /** | 141 | /** |
152 | * The number of operations of the '<em>Interferometry Mission</em>' class. | 142 | * The number of operations of the '<em>Interferometry Mission</em>' class. |
@@ -297,22 +287,13 @@ public interface SatellitePackage extends EPackage { | |||
297 | int COMM_SUBSYSTEM__TARGET = 0; | 287 | int COMM_SUBSYSTEM__TARGET = 0; |
298 | 288 | ||
299 | /** | 289 | /** |
300 | * The feature id for the '<em><b>Source</b></em>' reference list. | ||
301 | * <!-- begin-user-doc --> | ||
302 | * <!-- end-user-doc --> | ||
303 | * @generated | ||
304 | * @ordered | ||
305 | */ | ||
306 | int COMM_SUBSYSTEM__SOURCE = 1; | ||
307 | |||
308 | /** | ||
309 | * The number of structural features of the '<em>Comm Subsystem</em>' class. | 290 | * The number of structural features of the '<em>Comm Subsystem</em>' class. |
310 | * <!-- begin-user-doc --> | 291 | * <!-- begin-user-doc --> |
311 | * <!-- end-user-doc --> | 292 | * <!-- end-user-doc --> |
312 | * @generated | 293 | * @generated |
313 | * @ordered | 294 | * @ordered |
314 | */ | 295 | */ |
315 | int COMM_SUBSYSTEM_FEATURE_COUNT = 2; | 296 | int COMM_SUBSYSTEM_FEATURE_COUNT = 1; |
316 | 297 | ||
317 | /** | 298 | /** |
318 | * The number of operations of the '<em>Comm Subsystem</em>' class. | 299 | * The number of operations of the '<em>Comm Subsystem</em>' class. |
@@ -583,15 +564,6 @@ public interface SatellitePackage extends EPackage { | |||
583 | int UHF_COMM_SUBSYSTEM__TARGET = COMM_SUBSYSTEM__TARGET; | 564 | int UHF_COMM_SUBSYSTEM__TARGET = COMM_SUBSYSTEM__TARGET; |
584 | 565 | ||
585 | /** | 566 | /** |
586 | * The feature id for the '<em><b>Source</b></em>' reference list. | ||
587 | * <!-- begin-user-doc --> | ||
588 | * <!-- end-user-doc --> | ||
589 | * @generated | ||
590 | * @ordered | ||
591 | */ | ||
592 | int UHF_COMM_SUBSYSTEM__SOURCE = COMM_SUBSYSTEM__SOURCE; | ||
593 | |||
594 | /** | ||
595 | * The number of structural features of the '<em>UHF Comm Subsystem</em>' class. | 567 | * The number of structural features of the '<em>UHF Comm Subsystem</em>' class. |
596 | * <!-- begin-user-doc --> | 568 | * <!-- begin-user-doc --> |
597 | * <!-- end-user-doc --> | 569 | * <!-- end-user-doc --> |
@@ -629,15 +601,6 @@ public interface SatellitePackage extends EPackage { | |||
629 | int XCOMM_SUBSYSTEM__TARGET = COMM_SUBSYSTEM__TARGET; | 601 | int XCOMM_SUBSYSTEM__TARGET = COMM_SUBSYSTEM__TARGET; |
630 | 602 | ||
631 | /** | 603 | /** |
632 | * The feature id for the '<em><b>Source</b></em>' reference list. | ||
633 | * <!-- begin-user-doc --> | ||
634 | * <!-- end-user-doc --> | ||
635 | * @generated | ||
636 | * @ordered | ||
637 | */ | ||
638 | int XCOMM_SUBSYSTEM__SOURCE = COMM_SUBSYSTEM__SOURCE; | ||
639 | |||
640 | /** | ||
641 | * The number of structural features of the '<em>XComm Subsystem</em>' class. | 604 | * The number of structural features of the '<em>XComm Subsystem</em>' class. |
642 | * <!-- begin-user-doc --> | 605 | * <!-- begin-user-doc --> |
643 | * <!-- end-user-doc --> | 606 | * <!-- end-user-doc --> |
@@ -675,15 +638,6 @@ public interface SatellitePackage extends EPackage { | |||
675 | int KA_COMM_SUBSYSTEM__TARGET = COMM_SUBSYSTEM__TARGET; | 638 | int KA_COMM_SUBSYSTEM__TARGET = COMM_SUBSYSTEM__TARGET; |
676 | 639 | ||
677 | /** | 640 | /** |
678 | * The feature id for the '<em><b>Source</b></em>' reference list. | ||
679 | * <!-- begin-user-doc --> | ||
680 | * <!-- end-user-doc --> | ||
681 | * @generated | ||
682 | * @ordered | ||
683 | */ | ||
684 | int KA_COMM_SUBSYSTEM__SOURCE = COMM_SUBSYSTEM__SOURCE; | ||
685 | |||
686 | /** | ||
687 | * The number of structural features of the '<em>Ka Comm Subsystem</em>' class. | 641 | * The number of structural features of the '<em>Ka Comm Subsystem</em>' class. |
688 | * <!-- begin-user-doc --> | 642 | * <!-- begin-user-doc --> |
689 | * <!-- end-user-doc --> | 643 | * <!-- end-user-doc --> |
@@ -744,17 +698,6 @@ public interface SatellitePackage extends EPackage { | |||
744 | EClass getInterferometryMission(); | 698 | EClass getInterferometryMission(); |
745 | 699 | ||
746 | /** | 700 | /** |
747 | * Returns the meta object for the attribute '{@link satellite.InterferometryMission#getObservationTime <em>Observation Time</em>}'. | ||
748 | * <!-- begin-user-doc --> | ||
749 | * <!-- end-user-doc --> | ||
750 | * @return the meta object for the attribute '<em>Observation Time</em>'. | ||
751 | * @see satellite.InterferometryMission#getObservationTime() | ||
752 | * @see #getInterferometryMission() | ||
753 | * @generated | ||
754 | */ | ||
755 | EAttribute getInterferometryMission_ObservationTime(); | ||
756 | |||
757 | /** | ||
758 | * Returns the meta object for class '{@link satellite.CommunicatingElement <em>Communicating Element</em>}'. | 701 | * Returns the meta object for class '{@link satellite.CommunicatingElement <em>Communicating Element</em>}'. |
759 | * <!-- begin-user-doc --> | 702 | * <!-- begin-user-doc --> |
760 | * <!-- end-user-doc --> | 703 | * <!-- end-user-doc --> |
@@ -828,17 +771,6 @@ public interface SatellitePackage extends EPackage { | |||
828 | EReference getCommSubsystem_Target(); | 771 | EReference getCommSubsystem_Target(); |
829 | 772 | ||
830 | /** | 773 | /** |
831 | * Returns the meta object for the reference list '{@link satellite.CommSubsystem#getSource <em>Source</em>}'. | ||
832 | * <!-- begin-user-doc --> | ||
833 | * <!-- end-user-doc --> | ||
834 | * @return the meta object for the reference list '<em>Source</em>'. | ||
835 | * @see satellite.CommSubsystem#getSource() | ||
836 | * @see #getCommSubsystem() | ||
837 | * @generated | ||
838 | */ | ||
839 | EReference getCommSubsystem_Source(); | ||
840 | |||
841 | /** | ||
842 | * Returns the meta object for class '{@link satellite.Payload <em>Payload</em>}'. | 774 | * Returns the meta object for class '{@link satellite.Payload <em>Payload</em>}'. |
843 | * <!-- begin-user-doc --> | 775 | * <!-- begin-user-doc --> |
844 | * <!-- end-user-doc --> | 776 | * <!-- end-user-doc --> |
@@ -989,14 +921,6 @@ public interface SatellitePackage extends EPackage { | |||
989 | EClass INTERFEROMETRY_MISSION = eINSTANCE.getInterferometryMission(); | 921 | EClass INTERFEROMETRY_MISSION = eINSTANCE.getInterferometryMission(); |
990 | 922 | ||
991 | /** | 923 | /** |
992 | * The meta object literal for the '<em><b>Observation Time</b></em>' attribute feature. | ||
993 | * <!-- begin-user-doc --> | ||
994 | * <!-- end-user-doc --> | ||
995 | * @generated | ||
996 | */ | ||
997 | EAttribute INTERFEROMETRY_MISSION__OBSERVATION_TIME = eINSTANCE.getInterferometryMission_ObservationTime(); | ||
998 | |||
999 | /** | ||
1000 | * The meta object literal for the '{@link satellite.impl.CommunicatingElementImpl <em>Communicating Element</em>}' class. | 924 | * The meta object literal for the '{@link satellite.impl.CommunicatingElementImpl <em>Communicating Element</em>}' class. |
1001 | * <!-- begin-user-doc --> | 925 | * <!-- begin-user-doc --> |
1002 | * <!-- end-user-doc --> | 926 | * <!-- end-user-doc --> |
@@ -1061,14 +985,6 @@ public interface SatellitePackage extends EPackage { | |||
1061 | EReference COMM_SUBSYSTEM__TARGET = eINSTANCE.getCommSubsystem_Target(); | 985 | EReference COMM_SUBSYSTEM__TARGET = eINSTANCE.getCommSubsystem_Target(); |
1062 | 986 | ||
1063 | /** | 987 | /** |
1064 | * The meta object literal for the '<em><b>Source</b></em>' reference list feature. | ||
1065 | * <!-- begin-user-doc --> | ||
1066 | * <!-- end-user-doc --> | ||
1067 | * @generated | ||
1068 | */ | ||
1069 | EReference COMM_SUBSYSTEM__SOURCE = eINSTANCE.getCommSubsystem_Source(); | ||
1070 | |||
1071 | /** | ||
1072 | * The meta object literal for the '{@link satellite.impl.PayloadImpl <em>Payload</em>}' class. | 988 | * The meta object literal for the '{@link satellite.impl.PayloadImpl <em>Payload</em>}' class. |
1073 | * <!-- begin-user-doc --> | 989 | * <!-- begin-user-doc --> |
1074 | * <!-- end-user-doc --> | 990 | * <!-- end-user-doc --> |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java index 21e385a8..d39abd4d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java | |||
@@ -2,16 +2,11 @@ | |||
2 | */ | 2 | */ |
3 | package satellite.impl; | 3 | package satellite.impl; |
4 | 4 | ||
5 | import java.util.Collection; | ||
6 | import org.eclipse.emf.common.notify.Notification; | 5 | import org.eclipse.emf.common.notify.Notification; |
7 | import org.eclipse.emf.common.notify.NotificationChain; | ||
8 | import org.eclipse.emf.common.util.EList; | ||
9 | import org.eclipse.emf.ecore.EClass; | 6 | import org.eclipse.emf.ecore.EClass; |
10 | import org.eclipse.emf.ecore.InternalEObject; | 7 | import org.eclipse.emf.ecore.InternalEObject; |
11 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | 8 | import org.eclipse.emf.ecore.impl.ENotificationImpl; |
12 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | 9 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
13 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; | ||
14 | import org.eclipse.emf.ecore.util.InternalEList; | ||
15 | import satellite.CommSubsystem; | 10 | import satellite.CommSubsystem; |
16 | import satellite.SatellitePackage; | 11 | import satellite.SatellitePackage; |
17 | 12 | ||
@@ -24,7 +19,6 @@ import satellite.SatellitePackage; | |||
24 | * </p> | 19 | * </p> |
25 | * <ul> | 20 | * <ul> |
26 | * <li>{@link satellite.impl.CommSubsystemImpl#getTarget <em>Target</em>}</li> | 21 | * <li>{@link satellite.impl.CommSubsystemImpl#getTarget <em>Target</em>}</li> |
27 | * <li>{@link satellite.impl.CommSubsystemImpl#getSource <em>Source</em>}</li> | ||
28 | * </ul> | 22 | * </ul> |
29 | * | 23 | * |
30 | * @generated | 24 | * @generated |
@@ -41,16 +35,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
41 | protected CommSubsystem target; | 35 | protected CommSubsystem target; |
42 | 36 | ||
43 | /** | 37 | /** |
44 | * The cached value of the '{@link #getSource() <em>Source</em>}' reference list. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @see #getSource() | ||
48 | * @generated | ||
49 | * @ordered | ||
50 | */ | ||
51 | protected EList<CommSubsystem> source; | ||
52 | |||
53 | /** | ||
54 | * <!-- begin-user-doc --> | 38 | * <!-- begin-user-doc --> |
55 | * <!-- end-user-doc --> | 39 | * <!-- end-user-doc --> |
56 | * @generated | 40 | * @generated |
@@ -102,91 +86,13 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
102 | * <!-- end-user-doc --> | 86 | * <!-- end-user-doc --> |
103 | * @generated | 87 | * @generated |
104 | */ | 88 | */ |
105 | public NotificationChain basicSetTarget(CommSubsystem newTarget, NotificationChain msgs) { | ||
106 | CommSubsystem oldTarget = target; | ||
107 | target = newTarget; | ||
108 | if (eNotificationRequired()) { | ||
109 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, | ||
110 | SatellitePackage.COMM_SUBSYSTEM__TARGET, oldTarget, newTarget); | ||
111 | if (msgs == null) | ||
112 | msgs = notification; | ||
113 | else | ||
114 | msgs.add(notification); | ||
115 | } | ||
116 | return msgs; | ||
117 | } | ||
118 | |||
119 | /** | ||
120 | * <!-- begin-user-doc --> | ||
121 | * <!-- end-user-doc --> | ||
122 | * @generated | ||
123 | */ | ||
124 | @Override | 89 | @Override |
125 | public void setTarget(CommSubsystem newTarget) { | 90 | public void setTarget(CommSubsystem newTarget) { |
126 | if (newTarget != target) { | 91 | CommSubsystem oldTarget = target; |
127 | NotificationChain msgs = null; | 92 | target = newTarget; |
128 | if (target != null) | 93 | if (eNotificationRequired()) |
129 | msgs = ((InternalEObject) target).eInverseRemove(this, SatellitePackage.COMM_SUBSYSTEM__SOURCE, | 94 | eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.COMM_SUBSYSTEM__TARGET, oldTarget, |
130 | CommSubsystem.class, msgs); | 95 | target)); |
131 | if (newTarget != null) | ||
132 | msgs = ((InternalEObject) newTarget).eInverseAdd(this, SatellitePackage.COMM_SUBSYSTEM__SOURCE, | ||
133 | CommSubsystem.class, msgs); | ||
134 | msgs = basicSetTarget(newTarget, msgs); | ||
135 | if (msgs != null) | ||
136 | msgs.dispatch(); | ||
137 | } else if (eNotificationRequired()) | ||
138 | eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.COMM_SUBSYSTEM__TARGET, newTarget, | ||
139 | newTarget)); | ||
140 | } | ||
141 | |||
142 | /** | ||
143 | * <!-- begin-user-doc --> | ||
144 | * <!-- end-user-doc --> | ||
145 | * @generated | ||
146 | */ | ||
147 | @Override | ||
148 | public EList<CommSubsystem> getSource() { | ||
149 | if (source == null) { | ||
150 | source = new EObjectWithInverseResolvingEList<CommSubsystem>(CommSubsystem.class, this, | ||
151 | SatellitePackage.COMM_SUBSYSTEM__SOURCE, SatellitePackage.COMM_SUBSYSTEM__TARGET); | ||
152 | } | ||
153 | return source; | ||
154 | } | ||
155 | |||
156 | /** | ||
157 | * <!-- begin-user-doc --> | ||
158 | * <!-- end-user-doc --> | ||
159 | * @generated | ||
160 | */ | ||
161 | @SuppressWarnings("unchecked") | ||
162 | @Override | ||
163 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
164 | switch (featureID) { | ||
165 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: | ||
166 | if (target != null) | ||
167 | msgs = ((InternalEObject) target).eInverseRemove(this, SatellitePackage.COMM_SUBSYSTEM__SOURCE, | ||
168 | CommSubsystem.class, msgs); | ||
169 | return basicSetTarget((CommSubsystem) otherEnd, msgs); | ||
170 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
171 | return ((InternalEList<InternalEObject>) (InternalEList<?>) getSource()).basicAdd(otherEnd, msgs); | ||
172 | } | ||
173 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
174 | } | ||
175 | |||
176 | /** | ||
177 | * <!-- begin-user-doc --> | ||
178 | * <!-- end-user-doc --> | ||
179 | * @generated | ||
180 | */ | ||
181 | @Override | ||
182 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
183 | switch (featureID) { | ||
184 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: | ||
185 | return basicSetTarget(null, msgs); | ||
186 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
187 | return ((InternalEList<?>) getSource()).basicRemove(otherEnd, msgs); | ||
188 | } | ||
189 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
190 | } | 96 | } |
191 | 97 | ||
192 | /** | 98 | /** |
@@ -201,8 +107,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
201 | if (resolve) | 107 | if (resolve) |
202 | return getTarget(); | 108 | return getTarget(); |
203 | return basicGetTarget(); | 109 | return basicGetTarget(); |
204 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
205 | return getSource(); | ||
206 | } | 110 | } |
207 | return super.eGet(featureID, resolve, coreType); | 111 | return super.eGet(featureID, resolve, coreType); |
208 | } | 112 | } |
@@ -219,10 +123,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
219 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: | 123 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: |
220 | setTarget((CommSubsystem) newValue); | 124 | setTarget((CommSubsystem) newValue); |
221 | return; | 125 | return; |
222 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
223 | getSource().clear(); | ||
224 | getSource().addAll((Collection<? extends CommSubsystem>) newValue); | ||
225 | return; | ||
226 | } | 126 | } |
227 | super.eSet(featureID, newValue); | 127 | super.eSet(featureID, newValue); |
228 | } | 128 | } |
@@ -238,9 +138,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
238 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: | 138 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: |
239 | setTarget((CommSubsystem) null); | 139 | setTarget((CommSubsystem) null); |
240 | return; | 140 | return; |
241 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
242 | getSource().clear(); | ||
243 | return; | ||
244 | } | 141 | } |
245 | super.eUnset(featureID); | 142 | super.eUnset(featureID); |
246 | } | 143 | } |
@@ -255,8 +152,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp | |||
255 | switch (featureID) { | 152 | switch (featureID) { |
256 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: | 153 | case SatellitePackage.COMM_SUBSYSTEM__TARGET: |
257 | return target != null; | 154 | return target != null; |
258 | case SatellitePackage.COMM_SUBSYSTEM__SOURCE: | ||
259 | return source != null && !source.isEmpty(); | ||
260 | } | 155 | } |
261 | return super.eIsSet(featureID); | 156 | return super.eIsSet(featureID); |
262 | } | 157 | } |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/InterferometryMissionImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/InterferometryMissionImpl.java index 3401ad51..450f8a9a 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/InterferometryMissionImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/InterferometryMissionImpl.java | |||
@@ -2,12 +2,7 @@ | |||
2 | */ | 2 | */ |
3 | package satellite.impl; | 3 | package satellite.impl; |
4 | 4 | ||
5 | import org.eclipse.emf.common.notify.Notification; | ||
6 | |||
7 | import org.eclipse.emf.ecore.EClass; | 5 | import org.eclipse.emf.ecore.EClass; |
8 | |||
9 | import org.eclipse.emf.ecore.impl.ENotificationImpl; | ||
10 | |||
11 | import satellite.InterferometryMission; | 6 | import satellite.InterferometryMission; |
12 | import satellite.SatellitePackage; | 7 | import satellite.SatellitePackage; |
13 | 8 | ||
@@ -15,37 +10,11 @@ import satellite.SatellitePackage; | |||
15 | * <!-- begin-user-doc --> | 10 | * <!-- begin-user-doc --> |
16 | * An implementation of the model object '<em><b>Interferometry Mission</b></em>'. | 11 | * An implementation of the model object '<em><b>Interferometry Mission</b></em>'. |
17 | * <!-- end-user-doc --> | 12 | * <!-- end-user-doc --> |
18 | * <p> | ||
19 | * The following features are implemented: | ||
20 | * </p> | ||
21 | * <ul> | ||
22 | * <li>{@link satellite.impl.InterferometryMissionImpl#getObservationTime <em>Observation Time</em>}</li> | ||
23 | * </ul> | ||
24 | * | 13 | * |
25 | * @generated | 14 | * @generated |
26 | */ | 15 | */ |
27 | public class InterferometryMissionImpl extends ConstellationMissionImpl implements InterferometryMission { | 16 | public class InterferometryMissionImpl extends ConstellationMissionImpl implements InterferometryMission { |
28 | /** | 17 | /** |
29 | * The default value of the '{@link #getObservationTime() <em>Observation Time</em>}' attribute. | ||
30 | * <!-- begin-user-doc --> | ||
31 | * <!-- end-user-doc --> | ||
32 | * @see #getObservationTime() | ||
33 | * @generated | ||
34 | * @ordered | ||
35 | */ | ||
36 | protected static final float OBSERVATION_TIME_EDEFAULT = 2.0F; | ||
37 | |||
38 | /** | ||
39 | * The cached value of the '{@link #getObservationTime() <em>Observation Time</em>}' attribute. | ||
40 | * <!-- begin-user-doc --> | ||
41 | * <!-- end-user-doc --> | ||
42 | * @see #getObservationTime() | ||
43 | * @generated | ||
44 | * @ordered | ||
45 | */ | ||
46 | protected float observationTime = OBSERVATION_TIME_EDEFAULT; | ||
47 | |||
48 | /** | ||
49 | * <!-- begin-user-doc --> | 18 | * <!-- begin-user-doc --> |
50 | * <!-- end-user-doc --> | 19 | * <!-- end-user-doc --> |
51 | * @generated | 20 | * @generated |
@@ -64,103 +33,4 @@ public class InterferometryMissionImpl extends ConstellationMissionImpl implemen | |||
64 | return SatellitePackage.Literals.INTERFEROMETRY_MISSION; | 33 | return SatellitePackage.Literals.INTERFEROMETRY_MISSION; |
65 | } | 34 | } |
66 | 35 | ||
67 | /** | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <!-- end-user-doc --> | ||
70 | * @generated | ||
71 | */ | ||
72 | @Override | ||
73 | public float getObservationTime() { | ||
74 | return observationTime; | ||
75 | } | ||
76 | |||
77 | /** | ||
78 | * <!-- begin-user-doc --> | ||
79 | * <!-- end-user-doc --> | ||
80 | * @generated | ||
81 | */ | ||
82 | @Override | ||
83 | public void setObservationTime(float newObservationTime) { | ||
84 | float oldObservationTime = observationTime; | ||
85 | observationTime = newObservationTime; | ||
86 | if (eNotificationRequired()) | ||
87 | eNotify(new ENotificationImpl(this, Notification.SET, | ||
88 | SatellitePackage.INTERFEROMETRY_MISSION__OBSERVATION_TIME, oldObservationTime, observationTime)); | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | ||
98 | switch (featureID) { | ||
99 | case SatellitePackage.INTERFEROMETRY_MISSION__OBSERVATION_TIME: | ||
100 | return getObservationTime(); | ||
101 | } | ||
102 | return super.eGet(featureID, resolve, coreType); | ||
103 | } | ||
104 | |||
105 | /** | ||
106 | * <!-- begin-user-doc --> | ||
107 | * <!-- end-user-doc --> | ||
108 | * @generated | ||
109 | */ | ||
110 | @Override | ||
111 | public void eSet(int featureID, Object newValue) { | ||
112 | switch (featureID) { | ||
113 | case SatellitePackage.INTERFEROMETRY_MISSION__OBSERVATION_TIME: | ||
114 | setObservationTime((Float) newValue); | ||
115 | return; | ||
116 | } | ||
117 | super.eSet(featureID, newValue); | ||
118 | } | ||
119 | |||
120 | /** | ||
121 | * <!-- begin-user-doc --> | ||
122 | * <!-- end-user-doc --> | ||
123 | * @generated | ||
124 | */ | ||
125 | @Override | ||
126 | public void eUnset(int featureID) { | ||
127 | switch (featureID) { | ||
128 | case SatellitePackage.INTERFEROMETRY_MISSION__OBSERVATION_TIME: | ||
129 | setObservationTime(OBSERVATION_TIME_EDEFAULT); | ||
130 | return; | ||
131 | } | ||
132 | super.eUnset(featureID); | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * <!-- begin-user-doc --> | ||
137 | * <!-- end-user-doc --> | ||
138 | * @generated | ||
139 | */ | ||
140 | @Override | ||
141 | public boolean eIsSet(int featureID) { | ||
142 | switch (featureID) { | ||
143 | case SatellitePackage.INTERFEROMETRY_MISSION__OBSERVATION_TIME: | ||
144 | return observationTime != OBSERVATION_TIME_EDEFAULT; | ||
145 | } | ||
146 | return super.eIsSet(featureID); | ||
147 | } | ||
148 | |||
149 | /** | ||
150 | * <!-- begin-user-doc --> | ||
151 | * <!-- end-user-doc --> | ||
152 | * @generated | ||
153 | */ | ||
154 | @Override | ||
155 | public String toString() { | ||
156 | if (eIsProxy()) | ||
157 | return super.toString(); | ||
158 | |||
159 | StringBuilder result = new StringBuilder(super.toString()); | ||
160 | result.append(" (observationTime: "); | ||
161 | result.append(observationTime); | ||
162 | result.append(')'); | ||
163 | return result.toString(); | ||
164 | } | ||
165 | |||
166 | } //InterferometryMissionImpl | 36 | } //InterferometryMissionImpl |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java index 17212a96..f6dc1e30 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java | |||
@@ -2,7 +2,6 @@ | |||
2 | */ | 2 | */ |
3 | package satellite.impl; | 3 | package satellite.impl; |
4 | 4 | ||
5 | import org.eclipse.emf.ecore.EAttribute; | ||
6 | import org.eclipse.emf.ecore.EClass; | 5 | import org.eclipse.emf.ecore.EClass; |
7 | import org.eclipse.emf.ecore.EPackage; | 6 | import org.eclipse.emf.ecore.EPackage; |
8 | import org.eclipse.emf.ecore.EReference; | 7 | import org.eclipse.emf.ecore.EReference; |
@@ -248,16 +247,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka | |||
248 | * @generated | 247 | * @generated |
249 | */ | 248 | */ |
250 | @Override | 249 | @Override |
251 | public EAttribute getInterferometryMission_ObservationTime() { | ||
252 | return (EAttribute) interferometryMissionEClass.getEStructuralFeatures().get(0); | ||
253 | } | ||
254 | |||
255 | /** | ||
256 | * <!-- begin-user-doc --> | ||
257 | * <!-- end-user-doc --> | ||
258 | * @generated | ||
259 | */ | ||
260 | @Override | ||
261 | public EClass getCommunicatingElement() { | 250 | public EClass getCommunicatingElement() { |
262 | return communicatingElementEClass; | 251 | return communicatingElementEClass; |
263 | } | 252 | } |
@@ -328,16 +317,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka | |||
328 | * @generated | 317 | * @generated |
329 | */ | 318 | */ |
330 | @Override | 319 | @Override |
331 | public EReference getCommSubsystem_Source() { | ||
332 | return (EReference) commSubsystemEClass.getEStructuralFeatures().get(1); | ||
333 | } | ||
334 | |||
335 | /** | ||
336 | * <!-- begin-user-doc --> | ||
337 | * <!-- end-user-doc --> | ||
338 | * @generated | ||
339 | */ | ||
340 | @Override | ||
341 | public EClass getPayload() { | 320 | public EClass getPayload() { |
342 | return payloadEClass; | 321 | return payloadEClass; |
343 | } | 322 | } |
@@ -457,7 +436,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka | |||
457 | createEReference(constellationMissionEClass, CONSTELLATION_MISSION__SPACECRAFT); | 436 | createEReference(constellationMissionEClass, CONSTELLATION_MISSION__SPACECRAFT); |
458 | 437 | ||
459 | interferometryMissionEClass = createEClass(INTERFEROMETRY_MISSION); | 438 | interferometryMissionEClass = createEClass(INTERFEROMETRY_MISSION); |
460 | createEAttribute(interferometryMissionEClass, INTERFEROMETRY_MISSION__OBSERVATION_TIME); | ||
461 | 439 | ||
462 | communicatingElementEClass = createEClass(COMMUNICATING_ELEMENT); | 440 | communicatingElementEClass = createEClass(COMMUNICATING_ELEMENT); |
463 | createEReference(communicatingElementEClass, COMMUNICATING_ELEMENT__COMM_SUBSYSTEM); | 441 | createEReference(communicatingElementEClass, COMMUNICATING_ELEMENT__COMM_SUBSYSTEM); |
@@ -469,7 +447,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka | |||
469 | 447 | ||
470 | commSubsystemEClass = createEClass(COMM_SUBSYSTEM); | 448 | commSubsystemEClass = createEClass(COMM_SUBSYSTEM); |
471 | createEReference(commSubsystemEClass, COMM_SUBSYSTEM__TARGET); | 449 | createEReference(commSubsystemEClass, COMM_SUBSYSTEM__TARGET); |
472 | createEReference(commSubsystemEClass, COMM_SUBSYSTEM__SOURCE); | ||
473 | 450 | ||
474 | payloadEClass = createEClass(PAYLOAD); | 451 | payloadEClass = createEClass(PAYLOAD); |
475 | 452 | ||
@@ -537,15 +514,12 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka | |||
537 | initEReference(getConstellationMission_GroundStationNetwork(), this.getGroundStationNetwork(), null, | 514 | initEReference(getConstellationMission_GroundStationNetwork(), this.getGroundStationNetwork(), null, |
538 | "groundStationNetwork", null, 1, 1, ConstellationMission.class, !IS_TRANSIENT, !IS_VOLATILE, | 515 | "groundStationNetwork", null, 1, 1, ConstellationMission.class, !IS_TRANSIENT, !IS_VOLATILE, |
539 | IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 516 | IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
540 | initEReference(getConstellationMission_Spacecraft(), this.getSpacecraft(), null, "spacecraft", null, 2, 50, | 517 | initEReference(getConstellationMission_Spacecraft(), this.getSpacecraft(), null, "spacecraft", null, 2, -1, |
541 | ConstellationMission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, | 518 | ConstellationMission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, |
542 | !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 519 | !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
543 | 520 | ||
544 | initEClass(interferometryMissionEClass, InterferometryMission.class, "InterferometryMission", !IS_ABSTRACT, | 521 | initEClass(interferometryMissionEClass, InterferometryMission.class, "InterferometryMission", !IS_ABSTRACT, |
545 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 522 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
546 | initEAttribute(getInterferometryMission_ObservationTime(), ecorePackage.getEFloat(), "observationTime", "2.0", | ||
547 | 1, 1, InterferometryMission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, | ||
548 | IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
549 | 523 | ||
550 | initEClass(communicatingElementEClass, CommunicatingElement.class, "CommunicatingElement", IS_ABSTRACT, | 524 | initEClass(communicatingElementEClass, CommunicatingElement.class, "CommunicatingElement", IS_ABSTRACT, |
551 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 525 | !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
@@ -564,12 +538,9 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka | |||
564 | 538 | ||
565 | initEClass(commSubsystemEClass, CommSubsystem.class, "CommSubsystem", IS_ABSTRACT, !IS_INTERFACE, | 539 | initEClass(commSubsystemEClass, CommSubsystem.class, "CommSubsystem", IS_ABSTRACT, !IS_INTERFACE, |
566 | IS_GENERATED_INSTANCE_CLASS); | 540 | IS_GENERATED_INSTANCE_CLASS); |
567 | initEReference(getCommSubsystem_Target(), this.getCommSubsystem(), this.getCommSubsystem_Source(), "target", | 541 | initEReference(getCommSubsystem_Target(), this.getCommSubsystem(), null, "target", null, 0, 1, |
568 | null, 0, 1, CommSubsystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, | 542 | CommSubsystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, |
569 | IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 543 | !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
570 | initEReference(getCommSubsystem_Source(), this.getCommSubsystem(), this.getCommSubsystem_Target(), "source", | ||
571 | null, 0, -1, CommSubsystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, | ||
572 | IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
573 | 544 | ||
574 | initEClass(payloadEClass, Payload.class, "Payload", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 545 | initEClass(payloadEClass, Payload.class, "Payload", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
575 | 546 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/inputs/SatelliteInstance.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/inputs/SatelliteInstance.xmi index 7b8e355a..3d07a199 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/inputs/SatelliteInstance.xmi +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/inputs/SatelliteInstance.xmi | |||
@@ -4,11 +4,4 @@ | |||
4 | xmlns:xmi="http://www.omg.org/XMI" | 4 | xmlns:xmi="http://www.omg.org/XMI" |
5 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | 5 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
6 | xmlns:satellite="http://www.example.org/satellite" | 6 | xmlns:satellite="http://www.example.org/satellite" |
7 | xsi:schemaLocation="http://www.example.org/satellite ../model/satellite.ecore"> | 7 | xsi:schemaLocation="http://www.example.org/satellite ../model/satellite.ecore"/> |
8 | <groundStationNetwork> | ||
9 | <commSubsystem | ||
10 | xsi:type="satellite:XCommSubsystem"/> | ||
11 | <commSubsystem | ||
12 | xsi:type="satellite:KaCommSubsystem"/> | ||
13 | </groundStationNetwork> | ||
14 | </satellite:InterferometryMission> | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore index 1685c756..9f17d43c 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore | |||
@@ -5,12 +5,9 @@ | |||
5 | <eStructuralFeatures xsi:type="ecore:EReference" name="groundStationNetwork" lowerBound="1" | 5 | <eStructuralFeatures xsi:type="ecore:EReference" name="groundStationNetwork" lowerBound="1" |
6 | eType="#//GroundStationNetwork" containment="true"/> | 6 | eType="#//GroundStationNetwork" containment="true"/> |
7 | <eStructuralFeatures xsi:type="ecore:EReference" name="spacecraft" lowerBound="2" | 7 | <eStructuralFeatures xsi:type="ecore:EReference" name="spacecraft" lowerBound="2" |
8 | upperBound="50" eType="#//Spacecraft" containment="true"/> | 8 | upperBound="-1" eType="#//Spacecraft" containment="true"/> |
9 | </eClassifiers> | ||
10 | <eClassifiers xsi:type="ecore:EClass" name="InterferometryMission" eSuperTypes="#//ConstellationMission"> | ||
11 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="observationTime" lowerBound="1" | ||
12 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EFloat" defaultValueLiteral="2.0"/> | ||
13 | </eClassifiers> | 9 | </eClassifiers> |
10 | <eClassifiers xsi:type="ecore:EClass" name="InterferometryMission" eSuperTypes="#//ConstellationMission"/> | ||
14 | <eClassifiers xsi:type="ecore:EClass" name="CommunicatingElement" abstract="true"> | 11 | <eClassifiers xsi:type="ecore:EClass" name="CommunicatingElement" abstract="true"> |
15 | <eStructuralFeatures xsi:type="ecore:EReference" name="commSubsystem" lowerBound="1" | 12 | <eStructuralFeatures xsi:type="ecore:EReference" name="commSubsystem" lowerBound="1" |
16 | upperBound="2" eType="#//CommSubsystem" containment="true"/> | 13 | upperBound="2" eType="#//CommSubsystem" containment="true"/> |
@@ -21,10 +18,7 @@ | |||
21 | containment="true"/> | 18 | containment="true"/> |
22 | </eClassifiers> | 19 | </eClassifiers> |
23 | <eClassifiers xsi:type="ecore:EClass" name="CommSubsystem" abstract="true"> | 20 | <eClassifiers xsi:type="ecore:EClass" name="CommSubsystem" abstract="true"> |
24 | <eStructuralFeatures xsi:type="ecore:EReference" name="target" eType="#//CommSubsystem" | 21 | <eStructuralFeatures xsi:type="ecore:EReference" name="target" eType="#//CommSubsystem"/> |
25 | eOpposite="#//CommSubsystem/source"/> | ||
26 | <eStructuralFeatures xsi:type="ecore:EReference" name="source" upperBound="-1" | ||
27 | eType="#//CommSubsystem" eOpposite="#//CommSubsystem/target"/> | ||
28 | </eClassifiers> | 22 | </eClassifiers> |
29 | <eClassifiers xsi:type="ecore:EClass" name="Payload" abstract="true"/> | 23 | <eClassifiers xsi:type="ecore:EClass" name="Payload" abstract="true"/> |
30 | <eClassifiers xsi:type="ecore:EClass" name="InterferometryPayload" eSuperTypes="#//Payload"/> | 24 | <eClassifiers xsi:type="ecore:EClass" name="InterferometryPayload" eSuperTypes="#//Payload"/> |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel index 09b5f64c..bc98abd6 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel | |||
@@ -15,9 +15,7 @@ | |||
15 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//ConstellationMission/groundStationNetwork"/> | 15 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//ConstellationMission/groundStationNetwork"/> |
16 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//ConstellationMission/spacecraft"/> | 16 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//ConstellationMission/spacecraft"/> |
17 | </genClasses> | 17 | </genClasses> |
18 | <genClasses ecoreClass="satellite.ecore#//InterferometryMission"> | 18 | <genClasses ecoreClass="satellite.ecore#//InterferometryMission"/> |
19 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute satellite.ecore#//InterferometryMission/observationTime"/> | ||
20 | </genClasses> | ||
21 | <genClasses image="false" ecoreClass="satellite.ecore#//CommunicatingElement"> | 19 | <genClasses image="false" ecoreClass="satellite.ecore#//CommunicatingElement"> |
22 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//CommunicatingElement/commSubsystem"/> | 20 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//CommunicatingElement/commSubsystem"/> |
23 | </genClasses> | 21 | </genClasses> |
@@ -27,7 +25,6 @@ | |||
27 | </genClasses> | 25 | </genClasses> |
28 | <genClasses ecoreClass="satellite.ecore#//CommSubsystem"> | 26 | <genClasses ecoreClass="satellite.ecore#//CommSubsystem"> |
29 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference satellite.ecore#//CommSubsystem/target"/> | 27 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference satellite.ecore#//CommSubsystem/target"/> |
30 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference satellite.ecore#//CommSubsystem/source"/> | ||
31 | </genClasses> | 28 | </genClasses> |
32 | <genClasses image="false" ecoreClass="satellite.ecore#//Payload"/> | 29 | <genClasses image="false" ecoreClass="satellite.ecore#//Payload"/> |
33 | <genClasses ecoreClass="satellite.ecore#//InterferometryPayload"/> | 30 | <genClasses ecoreClass="satellite.ecore#//InterferometryPayload"/> |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin deleted file mode 100644 index 33059424..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <henshin:Module xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin" xmi:id="_4hnG4H9CEemiUoPdWqOlQg"> | ||
3 | <imports href="satellite.ecore#/"/> | ||
4 | <units xsi:type="henshin:Rule" xmi:id="_I7PyUH9EEemiUoPdWqOlQg" name="addCubeSat3U"> | ||
5 | <lhs xmi:id="_I7YVMH9EEemiUoPdWqOlQg" name="Lhs"> | ||
6 | <nodes xmi:id="_Qn3fwH9EEemiUoPdWqOlQg"> | ||
7 | <type href="satellite.ecore#//InterferometryMission"/> | ||
8 | </nodes> | ||
9 | </lhs> | ||
10 | <rhs xmi:id="_I9zXEH9EEemiUoPdWqOlQg" name="Rhs"> | ||
11 | <nodes xmi:id="_Qn4G0H9EEemiUoPdWqOlQg" outgoing="_W5hEAH9EEemiUoPdWqOlQg"> | ||
12 | <type href="satellite.ecore#//InterferometryMission"/> | ||
13 | </nodes> | ||
14 | <nodes xmi:id="_TD7SgH9EEemiUoPdWqOlQg" incoming="_W5hEAH9EEemiUoPdWqOlQg"> | ||
15 | <type href="satellite.ecore#//CubeSat3U"/> | ||
16 | </nodes> | ||
17 | <edges xmi:id="_W5hEAH9EEemiUoPdWqOlQg" source="_Qn4G0H9EEemiUoPdWqOlQg" target="_TD7SgH9EEemiUoPdWqOlQg"> | ||
18 | <type href="satellite.ecore#//ConstellationMission/spacecraft"/> | ||
19 | </edges> | ||
20 | </rhs> | ||
21 | <mappings xmi:id="_Qn4G0X9EEemiUoPdWqOlQg" origin="_Qn3fwH9EEemiUoPdWqOlQg" image="_Qn4G0H9EEemiUoPdWqOlQg"/> | ||
22 | </units> | ||
23 | <units xsi:type="henshin:Rule" xmi:id="_kgBHMH9KEemiUoPdWqOlQg" name="addCubeSat6U"> | ||
24 | <lhs xmi:id="_kgHN0H9KEemiUoPdWqOlQg" name="Lhs"> | ||
25 | <nodes xmi:id="_obHq0H9KEemiUoPdWqOlQg"> | ||
26 | <type href="satellite.ecore#//InterferometryMission"/> | ||
27 | </nodes> | ||
28 | </lhs> | ||
29 | <rhs xmi:id="_kgIb8H9KEemiUoPdWqOlQg" name="Rhs"> | ||
30 | <nodes xmi:id="_obIR4H9KEemiUoPdWqOlQg" outgoing="_skabcH9KEemiUoPdWqOlQg"> | ||
31 | <type href="satellite.ecore#//InterferometryMission"/> | ||
32 | </nodes> | ||
33 | <nodes xmi:id="_qHno4H9KEemiUoPdWqOlQg" incoming="_skabcH9KEemiUoPdWqOlQg"> | ||
34 | <type href="satellite.ecore#//CubeSat6U"/> | ||
35 | </nodes> | ||
36 | <edges xmi:id="_skabcH9KEemiUoPdWqOlQg" source="_obIR4H9KEemiUoPdWqOlQg" target="_qHno4H9KEemiUoPdWqOlQg"> | ||
37 | <type href="satellite.ecore#//ConstellationMission/spacecraft"/> | ||
38 | </edges> | ||
39 | </rhs> | ||
40 | <mappings xmi:id="_obIR4X9KEemiUoPdWqOlQg" origin="_obHq0H9KEemiUoPdWqOlQg" image="_obIR4H9KEemiUoPdWqOlQg"/> | ||
41 | </units> | ||
42 | <units xsi:type="henshin:Rule" xmi:id="_xFdIQH9LEemiUoPdWqOlQg" name="addSmallSat"> | ||
43 | <lhs xmi:id="_xFiAwH9LEemiUoPdWqOlQg" name="Lhs"> | ||
44 | <nodes xmi:id="_a7r_UH9MEemiUoPdWqOlQg"> | ||
45 | <type href="satellite.ecore#//InterferometryMission"/> | ||
46 | </nodes> | ||
47 | </lhs> | ||
48 | <rhs xmi:id="_xFjO4H9LEemiUoPdWqOlQg" name="Rhs"> | ||
49 | <nodes xmi:id="_a7w30H9MEemiUoPdWqOlQg" outgoing="_hORXsH9MEemiUoPdWqOlQg"> | ||
50 | <type href="satellite.ecore#//InterferometryMission"/> | ||
51 | </nodes> | ||
52 | <nodes xmi:id="_dt0vwH9MEemiUoPdWqOlQg" incoming="_hORXsH9MEemiUoPdWqOlQg"> | ||
53 | <type href="satellite.ecore#//SmallSat"/> | ||
54 | </nodes> | ||
55 | <edges xmi:id="_hORXsH9MEemiUoPdWqOlQg" source="_a7w30H9MEemiUoPdWqOlQg" target="_dt0vwH9MEemiUoPdWqOlQg"> | ||
56 | <type href="satellite.ecore#//ConstellationMission/spacecraft"/> | ||
57 | </edges> | ||
58 | </rhs> | ||
59 | <mappings xmi:id="_a7xe4H9MEemiUoPdWqOlQg" origin="_a7r_UH9MEemiUoPdWqOlQg" image="_a7w30H9MEemiUoPdWqOlQg"/> | ||
60 | </units> | ||
61 | </henshin:Module> | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin_diagram b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin_diagram deleted file mode 100644 index a5c675d8..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin_diagram +++ /dev/null | |||
@@ -1,131 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_4huboH9CEemiUoPdWqOlQg" type="Henshin" name="satellite.henshin_diagram" measurementUnit="Pixel"> | ||
3 | <children xmi:type="notation:Shape" xmi:id="_I7V48H9EEemiUoPdWqOlQg" type="2001" fontName="Noto Sans" italic="true" lineColor="0"> | ||
4 | <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Qn4G0n9EEemiUoPdWqOlQg" source="defaultAction"> | ||
5 | <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Qn4G039EEemiUoPdWqOlQg" key="value" value="preserve"/> | ||
6 | </eAnnotations> | ||
7 | <children xmi:type="notation:DecorationNode" xmi:id="_I7WgAH9EEemiUoPdWqOlQg" type="5001"/> | ||
8 | <children xmi:type="notation:DecorationNode" xmi:id="_I7WgAX9EEemiUoPdWqOlQg" type="7001"> | ||
9 | <children xmi:type="notation:Shape" xmi:id="_Qn5U8H9EEemiUoPdWqOlQg" type="3001" fontName="Noto Sans"> | ||
10 | <children xmi:type="notation:DecorationNode" xmi:id="_Qn58AH9EEemiUoPdWqOlQg" type="5002"/> | ||
11 | <children xmi:type="notation:DecorationNode" xmi:id="_Qn58AX9EEemiUoPdWqOlQg" type="5003"/> | ||
12 | <children xmi:type="notation:DecorationNode" xmi:id="_Qn58An9EEemiUoPdWqOlQg" type="7002"> | ||
13 | <styles xmi:type="notation:SortingStyle" xmi:id="_Qn58A39EEemiUoPdWqOlQg"/> | ||
14 | <styles xmi:type="notation:FilteringStyle" xmi:id="_Qn58BH9EEemiUoPdWqOlQg"/> | ||
15 | </children> | ||
16 | <element xmi:type="henshin:Node" href="satellite.henshin#_Qn3fwH9EEemiUoPdWqOlQg"/> | ||
17 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Qn5U8X9EEemiUoPdWqOlQg" x="11" y="6"/> | ||
18 | </children> | ||
19 | <children xmi:type="notation:Shape" xmi:id="_TD9HsH9EEemiUoPdWqOlQg" type="3001" fontName="Noto Sans"> | ||
20 | <children xmi:type="notation:DecorationNode" xmi:id="_TD9Hsn9EEemiUoPdWqOlQg" type="5002"/> | ||
21 | <children xmi:type="notation:DecorationNode" xmi:id="_TD9Hs39EEemiUoPdWqOlQg" type="5003"/> | ||
22 | <children xmi:type="notation:DecorationNode" xmi:id="_TD9HtH9EEemiUoPdWqOlQg" type="7002"> | ||
23 | <styles xmi:type="notation:SortingStyle" xmi:id="_TD9HtX9EEemiUoPdWqOlQg"/> | ||
24 | <styles xmi:type="notation:FilteringStyle" xmi:id="_TD9Htn9EEemiUoPdWqOlQg"/> | ||
25 | </children> | ||
26 | <element xmi:type="henshin:Node" href="satellite.henshin#_TD7SgH9EEemiUoPdWqOlQg"/> | ||
27 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TD9HsX9EEemiUoPdWqOlQg" x="43" y="113"/> | ||
28 | </children> | ||
29 | </children> | ||
30 | <element xmi:type="henshin:Rule" href="satellite.henshin#_I7PyUH9EEemiUoPdWqOlQg"/> | ||
31 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_I7V48X9EEemiUoPdWqOlQg" x="35" y="18" width="171"/> | ||
32 | </children> | ||
33 | <children xmi:type="notation:Shape" xmi:id="_kgGmwH9KEemiUoPdWqOlQg" type="2001" fontName="Noto Sans" italic="true" lineColor="0"> | ||
34 | <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_obIR4n9KEemiUoPdWqOlQg" source="defaultAction"> | ||
35 | <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_obI48H9KEemiUoPdWqOlQg" key="value" value="preserve"/> | ||
36 | </eAnnotations> | ||
37 | <children xmi:type="notation:DecorationNode" xmi:id="_kgGmwn9KEemiUoPdWqOlQg" type="5001"/> | ||
38 | <children xmi:type="notation:DecorationNode" xmi:id="_kgGmw39KEemiUoPdWqOlQg" type="7001"> | ||
39 | <children xmi:type="notation:Shape" xmi:id="_obKuIH9KEemiUoPdWqOlQg" type="3001" fontName="Noto Sans"> | ||
40 | <children xmi:type="notation:DecorationNode" xmi:id="_obLVMH9KEemiUoPdWqOlQg" type="5002"/> | ||
41 | <children xmi:type="notation:DecorationNode" xmi:id="_obLVMX9KEemiUoPdWqOlQg" type="5003"/> | ||
42 | <children xmi:type="notation:DecorationNode" xmi:id="_obLVMn9KEemiUoPdWqOlQg" type="7002"> | ||
43 | <styles xmi:type="notation:SortingStyle" xmi:id="_obLVM39KEemiUoPdWqOlQg"/> | ||
44 | <styles xmi:type="notation:FilteringStyle" xmi:id="_obLVNH9KEemiUoPdWqOlQg"/> | ||
45 | </children> | ||
46 | <element xmi:type="henshin:Node" href="satellite.henshin#_obHq0H9KEemiUoPdWqOlQg"/> | ||
47 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_obKuIX9KEemiUoPdWqOlQg" x="15" y="8"/> | ||
48 | </children> | ||
49 | <children xmi:type="notation:Shape" xmi:id="_qHpeEH9KEemiUoPdWqOlQg" type="3001" fontName="Noto Sans"> | ||
50 | <children xmi:type="notation:DecorationNode" xmi:id="_qHpeEn9KEemiUoPdWqOlQg" type="5002"/> | ||
51 | <children xmi:type="notation:DecorationNode" xmi:id="_qHpeE39KEemiUoPdWqOlQg" type="5003"/> | ||
52 | <children xmi:type="notation:DecorationNode" xmi:id="_qHpeFH9KEemiUoPdWqOlQg" type="7002"> | ||
53 | <styles xmi:type="notation:SortingStyle" xmi:id="_qHpeFX9KEemiUoPdWqOlQg"/> | ||
54 | <styles xmi:type="notation:FilteringStyle" xmi:id="_qHpeFn9KEemiUoPdWqOlQg"/> | ||
55 | </children> | ||
56 | <element xmi:type="henshin:Node" href="satellite.henshin#_qHno4H9KEemiUoPdWqOlQg"/> | ||
57 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qHpeEX9KEemiUoPdWqOlQg" x="42" y="109"/> | ||
58 | </children> | ||
59 | </children> | ||
60 | <element xmi:type="henshin:Rule" href="satellite.henshin#_kgBHMH9KEemiUoPdWqOlQg"/> | ||
61 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kgGmwX9KEemiUoPdWqOlQg" x="225" y="18" width="174"/> | ||
62 | </children> | ||
63 | <children xmi:type="notation:Shape" xmi:id="_xFhZsH9LEemiUoPdWqOlQg" type="2001" fontName="Noto Sans" italic="true" lineColor="0"> | ||
64 | <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_a7xe4X9MEemiUoPdWqOlQg" source="defaultAction"> | ||
65 | <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_a7xe4n9MEemiUoPdWqOlQg" key="value" value="preserve"/> | ||
66 | </eAnnotations> | ||
67 | <children xmi:type="notation:DecorationNode" xmi:id="_xFhZsn9LEemiUoPdWqOlQg" type="5001"/> | ||
68 | <children xmi:type="notation:DecorationNode" xmi:id="_xFhZs39LEemiUoPdWqOlQg" type="7001"> | ||
69 | <children xmi:type="notation:Shape" xmi:id="_a7z7IH9MEemiUoPdWqOlQg" type="3001" fontName="Noto Sans"> | ||
70 | <children xmi:type="notation:DecorationNode" xmi:id="_a7z7In9MEemiUoPdWqOlQg" type="5002"/> | ||
71 | <children xmi:type="notation:DecorationNode" xmi:id="_a7z7I39MEemiUoPdWqOlQg" type="5003"/> | ||
72 | <children xmi:type="notation:DecorationNode" xmi:id="_a7z7JH9MEemiUoPdWqOlQg" type="7002"> | ||
73 | <styles xmi:type="notation:SortingStyle" xmi:id="_a7z7JX9MEemiUoPdWqOlQg"/> | ||
74 | <styles xmi:type="notation:FilteringStyle" xmi:id="_a7z7Jn9MEemiUoPdWqOlQg"/> | ||
75 | </children> | ||
76 | <element xmi:type="henshin:Node" href="satellite.henshin#_a7r_UH9MEemiUoPdWqOlQg"/> | ||
77 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_a7z7IX9MEemiUoPdWqOlQg" x="12" y="8"/> | ||
78 | </children> | ||
79 | <children xmi:type="notation:Shape" xmi:id="_dt194H9MEemiUoPdWqOlQg" type="3001" fontName="Noto Sans"> | ||
80 | <children xmi:type="notation:DecorationNode" xmi:id="_dt194n9MEemiUoPdWqOlQg" type="5002"/> | ||
81 | <children xmi:type="notation:DecorationNode" xmi:id="_dt19439MEemiUoPdWqOlQg" type="5003"/> | ||
82 | <children xmi:type="notation:DecorationNode" xmi:id="_dt195H9MEemiUoPdWqOlQg" type="7002"> | ||
83 | <styles xmi:type="notation:SortingStyle" xmi:id="_dt195X9MEemiUoPdWqOlQg"/> | ||
84 | <styles xmi:type="notation:FilteringStyle" xmi:id="_dt195n9MEemiUoPdWqOlQg"/> | ||
85 | </children> | ||
86 | <element xmi:type="henshin:Node" href="satellite.henshin#_dt0vwH9MEemiUoPdWqOlQg"/> | ||
87 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dt194X9MEemiUoPdWqOlQg" x="37" y="111"/> | ||
88 | </children> | ||
89 | </children> | ||
90 | <element xmi:type="henshin:Rule" href="satellite.henshin#_xFdIQH9LEemiUoPdWqOlQg"/> | ||
91 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_xFhZsX9LEemiUoPdWqOlQg" x="418" y="18" width="172"/> | ||
92 | </children> | ||
93 | <styles xmi:type="notation:DiagramStyle" xmi:id="_4huboX9CEemiUoPdWqOlQg"/> | ||
94 | <element xmi:type="henshin:Module" href="satellite.henshin#_4hnG4H9CEemiUoPdWqOlQg"/> | ||
95 | <edges xmi:type="notation:Connector" xmi:id="_W5i5MH9EEemiUoPdWqOlQg" type="4001" source="_Qn5U8H9EEemiUoPdWqOlQg" target="_TD9HsH9EEemiUoPdWqOlQg"> | ||
96 | <children xmi:type="notation:DecorationNode" xmi:id="_W5i5M39EEemiUoPdWqOlQg" type="6001"> | ||
97 | <layoutConstraint xmi:type="notation:Location" xmi:id="_W5jgQH9EEemiUoPdWqOlQg" y="40"/> | ||
98 | </children> | ||
99 | <children xmi:type="notation:DecorationNode" xmi:id="_W5jgQX9EEemiUoPdWqOlQg" type="6002"> | ||
100 | <layoutConstraint xmi:type="notation:Location" xmi:id="_W5jgQn9EEemiUoPdWqOlQg" y="60"/> | ||
101 | </children> | ||
102 | <styles xmi:type="notation:FontStyle" xmi:id="_W5i5MX9EEemiUoPdWqOlQg" fontName="Noto Sans"/> | ||
103 | <element xmi:type="henshin:Edge" href="satellite.henshin#_W5hEAH9EEemiUoPdWqOlQg"/> | ||
104 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_W5i5Mn9EEemiUoPdWqOlQg" points="[2, 35, -1, -84]$[10, 96, 7, -23]"/> | ||
105 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_W5nKoH9EEemiUoPdWqOlQg" id="(0.48120300751879697,0.2391304347826087)"/> | ||
106 | </edges> | ||
107 | <edges xmi:type="notation:Connector" xmi:id="_skbpkH9KEemiUoPdWqOlQg" type="4001" source="_obKuIH9KEemiUoPdWqOlQg" target="_qHpeEH9KEemiUoPdWqOlQg"> | ||
108 | <children xmi:type="notation:DecorationNode" xmi:id="_skbpk39KEemiUoPdWqOlQg" type="6001"> | ||
109 | <layoutConstraint xmi:type="notation:Location" xmi:id="_skbplH9KEemiUoPdWqOlQg" y="40"/> | ||
110 | </children> | ||
111 | <children xmi:type="notation:DecorationNode" xmi:id="_skbplX9KEemiUoPdWqOlQg" type="6002"> | ||
112 | <layoutConstraint xmi:type="notation:Location" xmi:id="_skbpln9KEemiUoPdWqOlQg" y="60"/> | ||
113 | </children> | ||
114 | <styles xmi:type="notation:FontStyle" xmi:id="_skbpkX9KEemiUoPdWqOlQg" fontName="Noto Sans"/> | ||
115 | <element xmi:type="henshin:Edge" href="satellite.henshin#_skabcH9KEemiUoPdWqOlQg"/> | ||
116 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_skbpkn9KEemiUoPdWqOlQg" points="[-4, 23, 0, -66]$[-4, 78, 0, -11]"/> | ||
117 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_skc3sH9KEemiUoPdWqOlQg" id="(0.5,0.2391304347826087)"/> | ||
118 | </edges> | ||
119 | <edges xmi:type="notation:Connector" xmi:id="_hOR-wH9MEemiUoPdWqOlQg" type="4001" source="_a7z7IH9MEemiUoPdWqOlQg" target="_dt194H9MEemiUoPdWqOlQg"> | ||
120 | <children xmi:type="notation:DecorationNode" xmi:id="_hOSl0H9MEemiUoPdWqOlQg" type="6001"> | ||
121 | <layoutConstraint xmi:type="notation:Location" xmi:id="_hOSl0X9MEemiUoPdWqOlQg" y="40"/> | ||
122 | </children> | ||
123 | <children xmi:type="notation:DecorationNode" xmi:id="_hOSl0n9MEemiUoPdWqOlQg" type="6002"> | ||
124 | <layoutConstraint xmi:type="notation:Location" xmi:id="_hOSl039MEemiUoPdWqOlQg" y="60"/> | ||
125 | </children> | ||
126 | <styles xmi:type="notation:FontStyle" xmi:id="_hOR-wX9MEemiUoPdWqOlQg" fontName="Noto Sans"/> | ||
127 | <element xmi:type="henshin:Edge" href="satellite.henshin#_hORXsH9MEemiUoPdWqOlQg"/> | ||
128 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_hOR-wn9MEemiUoPdWqOlQg" points="[-5, 23, 0, -96]$[-4, 126, 1, 7]"/> | ||
129 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_hOVCEH9MEemiUoPdWqOlQg" id="(0.5454545454545454,0.8478260869565217)"/> | ||
130 | </edges> | ||
131 | </notation:Diagram> | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin deleted file mode 100644 index 224ced8f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <henshin:Module xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin" xmi:id="_4hnG4H9CEemiUoPdWqOlQg"> | ||
3 | <imports href="http://www.example.org/satellite#/"/> | ||
4 | <units xsi:type="henshin:Rule" xmi:id="_I7PyUH9EEemiUoPdWqOlQg" name="addCubeSat3U"> | ||
5 | <lhs xmi:id="_I7YVMH9EEemiUoPdWqOlQg" name="Lhs"> | ||
6 | <nodes xmi:id="_Qn3fwH9EEemiUoPdWqOlQg"> | ||
7 | <type href="http://www.example.org/satellite#//InterferometryMission"/> | ||
8 | </nodes> | ||
9 | </lhs> | ||
10 | <rhs xmi:id="_I9zXEH9EEemiUoPdWqOlQg" name="Rhs"> | ||
11 | <nodes xmi:id="_Qn4G0H9EEemiUoPdWqOlQg" outgoing="_W5hEAH9EEemiUoPdWqOlQg"> | ||
12 | <type href="http://www.example.org/satellite#//InterferometryMission"/> | ||
13 | </nodes> | ||
14 | <nodes xmi:id="_TD7SgH9EEemiUoPdWqOlQg" incoming="_W5hEAH9EEemiUoPdWqOlQg"> | ||
15 | <type href="http://www.example.org/satellite#//CubeSat3U"/> | ||
16 | </nodes> | ||
17 | <edges xmi:id="_W5hEAH9EEemiUoPdWqOlQg" source="_Qn4G0H9EEemiUoPdWqOlQg" target="_TD7SgH9EEemiUoPdWqOlQg"> | ||
18 | <type href="http://www.example.org/satellite#//ConstellationMission/spacecraft"/> | ||
19 | </edges> | ||
20 | </rhs> | ||
21 | <mappings xmi:id="_Qn4G0X9EEemiUoPdWqOlQg" origin="_Qn3fwH9EEemiUoPdWqOlQg" image="_Qn4G0H9EEemiUoPdWqOlQg"/> | ||
22 | </units> | ||
23 | <units xsi:type="henshin:Rule" xmi:id="_kgBHMH9KEemiUoPdWqOlQg" name="addCubeSat6U"> | ||
24 | <lhs xmi:id="_kgHN0H9KEemiUoPdWqOlQg" name="Lhs"> | ||
25 | <nodes xmi:id="_obHq0H9KEemiUoPdWqOlQg"> | ||
26 | <type href="http://www.example.org/satellite#//InterferometryMission"/> | ||
27 | </nodes> | ||
28 | </lhs> | ||
29 | <rhs xmi:id="_kgIb8H9KEemiUoPdWqOlQg" name="Rhs"> | ||
30 | <nodes xmi:id="_obIR4H9KEemiUoPdWqOlQg" outgoing="_skabcH9KEemiUoPdWqOlQg"> | ||
31 | <type href="http://www.example.org/satellite#//InterferometryMission"/> | ||
32 | </nodes> | ||
33 | <nodes xmi:id="_qHno4H9KEemiUoPdWqOlQg" incoming="_skabcH9KEemiUoPdWqOlQg"> | ||
34 | <type href="http://www.example.org/satellite#//CubeSat6U"/> | ||
35 | </nodes> | ||
36 | <edges xmi:id="_skabcH9KEemiUoPdWqOlQg" source="_obIR4H9KEemiUoPdWqOlQg" target="_qHno4H9KEemiUoPdWqOlQg"> | ||
37 | <type href="http://www.example.org/satellite#//ConstellationMission/spacecraft"/> | ||
38 | </edges> | ||
39 | </rhs> | ||
40 | <mappings xmi:id="_obIR4X9KEemiUoPdWqOlQg" origin="_obHq0H9KEemiUoPdWqOlQg" image="_obIR4H9KEemiUoPdWqOlQg"/> | ||
41 | </units> | ||
42 | <units xsi:type="henshin:Rule" xmi:id="_xFdIQH9LEemiUoPdWqOlQg" name="addSmallSat"> | ||
43 | <lhs xmi:id="_xFiAwH9LEemiUoPdWqOlQg" name="Lhs"> | ||
44 | <nodes xmi:id="_a7r_UH9MEemiUoPdWqOlQg"> | ||
45 | <type href="http://www.example.org/satellite#//InterferometryMission"/> | ||
46 | </nodes> | ||
47 | </lhs> | ||
48 | <rhs xmi:id="_xFjO4H9LEemiUoPdWqOlQg" name="Rhs"> | ||
49 | <nodes xmi:id="_a7w30H9MEemiUoPdWqOlQg" outgoing="_hORXsH9MEemiUoPdWqOlQg"> | ||
50 | <type href="http://www.example.org/satellite#//InterferometryMission"/> | ||
51 | </nodes> | ||
52 | <nodes xmi:id="_dt0vwH9MEemiUoPdWqOlQg" incoming="_hORXsH9MEemiUoPdWqOlQg"> | ||
53 | <type href="http://www.example.org/satellite#//SmallSat"/> | ||
54 | </nodes> | ||
55 | <edges xmi:id="_hORXsH9MEemiUoPdWqOlQg" source="_a7w30H9MEemiUoPdWqOlQg" target="_dt0vwH9MEemiUoPdWqOlQg"> | ||
56 | <type href="http://www.example.org/satellite#//ConstellationMission/spacecraft"/> | ||
57 | </edges> | ||
58 | </rhs> | ||
59 | <mappings xmi:id="_a7xe4H9MEemiUoPdWqOlQg" origin="_a7r_UH9MEemiUoPdWqOlQg" image="_a7w30H9MEemiUoPdWqOlQg"/> | ||
60 | </units> | ||
61 | </henshin:Module> | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml index a07867dc..b0b77996 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml | |||
@@ -8,6 +8,7 @@ | |||
8 | <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries" id="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries"> | 8 | <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries" id="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries"> |
9 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement"/> | 9 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement"/> |
10 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.transmittingGroundStationNetwork"/> | 10 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.transmittingGroundStationNetwork"/> |
11 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.roundStationNetworkUHF"/> | ||
11 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.notEnoughInterferometryPayloads"/> | 12 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.notEnoughInterferometryPayloads"/> |
12 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.noLinkToGroundStation"/> | 13 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.noLinkToGroundStation"/> |
13 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.noPotentialLinkToGroundStation"/> | 14 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.noPotentialLinkToGroundStation"/> |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/representations.aird b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/representations.aird new file mode 100644 index 00000000..efa8e366 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/representations.aird | |||
@@ -0,0 +1,2 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <viewpoint:DAnalysis xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" uid="_HbzhML6wEemt9IEpCgcgZA" version="14.1.0.201810161215"/> | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend deleted file mode 100644 index 43b2902f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo | ||
2 | |||
3 | //import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric | ||
4 | // | ||
5 | //class CostObjective extends MetricBasedGuidanceFunction { | ||
6 | // new() { | ||
7 | // super(CostMetric.instance) | ||
8 | // } | ||
9 | // | ||
10 | // override getName() { | ||
11 | // "Cost" | ||
12 | // } | ||
13 | //} | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.xtend deleted file mode 100644 index ee7f0060..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.xtend +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries | ||
4 | import java.util.WeakHashMap | ||
5 | import org.eclipse.emf.ecore.EObject | ||
6 | import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine | ||
7 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
8 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions | ||
9 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
10 | import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchHints | ||
11 | |||
12 | class LocalSearchEngineManager { | ||
13 | public static val INSTANCE = new LocalSearchEngineManager | ||
14 | |||
15 | val WeakHashMap<EObject, ViatraQueryEngine> engineMap = new WeakHashMap | ||
16 | |||
17 | private new() { | ||
18 | } | ||
19 | |||
20 | def getEngine(EObject eObject) { | ||
21 | engineMap.computeIfAbsent(eObject) [ | ||
22 | val scope = new EMFScope(it) | ||
23 | val localSearchHints = LocalSearchHints.^default.build | ||
24 | val options = ViatraQueryEngineOptions.defineOptions.withDefaultHint(localSearchHints).withDefaultBackend( | ||
25 | localSearchHints.queryBackendFactory).build | ||
26 | val engine = AdvancedViatraQueryEngine.on(scope, options) | ||
27 | SatelliteQueries.instance.prepare(engine) | ||
28 | engine | ||
29 | ] | ||
30 | } | ||
31 | } | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.xtend deleted file mode 100644 index 1529794f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.xtend +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo | ||
2 | |||
3 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
4 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | ||
5 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
6 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction | ||
7 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution | ||
8 | |||
9 | abstract class MetricBasedGuidanceFunction implements IGuidanceFunction { | ||
10 | val IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> querySpecification | ||
11 | |||
12 | protected new(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> querySpecification) { | ||
13 | this.querySpecification = querySpecification | ||
14 | if (querySpecification.parameters.size != 1) { | ||
15 | throw new IllegalArgumentException("Metric must have a single parameter") | ||
16 | } | ||
17 | } | ||
18 | |||
19 | override computeFitness(Solution model) { | ||
20 | val value = getMetricValue(model) | ||
21 | computeFitness(value) | ||
22 | } | ||
23 | |||
24 | protected def double computeFitness(double metricValue) { | ||
25 | metricValue | ||
26 | } | ||
27 | |||
28 | private def getMetricValue(Solution solution) { | ||
29 | val model = solution.model | ||
30 | val queryEngine = LocalSearchEngineManager.INSTANCE.getEngine(model) | ||
31 | val matcher = querySpecification.getMatcher(queryEngine) | ||
32 | val iterator = matcher.allMatches.iterator | ||
33 | if (!iterator.hasNext) { | ||
34 | throw new IllegalStateException("Too few matches") | ||
35 | } | ||
36 | val objectValue = iterator.next.get(0) | ||
37 | if (objectValue instanceof Number) { | ||
38 | val doubleValue = objectValue.doubleValue | ||
39 | if (iterator.hasNext) { | ||
40 | throw new IllegalStateException("Too many matches") | ||
41 | } | ||
42 | doubleValue | ||
43 | } else { | ||
44 | throw new IllegalStateException("Metric value must be a number") | ||
45 | } | ||
46 | } | ||
47 | } | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.xtend deleted file mode 100644 index b238e64f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.xtend +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo | ||
2 | |||
3 | import com.google.common.collect.ImmutableList | ||
4 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries | ||
5 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction | ||
6 | import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution | ||
7 | |||
8 | class PatternMatchConstraint implements IGuidanceFunction { | ||
9 | static val CONSTRAINT_ANNOTATION_NAME = "Constraint" | ||
10 | |||
11 | val queries = ImmutableList.copyOf(SatelliteQueries.instance.specifications.filter [ | ||
12 | allAnnotations.exists[name == CONSTRAINT_ANNOTATION_NAME] | ||
13 | ]) | ||
14 | |||
15 | override getName() { | ||
16 | "PatternMatch" | ||
17 | } | ||
18 | |||
19 | override computeFitness(Solution solution) { | ||
20 | val model = solution.model | ||
21 | val queryEngine = LocalSearchEngineManager.INSTANCE.getEngine(model) | ||
22 | var int matchCount = 0 | ||
23 | for (query : queries) { | ||
24 | val matcher = query.getMatcher(queryEngine) | ||
25 | matchCount += matcher.countMatches | ||
26 | } | ||
27 | matchCount | ||
28 | } | ||
29 | } | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend deleted file mode 100644 index 58034c43..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo | ||
2 | |||
3 | import java.io.BufferedReader | ||
4 | import java.io.BufferedWriter | ||
5 | import java.io.FileReader | ||
6 | import java.io.FileWriter | ||
7 | import java.util.Map | ||
8 | import org.eclipse.emf.ecore.EPackage | ||
9 | import org.eclipse.emf.ecore.resource.Resource | ||
10 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | ||
11 | import satellite.SatellitePackage | ||
12 | import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run | ||
13 | |||
14 | class SatelliteMdeOptimiserMain { | ||
15 | static val PROJECT_PATH = "." | ||
16 | static val MOPT_PATH = "src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt" | ||
17 | |||
18 | private new() { | ||
19 | new IllegalStateException("This is a static utility class and should not be instantiated directly.") | ||
20 | } | ||
21 | |||
22 | public static def void main(String[] args) { | ||
23 | Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, | ||
24 | new XMIResourceFactoryImpl) | ||
25 | EPackage.Registry.INSTANCE.put(SatellitePackage.eNS_URI, SatellitePackage.eINSTANCE) | ||
26 | fixupHenshinModel("model/satellite.henshin", "model/satellite_fixup.henshin", | ||
27 | #{"satellite.ecore" -> SatellitePackage.eNS_URI}) | ||
28 | Run.main(#["-p", PROJECT_PATH, "-m", MOPT_PATH]) | ||
29 | } | ||
30 | |||
31 | private def static void fixupHenshinModel(String originalPath, String outputPath, Map<String, String> remapMap) { | ||
32 | val reader = new BufferedReader(new FileReader(originalPath)) | ||
33 | try { | ||
34 | val writer = new BufferedWriter(new FileWriter(outputPath)) | ||
35 | try { | ||
36 | var String line | ||
37 | while ((line = reader.readLine) !== null) { | ||
38 | for (entry : remapMap.entrySet) { | ||
39 | line = line.replace(entry.key, entry.value) | ||
40 | } | ||
41 | writer.write(line) | ||
42 | writer.write("\n") | ||
43 | } | ||
44 | } finally { | ||
45 | writer.close | ||
46 | } | ||
47 | } finally { | ||
48 | reader.close | ||
49 | } | ||
50 | } | ||
51 | } | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt deleted file mode 100644 index e9bd1a64..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | problem { | ||
2 | basepath <model> | ||
3 | metamodel <satellite.SatellitePackage> | ||
4 | model <../inputs/SatelliteInstance.xmi> | ||
5 | } | ||
6 | |||
7 | goal { | ||
8 | objective Cost minimise java { "hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo.CostObjective" } | ||
9 | constraint PatternMatch java { "hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo.PatternMatchConstraint" } | ||
10 | } | ||
11 | |||
12 | search { | ||
13 | // mutate using <satellite_fixup.henshin> unit "addCubeSat3U" | ||
14 | mutate { "CubeSat3U" } | ||
15 | mutate { "CubeSat6U" } | ||
16 | mutate { "SmallSat" } | ||
17 | mutate { "InterferometryPayload" } | ||
18 | mutate { "UHFCommSubsystem" } | ||
19 | mutate { "XCommSubsystem" } | ||
20 | mutate { "KaCommSubsystem" } | ||
21 | } | ||
22 | |||
23 | solver { | ||
24 | optimisation provider moea algorithm NSGAII { | ||
25 | variation: mutation | ||
26 | population: 25 | ||
27 | mutation.step: 3 | ||
28 | mutation.strategy: random | ||
29 | } | ||
30 | |||
31 | termination { | ||
32 | time: 120 | ||
33 | } | ||
34 | |||
35 | batches 1 | ||
36 | } \ No newline at end of file | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql index c1d3f7d3..1f83a3b0 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql | |||
@@ -21,6 +21,13 @@ pattern transmittingGroundStationNetwork(Station : GroundStationNetwork) { | |||
21 | find transmittingCommSubsystem(Station, _); | 21 | find transmittingCommSubsystem(Station, _); |
22 | } | 22 | } |
23 | 23 | ||
24 | @Constraint(severity = "error", key = {Station}, | ||
25 | message = "The ground station network may not have UHF communication subsystems.") | ||
26 | pattern roundStationNetworkUHF(Station : GroundStationNetwork) { | ||
27 | CommunicatingElement.commSubsystem(Station, Comm); | ||
28 | UHFCommSubsystem(Comm); | ||
29 | } | ||
30 | |||
24 | // At least two spacecraft must have the interferometry payload configured | 31 | // At least two spacecraft must have the interferometry payload configured |
25 | 32 | ||
26 | @Constraint(severity = "error", key = {Mission}, | 33 | @Constraint(severity = "error", key = {Mission}, |
@@ -97,10 +104,6 @@ private pattern cubeSat3U(Sat : CubeSat3U) { | |||
97 | CubeSat3U(Sat); | 104 | CubeSat3U(Sat); |
98 | } | 105 | } |
99 | 106 | ||
100 | private pattern cubeSat6U(Sat : CubeSat6U) { | ||
101 | CubeSat6U(Sat); | ||
102 | } | ||
103 | |||
104 | // No communication loops may exist | 107 | // No communication loops may exist |
105 | // No spacecraft may directly communicate with itself | 108 | // No spacecraft may directly communicate with itself |
106 | 109 | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF index 81ee8677..2666dc5e 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF | |||
@@ -9,8 +9,7 @@ Bundle-Localization: plugin | |||
9 | Export-Package: hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm, | 9 | Export-Package: hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm, |
10 | hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.impl, | 10 | hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.impl, |
11 | hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.util, | 11 | hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.util, |
12 | hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu, | 12 | hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu |
13 | hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated | ||
14 | Require-Bundle: org.eclipse.viatra.query.runtime, | 13 | Require-Bundle: org.eclipse.viatra.query.runtime, |
15 | org.eclipse.core.runtime, | 14 | org.eclipse.core.runtime, |
16 | org.eclipse.emf.ecore;visibility:=reexport, | 15 | org.eclipse.emf.ecore;visibility:=reexport, |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml index 993ec75d..7bf4a20b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml | |||
@@ -9,6 +9,8 @@ | |||
9 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.noEntryInRegion"/> | 9 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.noEntryInRegion"/> |
10 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.multipleEntryInRegion"/> | 10 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.multipleEntryInRegion"/> |
11 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.transition"/> | 11 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.transition"/> |
12 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.transitionFrom"/> | ||
13 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.transitionTo"/> | ||
12 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.incomingToEntry"/> | 14 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.incomingToEntry"/> |
13 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.noOutgoingTransitionFromEntry"/> | 15 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.noOutgoingTransitionFromEntry"/> |
14 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.multipleTransitionFromEntry"/> | 16 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.multipleTransitionFromEntry"/> |
@@ -21,10 +23,14 @@ | |||
21 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.synchHasNoOutgoing"/> | 23 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.synchHasNoOutgoing"/> |
22 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.synchHasNoIncoming"/> | 24 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.synchHasNoIncoming"/> |
23 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.SynchronizedIncomingInSameRegion"/> | 25 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.SynchronizedIncomingInSameRegion"/> |
26 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.SynchronizedIncomingInSameRegionHelper1"/> | ||
27 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.SynchronizedIncomingInSameRegionHelper2"/> | ||
24 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.notSynchronizingStates"/> | 28 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.notSynchronizingStates"/> |
25 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.hasMultipleOutgoingTrainsition"/> | 29 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.hasMultipleOutgoingTrainsition"/> |
26 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.hasMultipleIncomingTrainsition"/> | 30 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.hasMultipleIncomingTrainsition"/> |
27 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.SynchronizedRegionsAreNotSiblings"/> | 31 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.SynchronizedRegionsAreNotSiblings"/> |
32 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.SynchronizedRegionsAreNotSiblingsHelper1"/> | ||
33 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.SynchronizedRegionsAreNotSiblingsHelper2"/> | ||
28 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.child"/> | 34 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.child"/> |
29 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.SynchronizedRegionDoesNotHaveMultipleRegions"/> | 35 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.SynchronizedRegionDoesNotHaveMultipleRegions"/> |
30 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.hasMultipleRegions"/> | 36 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.hasMultipleRegions"/> |
@@ -32,72 +38,4 @@ | |||
32 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.twoSynch"/> | 38 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.twoSynch"/> |
33 | </group> | 39 | </group> |
34 | </extension> | 40 | </extension> |
35 | <extension id="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.Mutated" point="org.eclipse.viatra.query.runtime.queryspecification"> | ||
36 | <group group="org.eclipse.viatra.query.runtime.extensibility.SingletonExtensionFactory:hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.Mutated" id="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.Mutated"> | ||
37 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.entryInRegion_M0"/> | ||
38 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.entryInRegion_M1"/> | ||
39 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.entryInRegion_M2"/> | ||
40 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M0"/> | ||
41 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M1"/> | ||
42 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M2"/> | ||
43 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M3"/> | ||
44 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M4"/> | ||
45 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noEntryInRegion_M5"/> | ||
46 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M0"/> | ||
47 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M1"/> | ||
48 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M2"/> | ||
49 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M3"/> | ||
50 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M4"/> | ||
51 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleEntryInRegion_M5"/> | ||
52 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.transition_M0"/> | ||
53 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.transition_M1"/> | ||
54 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.transition_M2"/> | ||
55 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.transition_M3"/> | ||
56 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.transition_M4"/> | ||
57 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_M0"/> | ||
58 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_1"/> | ||
59 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_2"/> | ||
60 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_3"/> | ||
61 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_4"/> | ||
62 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.incomingToEntry_5"/> | ||
63 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M0"/> | ||
64 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M1"/> | ||
65 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M2"/> | ||
66 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M3"/> | ||
67 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M4"/> | ||
68 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noOutgoingTransitionFromEntry_M5"/> | ||
69 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleTransitionFromEntry_M0"/> | ||
70 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleTransitionFromEntry_M1"/> | ||
71 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleTransitionFromEntry_M2"/> | ||
72 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleTransitionFromEntry_M3"/> | ||
73 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.multipleTransitionFromEntry_M4"/> | ||
74 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromExit_M0"/> | ||
75 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromExit_M1"/> | ||
76 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromExit_M2"/> | ||
77 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromFinal_M0"/> | ||
78 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromFinal_M1"/> | ||
79 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.outgoingFromFinal_M2"/> | ||
80 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noStateInRegion_M0"/> | ||
81 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noStateInRegion_M1"/> | ||
82 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noStateInRegion_M2"/> | ||
83 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.noStateInRegion_M3"/> | ||
84 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.StateInRegion_M0"/> | ||
85 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.StateInRegion_M1"/> | ||
86 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.StateInRegion_M2"/> | ||
87 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M0"/> | ||
88 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M1"/> | ||
89 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M2"/> | ||
90 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M3"/> | ||
91 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M4"/> | ||
92 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M5"/> | ||
93 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoOutgoing_M6"/> | ||
94 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M0"/> | ||
95 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M1"/> | ||
96 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M2"/> | ||
97 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M3"/> | ||
98 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M4"/> | ||
99 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M5"/> | ||
100 | <query-specification fqn="hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.choiceHasNoIncoming_M6"/> | ||
101 | </group> | ||
102 | </extension> | ||
103 | </plugin> | 41 | </plugin> |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/mutated/mutated.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/mutated/mutated.vql deleted file mode 100644 index 58f66fe2..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/mutated/mutated.vql +++ /dev/null | |||
@@ -1,270 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated | ||
2 | |||
3 | import epackage "hu.bme.mit.inf.yakindumm" | ||
4 | |||
5 | ///////// | ||
6 | // Entry | ||
7 | ///////// | ||
8 | |||
9 | pattern entryInRegion_M0(r1 : Region, e1 : Entry) { | ||
10 | Region.vertices(r1, e1); | ||
11 | } | ||
12 | pattern entryInRegion_M1(r1 : Region, e1) { | ||
13 | Region.vertices(r1, e1); | ||
14 | } | ||
15 | pattern entryInRegion_M2(r1 : Region, e1: Entry) { | ||
16 | // For positive constraint | ||
17 | Region(r1);Entry(e1); | ||
18 | } | ||
19 | |||
20 | |||
21 | //@Constraint(severity="error", message="error", key = {r1}) | ||
22 | pattern noEntryInRegion_M0(r1 : Region) { | ||
23 | neg find entryInRegion_M0(r1, _); | ||
24 | } | ||
25 | pattern noEntryInRegion_M1(r1 : Region) { | ||
26 | neg find entryInRegion_M1(r1, _); | ||
27 | } | ||
28 | pattern noEntryInRegion_M2(r1 : Region) { | ||
29 | neg find entryInRegion_M2(r1, _); | ||
30 | } | ||
31 | pattern noEntryInRegion_M3(r1 : Region) { | ||
32 | find entryInRegion_M0(r1, _); | ||
33 | } | ||
34 | pattern noEntryInRegion_M4(r1 : Region) { | ||
35 | find entryInRegion_M1(r1, _); | ||
36 | } | ||
37 | pattern noEntryInRegion_M5(r1 : Region) { | ||
38 | find entryInRegion_M2(r1, _); | ||
39 | } | ||
40 | |||
41 | //@Constraint(severity="error", message="error", key = {r}) | ||
42 | pattern multipleEntryInRegion_M0(r : Region) { | ||
43 | find entryInRegion_M0(r, e1); | ||
44 | find entryInRegion_M0(r, e2); | ||
45 | e1 != e2; | ||
46 | } | ||
47 | pattern multipleEntryInRegion_M1(r : Region) { | ||
48 | find entryInRegion_M1(r, e1); | ||
49 | find entryInRegion_M0(r, e2); | ||
50 | e1 != e2; | ||
51 | } | ||
52 | pattern multipleEntryInRegion_M2(r : Region) { | ||
53 | find entryInRegion_M2(r, e1); | ||
54 | find entryInRegion_M0(r, e2); | ||
55 | e1 != e2; | ||
56 | } | ||
57 | pattern multipleEntryInRegion_M3(r : Region) { | ||
58 | find entryInRegion_M0(r, e1); | ||
59 | find entryInRegion_M1(r, e2); | ||
60 | e1 != e2; | ||
61 | } | ||
62 | pattern multipleEntryInRegion_M4(r : Region) { | ||
63 | find entryInRegion_M2(r, e1); | ||
64 | find entryInRegion_M2(r, e2); | ||
65 | e1 != e2; | ||
66 | } | ||
67 | pattern multipleEntryInRegion_M5(r : Region) { | ||
68 | find entryInRegion_M0(r, e1); | ||
69 | find entryInRegion_M0(r, e2); | ||
70 | } | ||
71 | |||
72 | |||
73 | pattern transition_M0(t : Transition, src : Vertex, trg : Vertex) { | ||
74 | Transition.source(t, src); | ||
75 | Transition.target(t, trg); | ||
76 | } | ||
77 | pattern transition_M1(t : Transition, src : Vertex, trg : Vertex) { | ||
78 | Transition.source(t, src); | ||
79 | Vertex(trg); | ||
80 | } | ||
81 | pattern transition_M2(t : Transition, src : Vertex, trg : Vertex) { | ||
82 | Vertex(src); | ||
83 | Transition.target(t, trg); | ||
84 | } | ||
85 | pattern transition_M3(t : Transition, src : Vertex, trg : Vertex) { | ||
86 | Transition.source(t_x, src); | ||
87 | Transition.target(t, trg); | ||
88 | } | ||
89 | pattern transition_M4(t : Transition, src : Vertex, trg : Vertex) { | ||
90 | Transition.source(t, src); | ||
91 | Transition.target(t_x, trg); | ||
92 | } | ||
93 | |||
94 | //@Constraint(severity="error", message="error", key = {e}) | ||
95 | pattern incomingToEntry_M0(t : Transition, e : Entry) { | ||
96 | find transition_M0(t, _, e); | ||
97 | } | ||
98 | pattern incomingToEntry_1(t : Transition, e) { | ||
99 | find transition_M0(t, _, e); | ||
100 | } | ||
101 | pattern incomingToEntry_2(t : Transition, e : Entry) { | ||
102 | find transition_M1(t, _, e); | ||
103 | } | ||
104 | pattern incomingToEntry_3(t : Transition, e : Entry) { | ||
105 | find transition_M2(t, _, e); | ||
106 | } | ||
107 | pattern incomingToEntry_4(t : Transition, e : Entry) { | ||
108 | find transition_M3(t, _, e); | ||
109 | } | ||
110 | pattern incomingToEntry_5(t : Transition, e : Entry) { | ||
111 | find transition_M4(t, _, e); | ||
112 | } | ||
113 | |||
114 | pattern noOutgoingTransitionFromEntry_M0(e : Entry) { | ||
115 | neg find transition_M0(_, e, _); | ||
116 | } | ||
117 | |||
118 | pattern noOutgoingTransitionFromEntry_M1(e) { | ||
119 | Vertex(e); | ||
120 | neg find transition_M0(_, e, _); | ||
121 | } | ||
122 | pattern noOutgoingTransitionFromEntry_M2(e : Entry) { | ||
123 | neg find transition_M1(_, e, _); | ||
124 | } | ||
125 | pattern noOutgoingTransitionFromEntry_M3(e : Entry) { | ||
126 | neg find transition_M2(_, e, _); | ||
127 | } | ||
128 | pattern noOutgoingTransitionFromEntry_M4(e : Entry) { | ||
129 | neg find transition_M3(_, e, _); | ||
130 | } | ||
131 | pattern noOutgoingTransitionFromEntry_M5(e : Entry) { | ||
132 | neg find transition_M4(_, e, _); | ||
133 | } | ||
134 | |||
135 | |||
136 | //@Constraint(severity="error", message="error", key = {e}) | ||
137 | pattern multipleTransitionFromEntry_M0(e : Entry, t1 : Transition, t2: Transition) { | ||
138 | Entry.outgoingTransitions(e,t1); | ||
139 | Entry.outgoingTransitions(e,t2); | ||
140 | t1!=t2; | ||
141 | } | ||
142 | pattern multipleTransitionFromEntry_M1(e, t1 : Transition, t2: Transition) { | ||
143 | Entry.outgoingTransitions(e,t1); | ||
144 | Entry.outgoingTransitions(e,t2); | ||
145 | t1!=t2; | ||
146 | } | ||
147 | pattern multipleTransitionFromEntry_M2(e : Entry, t1 : Transition, t2: Transition) { | ||
148 | Transition(t1); | ||
149 | Entry.outgoingTransitions(e,t2); | ||
150 | t1!=t2; | ||
151 | } | ||
152 | pattern multipleTransitionFromEntry_M3(e : Entry, t1 : Transition, t2: Transition) { | ||
153 | Entry.outgoingTransitions(e,t1); | ||
154 | Transition(t2); | ||
155 | t1!=t2; | ||
156 | } | ||
157 | pattern multipleTransitionFromEntry_M4(e : Entry, t1 : Transition, t2: Transition) { | ||
158 | Entry.outgoingTransitions(e,t1); | ||
159 | Entry.outgoingTransitions(e,t2); | ||
160 | } | ||
161 | |||
162 | ///////// | ||
163 | // Exit | ||
164 | ///////// | ||
165 | |||
166 | //@Constraint(severity="error", message="error", key = {e}) | ||
167 | pattern outgoingFromExit_M0(t : Transition, e : Exit) { | ||
168 | Exit.outgoingTransitions(e,t); | ||
169 | } | ||
170 | pattern outgoingFromExit_M1(t : Transition, e) { | ||
171 | Vertex.outgoingTransitions(e,t); | ||
172 | } | ||
173 | pattern outgoingFromExit_M2(t : Transition, e : Exit) { | ||
174 | Transition(t); | ||
175 | Exit(e); | ||
176 | } | ||
177 | |||
178 | ///////// | ||
179 | // Final | ||
180 | ///////// | ||
181 | |||
182 | //@Constraint(severity="error", message="error", key = {f}) | ||
183 | pattern outgoingFromFinal_M0(t : Transition, f : FinalState) { | ||
184 | FinalState.outgoingTransitions(f,t); | ||
185 | } | ||
186 | pattern outgoingFromFinal_M1(t : Transition, f) { | ||
187 | Vertex.outgoingTransitions(f,t); | ||
188 | } | ||
189 | pattern outgoingFromFinal_M2(t : Transition, f : FinalState) { | ||
190 | Transition(t); | ||
191 | FinalState(f); | ||
192 | } | ||
193 | |||
194 | ///////// | ||
195 | // State vs Region | ||
196 | ///////// | ||
197 | |||
198 | //@Constraint(severity="error", message="error", key = {region}) | ||
199 | pattern noStateInRegion_M0(region: Region) { | ||
200 | neg find StateInRegion_M0(region,_); | ||
201 | } | ||
202 | pattern noStateInRegion_M1(region: Region) { | ||
203 | neg find StateInRegion_M1(region,_); | ||
204 | } | ||
205 | pattern noStateInRegion_M2(region: Region) { | ||
206 | neg find StateInRegion_M2(region,_); | ||
207 | } | ||
208 | pattern noStateInRegion_M3(region: Region) { | ||
209 | find StateInRegion_M0(region,_); | ||
210 | } | ||
211 | |||
212 | pattern StateInRegion_M0(region: Region, state: State) { | ||
213 | Region.vertices(region,state); | ||
214 | } | ||
215 | pattern StateInRegion_M1(region: Region, state) { | ||
216 | Region.vertices(region,state); | ||
217 | } | ||
218 | pattern StateInRegion_M2(region: Region, state:State) { | ||
219 | Region(region);State(state); | ||
220 | } | ||
221 | |||
222 | ///////// | ||
223 | // Choice | ||
224 | ///////// | ||
225 | |||
226 | @Constraint(severity="error", message="error", key = {c}) | ||
227 | pattern choiceHasNoOutgoing_M0(c : Choice) { | ||
228 | neg find transition_M0(_, c, _); | ||
229 | } | ||
230 | pattern choiceHasNoOutgoing_M1(c:Vertex) { | ||
231 | neg find transition_M0(_, c, _); | ||
232 | } | ||
233 | pattern choiceHasNoOutgoing_M2(c : Choice) { | ||
234 | neg find transition_M1(_, c, _); | ||
235 | } | ||
236 | pattern choiceHasNoOutgoing_M3(c : Choice) { | ||
237 | neg find transition_M2(_, c, _); | ||
238 | } | ||
239 | pattern choiceHasNoOutgoing_M4(c : Choice) { | ||
240 | neg find transition_M3(_, c, _); | ||
241 | } | ||
242 | pattern choiceHasNoOutgoing_M5(c : Choice) { | ||
243 | neg find transition_M4(_, c, _); | ||
244 | } | ||
245 | pattern choiceHasNoOutgoing_M6(c : Choice) { | ||
246 | find transition_M0(_, c, _); | ||
247 | } | ||
248 | |||
249 | @Constraint(severity="error", message="error", key = {c}) | ||
250 | pattern choiceHasNoIncoming_M0(c: Choice) { | ||
251 | neg find transition_M0(_, _, c); | ||
252 | } | ||
253 | pattern choiceHasNoIncoming_M1(c:Vertex) { | ||
254 | neg find transition_M0(_, _, c); | ||
255 | } | ||
256 | pattern choiceHasNoIncoming_M2(c: Choice) { | ||
257 | neg find transition_M1(_, _, c); | ||
258 | } | ||
259 | pattern choiceHasNoIncoming_M3(c: Choice) { | ||
260 | neg find transition_M2(_, _, c); | ||
261 | } | ||
262 | pattern choiceHasNoIncoming_M4(c: Choice) { | ||
263 | neg find transition_M3(_, _, c); | ||
264 | } | ||
265 | pattern choiceHasNoIncoming_M5(c: Choice) { | ||
266 | neg find transition_M4(_, _, c); | ||
267 | } | ||
268 | pattern choiceHasNoIncoming_M6(c: Choice) { | ||
269 | find transition_M0(_, _, c); | ||
270 | } | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql index f4bfa3c1..98a10cde 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql | |||
@@ -27,14 +27,22 @@ pattern transition(t : Transition, src : Vertex, trg : Vertex) { | |||
27 | Transition.target(t, trg); | 27 | Transition.target(t, trg); |
28 | } | 28 | } |
29 | 29 | ||
30 | pattern transitionFrom(t : Transition, src : Vertex) { | ||
31 | Transition.source(t, src); | ||
32 | } | ||
33 | |||
34 | pattern transitionTo(t : Transition, trg : Vertex) { | ||
35 | Transition.target(t, trg); | ||
36 | } | ||
37 | |||
30 | @Constraint(severity="error", message="error", key = {e}) | 38 | @Constraint(severity="error", message="error", key = {e}) |
31 | pattern incomingToEntry(t : Transition, e : Entry) { | 39 | pattern incomingToEntry(t : Transition, e : Entry) { |
32 | find transition(t, _, e); | 40 | find transitionTo(t, e); |
33 | } | 41 | } |
34 | 42 | ||
35 | @Constraint(severity="error", message="error", key = {e}) | 43 | @Constraint(severity="error", message="error", key = {e}) |
36 | pattern noOutgoingTransitionFromEntry(e : Entry) { | 44 | pattern noOutgoingTransitionFromEntry(e : Entry) { |
37 | neg find transition(_, e, _); | 45 | neg find transitionFrom(_, e); |
38 | } | 46 | } |
39 | 47 | ||
40 | @Constraint(severity="error", message="error", key = {e}) | 48 | @Constraint(severity="error", message="error", key = {e}) |
@@ -80,12 +88,12 @@ pattern StateInRegion(region: Region, state: State) { | |||
80 | 88 | ||
81 | @Constraint(severity="error", message="error", key = {c}) | 89 | @Constraint(severity="error", message="error", key = {c}) |
82 | pattern choiceHasNoOutgoing(c : Choice) { | 90 | pattern choiceHasNoOutgoing(c : Choice) { |
83 | neg find transition(_, c, _); | 91 | neg find transitionFrom(_, c); |
84 | } | 92 | } |
85 | 93 | ||
86 | @Constraint(severity="error", message="error", key = {c}) | 94 | @Constraint(severity="error", message="error", key = {c}) |
87 | pattern choiceHasNoIncoming(c: Choice) { | 95 | pattern choiceHasNoIncoming(c: Choice) { |
88 | neg find transition(_, _, c); | 96 | neg find transitionTo(_, c); |
89 | } | 97 | } |
90 | 98 | ||
91 | ///////// | 99 | ///////// |
@@ -94,27 +102,33 @@ pattern choiceHasNoIncoming(c: Choice) { | |||
94 | 102 | ||
95 | @Constraint(severity="error", message="error", key = {s}) | 103 | @Constraint(severity="error", message="error", key = {s}) |
96 | pattern synchHasNoOutgoing(s : Synchronization) { | 104 | pattern synchHasNoOutgoing(s : Synchronization) { |
97 | neg find transition(_, s, _); | 105 | neg find transitionFrom(_, s); |
98 | } | 106 | } |
99 | 107 | ||
100 | @Constraint(severity="error", message="error", key = {s}) | 108 | @Constraint(severity="error", message="error", key = {s}) |
101 | pattern synchHasNoIncoming(s : Synchronization) { | 109 | pattern synchHasNoIncoming(s : Synchronization) { |
102 | neg find transition(_, _, s); | 110 | neg find transitionTo(_, s); |
103 | } | 111 | } |
104 | 112 | ||
105 | @Constraint(severity="error", message="error", key = {s}) | 113 | @Constraint(severity="error", message="error", key = {s}) |
106 | pattern SynchronizedIncomingInSameRegion(s : Synchronization, v1 : Vertex, v2 : Vertex) { | 114 | pattern SynchronizedIncomingInSameRegion(s : Synchronization, t1 : Transition, t2 : Transition) { |
107 | find transition(t1, v1, s); | 115 | find SynchronizedIncomingInSameRegionHelper1(r, s, t1); |
108 | find transition(t2, v2, s); | 116 | find SynchronizedIncomingInSameRegionHelper1(r, s, t2); |
109 | t1!=t2; | 117 | t1!=t2; |
110 | Region.vertices(r, v1); | ||
111 | Region.vertices(r, v2); | ||
112 | } or { | 118 | } or { |
113 | find transition(t1, s, v1); | 119 | find SynchronizedIncomingInSameRegionHelper2(r, s, t1); |
114 | find transition(t2, s, v2); | 120 | find SynchronizedIncomingInSameRegionHelper2(r, s, t2); |
115 | t1!=t2; | 121 | t1!=t2; |
122 | } | ||
123 | |||
124 | pattern SynchronizedIncomingInSameRegionHelper1(r : Region, s : Synchronization, t1 : Transition) { | ||
125 | find transition(t1, v1, s); | ||
126 | Region.vertices(r, v1); | ||
127 | } | ||
128 | |||
129 | pattern SynchronizedIncomingInSameRegionHelper2(r : Region, s : Synchronization, t1 : Transition) { | ||
130 | find transition(t1, s, v1); | ||
116 | Region.vertices(r, v1); | 131 | Region.vertices(r, v1); |
117 | Region.vertices(r, v2); | ||
118 | } | 132 | } |
119 | 133 | ||
120 | @Constraint(severity="error", message="error", key = {s}) | 134 | @Constraint(severity="error", message="error", key = {s}) |
@@ -136,18 +150,24 @@ pattern hasMultipleIncomingTrainsition(v : Synchronization) { | |||
136 | } | 150 | } |
137 | 151 | ||
138 | @Constraint(severity="error", message="error", key = {s}) | 152 | @Constraint(severity="error", message="error", key = {s}) |
139 | pattern SynchronizedRegionsAreNotSiblings(s : Synchronization, v1 : Vertex, v2 : Vertex) { | 153 | pattern SynchronizedRegionsAreNotSiblings(s : Synchronization, r1 : CompositeElement, r2 : CompositeElement) { |
140 | find transition(_, v1, s); | 154 | find SynchronizedRegionsAreNotSiblingsHelper1(s, r1); |
141 | find transition(_, v2, s); | 155 | find SynchronizedRegionsAreNotSiblingsHelper1(s, r2); |
142 | CompositeElement.regions.vertices(r1, v1); | ||
143 | CompositeElement.regions.vertices(r2, v2); | ||
144 | r1 != r2; | 156 | r1 != r2; |
145 | } or { | 157 | } or { |
158 | find SynchronizedRegionsAreNotSiblingsHelper2(s, r1); | ||
159 | find SynchronizedRegionsAreNotSiblingsHelper2(s, r2); | ||
160 | r1 != r2; | ||
161 | } | ||
162 | |||
163 | pattern SynchronizedRegionsAreNotSiblingsHelper1(s : Synchronization, r1 : CompositeElement) { | ||
146 | find transition(_, s, v1); | 164 | find transition(_, s, v1); |
147 | find transition(_, s, v2); | ||
148 | CompositeElement.regions.vertices(r1, v1); | 165 | CompositeElement.regions.vertices(r1, v1); |
149 | CompositeElement.regions.vertices(r2, v2); | 166 | } |
150 | r1 != r2; | 167 | |
168 | pattern SynchronizedRegionsAreNotSiblingsHelper2(s : Synchronization, r1 : CompositeElement) { | ||
169 | find transition(_, v1, s); | ||
170 | CompositeElement.regions.vertices(r1, v1); | ||
151 | } | 171 | } |
152 | 172 | ||
153 | /////////////////////////////// | 173 | /////////////////////////////// |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend index 23632d4d..e45ec1c8 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend | |||
@@ -5,6 +5,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel | |||
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | 5 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem |
6 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery | 6 | import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery |
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.CbcPolyhedronSolver | 7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.CbcPolyhedronSolver |
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.MultiplicityGoalConstraintCalculator | 9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.MultiplicityGoalConstraintCalculator |
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronScopePropagator | 10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronScopePropagator |
10 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraintCalculator | 11 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraintCalculator |
@@ -46,16 +47,28 @@ class ModelGenerationStatistics { | |||
46 | public var long preliminaryTypeAnalisisTime = 0 | 47 | public var long preliminaryTypeAnalisisTime = 0 |
47 | 48 | ||
48 | public var int decisionsTried = 0 | 49 | public var int decisionsTried = 0 |
49 | 50 | ||
50 | synchronized def incrementDecisionCount() { | 51 | synchronized def incrementDecisionCount() { |
51 | decisionsTried++ | 52 | decisionsTried++ |
52 | } | 53 | } |
54 | |||
55 | public var int transformationInvocations | ||
53 | 56 | ||
57 | synchronized def incrementTransformationCount() { | ||
58 | transformationInvocations++ | ||
59 | } | ||
60 | |||
54 | public var int scopePropagatorInvocations | 61 | public var int scopePropagatorInvocations |
55 | 62 | ||
56 | synchronized def incrementScopePropagationCount() { | 63 | synchronized def incrementScopePropagationCount() { |
57 | scopePropagatorInvocations++ | 64 | scopePropagatorInvocations++ |
58 | } | 65 | } |
66 | |||
67 | public var int scopePropagatorSolverInvocations | ||
68 | |||
69 | synchronized def incrementScopePropagationSolverCount() { | ||
70 | scopePropagatorSolverInvocations++ | ||
71 | } | ||
59 | } | 72 | } |
60 | 73 | ||
61 | @Data class ModelGenerationMethod { | 74 | @Data class ModelGenerationMethod { |
@@ -93,6 +106,7 @@ class ModelGenerationMethodProvider { | |||
93 | boolean nameNewElements, | 106 | boolean nameNewElements, |
94 | TypeInferenceMethod typeInferenceMethod, | 107 | TypeInferenceMethod typeInferenceMethod, |
95 | ScopePropagatorStrategy scopePropagatorStrategy, | 108 | ScopePropagatorStrategy scopePropagatorStrategy, |
109 | Collection<LinearTypeConstraintHint> hints, | ||
96 | DocumentationLevel debugLevel | 110 | DocumentationLevel debugLevel |
97 | ) { | 111 | ) { |
98 | val statistics = new ModelGenerationStatistics | 112 | val statistics = new ModelGenerationStatistics |
@@ -103,8 +117,8 @@ class ModelGenerationMethodProvider { | |||
103 | 117 | ||
104 | val relationConstraints = relationConstraintCalculator.calculateRelationConstraints(logicProblem) | 118 | val relationConstraints = relationConstraintCalculator.calculateRelationConstraints(logicProblem) |
105 | val queries = patternProvider.generateQueries(logicProblem, emptySolution, statistics, existingQueries, | 119 | val queries = patternProvider.generateQueries(logicProblem, emptySolution, statistics, existingQueries, |
106 | workspace, typeInferenceMethod, scopePropagatorStrategy, relationConstraints, writeFiles) | 120 | workspace, typeInferenceMethod, scopePropagatorStrategy, relationConstraints, hints, writeFiles) |
107 | val scopePropagator = createScopePropagator(scopePropagatorStrategy, emptySolution, queries, statistics) | 121 | val scopePropagator = createScopePropagator(scopePropagatorStrategy, emptySolution, hints, queries, statistics) |
108 | scopePropagator.propagateAllScopeConstraints | 122 | scopePropagator.propagateAllScopeConstraints |
109 | val objectRefinementRules = refinementRuleProvider.createObjectRefinementRules(queries, scopePropagator, | 123 | val objectRefinementRules = refinementRuleProvider.createObjectRefinementRules(queries, scopePropagator, |
110 | nameNewElements, statistics) | 124 | nameNewElements, statistics) |
@@ -138,14 +152,20 @@ class ModelGenerationMethodProvider { | |||
138 | } | 152 | } |
139 | 153 | ||
140 | private def createScopePropagator(ScopePropagatorStrategy scopePropagatorStrategy, | 154 | private def createScopePropagator(ScopePropagatorStrategy scopePropagatorStrategy, |
141 | PartialInterpretation emptySolution, GeneratedPatterns queries, ModelGenerationStatistics statistics) { | 155 | PartialInterpretation emptySolution, Collection<LinearTypeConstraintHint> hints, GeneratedPatterns queries, |
156 | ModelGenerationStatistics statistics) { | ||
157 | if (!hints.empty && !(scopePropagatorStrategy instanceof ScopePropagatorStrategy.Polyhedral)) { | ||
158 | throw new IllegalArgumentException("Only the Polyhedral scope propagator strategy can use hints.") | ||
159 | } | ||
142 | switch (scopePropagatorStrategy) { | 160 | switch (scopePropagatorStrategy) { |
143 | case ScopePropagatorStrategy.Count: | 161 | case ScopePropagatorStrategy.None, |
162 | case ScopePropagatorStrategy.Basic: | ||
144 | new ScopePropagator(emptySolution, statistics) | 163 | new ScopePropagator(emptySolution, statistics) |
145 | case ScopePropagatorStrategy.BasicTypeHierarchy: | 164 | case ScopePropagatorStrategy.BasicTypeHierarchy: |
146 | new TypeHierarchyScopePropagator(emptySolution, statistics) | 165 | new TypeHierarchyScopePropagator(emptySolution, statistics) |
147 | ScopePropagatorStrategy.Polyhedral: { | 166 | ScopePropagatorStrategy.Polyhedral: { |
148 | val types = queries.refineObjectQueries.keySet.map[newType].toSet | 167 | val types = queries.refineObjectQueries.keySet.map[newType].toSet |
168 | val allPatternsByName = queries.allQueries.toMap[fullyQualifiedName] | ||
149 | val solver = switch (scopePropagatorStrategy.solver) { | 169 | val solver = switch (scopePropagatorStrategy.solver) { |
150 | case Z3Integer: | 170 | case Z3Integer: |
151 | new Z3PolyhedronSolver(false, scopePropagatorStrategy.timeoutSeconds) | 171 | new Z3PolyhedronSolver(false, scopePropagatorStrategy.timeoutSeconds) |
@@ -160,7 +180,8 @@ class ModelGenerationMethodProvider { | |||
160 | scopePropagatorStrategy.solver) | 180 | scopePropagatorStrategy.solver) |
161 | } | 181 | } |
162 | new PolyhedronScopePropagator(emptySolution, statistics, types, queries.multiplicityConstraintQueries, | 182 | new PolyhedronScopePropagator(emptySolution, statistics, types, queries.multiplicityConstraintQueries, |
163 | queries.hasElementInContainmentQuery, solver, scopePropagatorStrategy.requiresUpperBoundIndexing) | 183 | queries.hasElementInContainmentQuery, allPatternsByName, hints, solver, |
184 | scopePropagatorStrategy.requiresUpperBoundIndexing, scopePropagatorStrategy.updateHeuristic) | ||
164 | } | 185 | } |
165 | default: | 186 | default: |
166 | throw new IllegalArgumentException("Unknown scope propagator strategy: " + scopePropagatorStrategy) | 187 | throw new IllegalArgumentException("Unknown scope propagator strategy: " + scopePropagatorStrategy) |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend new file mode 100644 index 00000000..8c21ca1d --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend | |||
@@ -0,0 +1,30 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
6 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
7 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
8 | |||
9 | interface LinearTypeExpressionBuilderFactory { | ||
10 | def ViatraQueryMatcher<? extends IPatternMatch> createMatcher(String queryName) | ||
11 | |||
12 | def LinearTypeExpressionBuilder createBuilder() | ||
13 | } | ||
14 | |||
15 | interface LinearTypeExpressionBuilder { | ||
16 | def LinearTypeExpressionBuilder add(int scale, Type type) | ||
17 | |||
18 | def LinearBoundedExpression build() | ||
19 | } | ||
20 | |||
21 | @FunctionalInterface | ||
22 | interface RelationConstraintUpdater { | ||
23 | def void update(PartialInterpretation p) | ||
24 | } | ||
25 | |||
26 | interface LinearTypeConstraintHint { | ||
27 | def CharSequence getAdditionalPatterns(PatternGenerator patternGenerator) | ||
28 | |||
29 | def RelationConstraintUpdater createConstraintUpdater(LinearTypeExpressionBuilderFactory builderFactory) | ||
30 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagator.xtend index 7c05e818..51dba244 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagator.xtend | |||
@@ -1,5 +1,7 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality | 1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality |
2 | 2 | ||
3 | import com.google.common.cache.Cache | ||
4 | import com.google.common.cache.CacheBuilder | ||
3 | import com.google.common.collect.ImmutableList | 5 | import com.google.common.collect.ImmutableList |
4 | import com.google.common.collect.ImmutableMap | 6 | import com.google.common.collect.ImmutableMap |
5 | import com.google.common.collect.ImmutableSet | 7 | import com.google.common.collect.ImmutableSet |
@@ -15,6 +17,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par | |||
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope | 17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope |
16 | import java.util.ArrayDeque | 18 | import java.util.ArrayDeque |
17 | import java.util.ArrayList | 19 | import java.util.ArrayList |
20 | import java.util.Collection | ||
18 | import java.util.HashMap | 21 | import java.util.HashMap |
19 | import java.util.HashSet | 22 | import java.util.HashSet |
20 | import java.util.List | 23 | import java.util.List |
@@ -29,26 +32,33 @@ import org.eclipse.viatra.query.runtime.emf.EMFScope | |||
29 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor | 32 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor |
30 | 33 | ||
31 | class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | 34 | class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { |
35 | static val CACHE_SIZE = 10000 | ||
36 | |||
37 | val boolean updateHeuristic | ||
32 | val Map<Scope, LinearBoundedExpression> scopeBounds | 38 | val Map<Scope, LinearBoundedExpression> scopeBounds |
33 | val LinearBoundedExpression topLevelBounds | 39 | val LinearBoundedExpression topLevelBounds |
34 | val Polyhedron polyhedron | 40 | val Polyhedron polyhedron |
35 | val PolyhedronSaturationOperator operator | 41 | val PolyhedronSaturationOperator operator |
36 | val Set<Relation> relevantRelations | 42 | val Set<Relation> relevantRelations |
43 | val Cache<PolyhedronSignature, PolyhedronSignature> cache = CacheBuilder.newBuilder.maximumSize(CACHE_SIZE).build | ||
37 | List<RelationConstraintUpdater> updaters = emptyList | 44 | List<RelationConstraintUpdater> updaters = emptyList |
38 | 45 | ||
39 | new(PartialInterpretation p, ModelGenerationStatistics statistics, Set<? extends Type> possibleNewDynamicTypes, | 46 | new(PartialInterpretation p, ModelGenerationStatistics statistics, Set<? extends Type> possibleNewDynamicTypes, |
40 | Map<RelationMultiplicityConstraint, UnifinishedMultiplicityQueries> unfinishedMultiplicityQueries, | 47 | Map<RelationMultiplicityConstraint, UnifinishedMultiplicityQueries> unfinishedMultiplicityQueries, |
41 | IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> hasElementInContainmentQuery, | 48 | IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> hasElementInContainmentQuery, |
42 | PolyhedronSolver solver, boolean propagateRelations) { | 49 | Map<String, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> allPatternsByName, |
50 | Collection<LinearTypeConstraintHint> hints, PolyhedronSolver solver, boolean propagateRelations, | ||
51 | boolean updateHeuristic) { | ||
43 | super(p, statistics) | 52 | super(p, statistics) |
53 | this.updateHeuristic = updateHeuristic | ||
44 | val builder = new PolyhedronBuilder(p) | 54 | val builder = new PolyhedronBuilder(p) |
45 | builder.buildPolyhedron(possibleNewDynamicTypes) | 55 | builder.buildPolyhedron(possibleNewDynamicTypes) |
46 | scopeBounds = builder.scopeBounds | 56 | scopeBounds = builder.scopeBounds |
47 | topLevelBounds = builder.topLevelBounds | 57 | topLevelBounds = builder.topLevelBounds |
48 | polyhedron = builder.polyhedron | 58 | polyhedron = builder.polyhedron |
49 | operator = solver.createSaturationOperator(polyhedron) | 59 | operator = solver.createSaturationOperator(polyhedron) |
60 | propagateAllScopeConstraints() | ||
50 | if (propagateRelations) { | 61 | if (propagateRelations) { |
51 | propagateAllScopeConstraints() | ||
52 | val maximumNumberOfNewNodes = topLevelBounds.upperBound | 62 | val maximumNumberOfNewNodes = topLevelBounds.upperBound |
53 | if (maximumNumberOfNewNodes === null) { | 63 | if (maximumNumberOfNewNodes === null) { |
54 | throw new IllegalStateException("Could not determine maximum number of new nodes, it may be unbounded") | 64 | throw new IllegalStateException("Could not determine maximum number of new nodes, it may be unbounded") |
@@ -57,7 +67,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
57 | throw new IllegalStateException("Maximum number of new nodes is not positive") | 67 | throw new IllegalStateException("Maximum number of new nodes is not positive") |
58 | } | 68 | } |
59 | builder.buildMultiplicityConstraints(unfinishedMultiplicityQueries, hasElementInContainmentQuery, | 69 | builder.buildMultiplicityConstraints(unfinishedMultiplicityQueries, hasElementInContainmentQuery, |
60 | maximumNumberOfNewNodes) | 70 | allPatternsByName, hints, maximumNumberOfNewNodes) |
61 | relevantRelations = builder.relevantRelations | 71 | relevantRelations = builder.relevantRelations |
62 | updaters = builder.updaters | 72 | updaters = builder.updaters |
63 | } else { | 73 | } else { |
@@ -66,21 +76,40 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
66 | } | 76 | } |
67 | 77 | ||
68 | override void doPropagateAllScopeConstraints() { | 78 | override void doPropagateAllScopeConstraints() { |
79 | super.doPropagateAllScopeConstraints() | ||
69 | resetBounds() | 80 | resetBounds() |
70 | populatePolyhedronFromScope() | 81 | populatePolyhedronFromScope() |
71 | // println(polyhedron) | 82 | // println(polyhedron) |
72 | val result = operator.saturate() | 83 | val signature = polyhedron.createSignature |
73 | // println(polyhedron) | 84 | val cachedSignature = cache.getIfPresent(signature) |
74 | if (result == PolyhedronSaturationResult.EMPTY) { | 85 | switch (cachedSignature) { |
75 | setScopesInvalid() | 86 | case null: { |
76 | } else { | 87 | statistics.incrementScopePropagationSolverCount |
77 | populateScopesFromPolyhedron() | 88 | val result = operator.saturate() |
78 | if (result != PolyhedronSaturationResult.SATURATED) { | 89 | if (result == PolyhedronSaturationResult.EMPTY) { |
79 | super.propagateAllScopeConstraints() | 90 | cache.put(signature, PolyhedronSignature.EMPTY) |
91 | setScopesInvalid() | ||
92 | } else { | ||
93 | val resultSignature = polyhedron.createSignature | ||
94 | cache.put(signature, resultSignature) | ||
95 | populateScopesFromPolyhedron() | ||
96 | } | ||
80 | } | 97 | } |
98 | case PolyhedronSignature.EMPTY: | ||
99 | setScopesInvalid() | ||
100 | PolyhedronSignature.Bounds: { | ||
101 | polyhedron.applySignature(signature) | ||
102 | populateScopesFromPolyhedron() | ||
103 | } | ||
104 | default: | ||
105 | throw new IllegalStateException("Unknown polyhedron signature: " + signature) | ||
106 | } | ||
107 | // println(polyhedron) | ||
108 | if (updateHeuristic) { | ||
109 | copyScopeBoundsToHeuristic() | ||
81 | } | 110 | } |
82 | } | 111 | } |
83 | 112 | ||
84 | override propagateAdditionToRelation(Relation r) { | 113 | override propagateAdditionToRelation(Relation r) { |
85 | super.propagateAdditionToRelation(r) | 114 | super.propagateAdditionToRelation(r) |
86 | if (relevantRelations.contains(r)) { | 115 | if (relevantRelations.contains(r)) { |
@@ -186,7 +215,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
186 | } | 215 | } |
187 | 216 | ||
188 | @FinalFieldsConstructor | 217 | @FinalFieldsConstructor |
189 | private static class PolyhedronBuilder { | 218 | private static class PolyhedronBuilder implements LinearTypeExpressionBuilderFactory { |
190 | static val INFINITY_SCALE = 10 | 219 | static val INFINITY_SCALE = 10 |
191 | 220 | ||
192 | val PartialInterpretation p | 221 | val PartialInterpretation p |
@@ -197,6 +226,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
197 | Map<Type, LinearBoundedExpression> typeBounds | 226 | Map<Type, LinearBoundedExpression> typeBounds |
198 | int infinity | 227 | int infinity |
199 | ViatraQueryEngine queryEngine | 228 | ViatraQueryEngine queryEngine |
229 | Map<String, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> allPatternsByName | ||
200 | ImmutableList.Builder<RelationConstraintUpdater> updatersBuilder | 230 | ImmutableList.Builder<RelationConstraintUpdater> updatersBuilder |
201 | 231 | ||
202 | Map<Scope, LinearBoundedExpression> scopeBounds | 232 | Map<Scope, LinearBoundedExpression> scopeBounds |
@@ -222,9 +252,11 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
222 | def buildMultiplicityConstraints( | 252 | def buildMultiplicityConstraints( |
223 | Map<RelationMultiplicityConstraint, UnifinishedMultiplicityQueries> constraints, | 253 | Map<RelationMultiplicityConstraint, UnifinishedMultiplicityQueries> constraints, |
224 | IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> hasElementInContainmentQuery, | 254 | IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> hasElementInContainmentQuery, |
225 | int maximumNuberOfNewNodes) { | 255 | Map<String, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> allPatternsByName, |
256 | Collection<LinearTypeConstraintHint> hints, int maximumNuberOfNewNodes) { | ||
226 | infinity = maximumNuberOfNewNodes * INFINITY_SCALE | 257 | infinity = maximumNuberOfNewNodes * INFINITY_SCALE |
227 | queryEngine = ViatraQueryEngine.on(new EMFScope(p)) | 258 | queryEngine = ViatraQueryEngine.on(new EMFScope(p)) |
259 | this.allPatternsByName = allPatternsByName | ||
228 | updatersBuilder = ImmutableList.builder | 260 | updatersBuilder = ImmutableList.builder |
229 | val containmentConstraints = constraints.entrySet.filter[key.containment].groupBy[key.targetType] | 261 | val containmentConstraints = constraints.entrySet.filter[key.containment].groupBy[key.targetType] |
230 | for (pair : containmentConstraints.entrySet) { | 262 | for (pair : containmentConstraints.entrySet) { |
@@ -238,10 +270,13 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
238 | } | 270 | } |
239 | } | 271 | } |
240 | buildRelevantRelations(constraints.keySet) | 272 | buildRelevantRelations(constraints.keySet) |
273 | for (hint : hints) { | ||
274 | updatersBuilder.add(hint.createConstraintUpdater(this)) | ||
275 | } | ||
241 | updaters = updatersBuilder.build | 276 | updaters = updatersBuilder.build |
242 | addCachedConstraintsToPolyhedron() | 277 | addCachedConstraintsToPolyhedron() |
243 | } | 278 | } |
244 | 279 | ||
245 | private def buildRelevantRelations(Set<RelationMultiplicityConstraint> constraints) { | 280 | private def buildRelevantRelations(Set<RelationMultiplicityConstraint> constraints) { |
246 | val builder = ImmutableSet.builder | 281 | val builder = ImmutableSet.builder |
247 | for (constraint : constraints) { | 282 | for (constraint : constraints) { |
@@ -345,7 +380,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
345 | } | 380 | } |
346 | } | 381 | } |
347 | 382 | ||
348 | private def addCoefficients(Map<Dimension, Integer> accumulator, int scale, Map<Dimension, Integer> a) { | 383 | private static def addCoefficients(Map<Dimension, Integer> accumulator, int scale, Map<Dimension, Integer> a) { |
349 | for (pair : a.entrySet) { | 384 | for (pair : a.entrySet) { |
350 | val dimension = pair.key | 385 | val dimension = pair.key |
351 | val currentValue = accumulator.get(pair.key) ?: 0 | 386 | val currentValue = accumulator.get(pair.key) ?: 0 |
@@ -411,14 +446,41 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
411 | } | 446 | } |
412 | scopeBoundsBuilder.build | 447 | scopeBoundsBuilder.build |
413 | } | 448 | } |
449 | |||
450 | override createMatcher(String queryName) { | ||
451 | val querySpecification = allPatternsByName.get(queryName) | ||
452 | if (querySpecification === null) { | ||
453 | throw new IllegalArgumentException("Unknown pattern: " + queryName) | ||
454 | } | ||
455 | querySpecification.getMatcher(queryEngine) | ||
456 | } | ||
457 | |||
458 | override createBuilder() { | ||
459 | new PolyhedronBuilderLinearTypeExpressionBuilder(this) | ||
460 | } | ||
414 | } | 461 | } |
415 | 462 | ||
416 | private static interface RelationConstraintUpdater { | 463 | @FinalFieldsConstructor |
417 | def void update(PartialInterpretation p) | 464 | private static class PolyhedronBuilderLinearTypeExpressionBuilder implements LinearTypeExpressionBuilder { |
465 | val PolyhedronBuilder polyhedronBuilder | ||
466 | val Map<Dimension, Integer> coefficients = new HashMap | ||
467 | |||
468 | override add(int scale, Type type) { | ||
469 | val typeCoefficients = polyhedronBuilder.subtypeDimensions.get(type) | ||
470 | if (typeCoefficients === null) { | ||
471 | throw new IllegalArgumentException("Unknown type: " + type) | ||
472 | } | ||
473 | PolyhedronBuilder.addCoefficients(coefficients, scale, typeCoefficients) | ||
474 | this | ||
475 | } | ||
476 | |||
477 | override build() { | ||
478 | polyhedronBuilder.toExpression(coefficients) | ||
479 | } | ||
418 | } | 480 | } |
419 | 481 | ||
420 | @FinalFieldsConstructor | 482 | @FinalFieldsConstructor |
421 | static class ContainmentConstraintUpdater implements RelationConstraintUpdater { | 483 | private static class ContainmentConstraintUpdater implements RelationConstraintUpdater { |
422 | val String name | 484 | val String name |
423 | val LinearBoundedExpression orphansLowerBound | 485 | val LinearBoundedExpression orphansLowerBound |
424 | val LinearBoundedExpression orphansUpperBound | 486 | val LinearBoundedExpression orphansUpperBound |
@@ -460,7 +522,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
460 | } | 522 | } |
461 | 523 | ||
462 | @FinalFieldsConstructor | 524 | @FinalFieldsConstructor |
463 | static class ContainmentRootConstraintUpdater implements RelationConstraintUpdater { | 525 | private static class ContainmentRootConstraintUpdater implements RelationConstraintUpdater { |
464 | val LinearBoundedExpression typeCardinality | 526 | val LinearBoundedExpression typeCardinality |
465 | val ViatraQueryMatcher<? extends IPatternMatch> hasElementInContainmentMatcher | 527 | val ViatraQueryMatcher<? extends IPatternMatch> hasElementInContainmentMatcher |
466 | 528 | ||
@@ -479,7 +541,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
479 | } | 541 | } |
480 | 542 | ||
481 | @FinalFieldsConstructor | 543 | @FinalFieldsConstructor |
482 | static class UnfinishedMultiplicityConstraintUpdater implements RelationConstraintUpdater { | 544 | private static class UnfinishedMultiplicityConstraintUpdater implements RelationConstraintUpdater { |
483 | val String name | 545 | val String name |
484 | val LinearBoundedExpression availableMultiplicityExpression | 546 | val LinearBoundedExpression availableMultiplicityExpression |
485 | val ViatraQueryMatcher<? extends IPatternMatch> unfinishedMultiplicityMatcher | 547 | val ViatraQueryMatcher<? extends IPatternMatch> unfinishedMultiplicityMatcher |
@@ -500,7 +562,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { | |||
500 | } | 562 | } |
501 | 563 | ||
502 | @FinalFieldsConstructor | 564 | @FinalFieldsConstructor |
503 | static class UnrepairableMultiplicityConstraintUpdater implements RelationConstraintUpdater { | 565 | private static class UnrepairableMultiplicityConstraintUpdater implements RelationConstraintUpdater { |
504 | val String name | 566 | val String name |
505 | val LinearBoundedExpression targetCardinalityExpression | 567 | val LinearBoundedExpression targetCardinalityExpression |
506 | val ViatraQueryMatcher<? extends IPatternMatch> unrepairableMultiplicityMatcher | 568 | val ViatraQueryMatcher<? extends IPatternMatch> unrepairableMultiplicityMatcher |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronSolver.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronSolver.xtend index 9c6cb82e..4e046190 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronSolver.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronSolver.xtend | |||
@@ -3,6 +3,7 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality | |||
3 | import java.util.List | 3 | import java.util.List |
4 | import java.util.Map | 4 | import java.util.Map |
5 | import org.eclipse.xtend.lib.annotations.Accessors | 5 | import org.eclipse.xtend.lib.annotations.Accessors |
6 | import org.eclipse.xtend.lib.annotations.Data | ||
6 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor | 7 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor |
7 | 8 | ||
8 | interface PolyhedronSolver { | 9 | interface PolyhedronSolver { |
@@ -52,16 +53,66 @@ class Polyhedron { | |||
52 | val List<LinearBoundedExpression> expressionsToSaturate | 53 | val List<LinearBoundedExpression> expressionsToSaturate |
53 | 54 | ||
54 | override toString() ''' | 55 | override toString() ''' |
55 | Dimensions: | 56 | Dimensions: |
56 | «FOR dimension : dimensions» | 57 | «FOR dimension : dimensions» |
57 | «dimension» | 58 | «dimension» |
58 | «ENDFOR» | 59 | «ENDFOR» |
59 | Constraints: | 60 | Constraints: |
60 | «FOR constraint : constraints» | 61 | «FOR constraint : constraints» |
61 | «constraint» | 62 | «constraint» |
62 | «ENDFOR» | 63 | «ENDFOR» |
63 | ''' | 64 | ''' |
64 | 65 | ||
66 | def createSignature() { | ||
67 | val size = dimensions.size + constraints.size | ||
68 | val lowerBounds = newArrayOfSize(size) | ||
69 | val upperBounds = newArrayOfSize(size) | ||
70 | var int i = 0 | ||
71 | for (dimension : dimensions) { | ||
72 | lowerBounds.set(i, dimension.lowerBound) | ||
73 | upperBounds.set(i, dimension.upperBound) | ||
74 | i++ | ||
75 | } | ||
76 | for (constraint : constraints) { | ||
77 | lowerBounds.set(i, constraint.lowerBound) | ||
78 | upperBounds.set(i, constraint.upperBound) | ||
79 | i++ | ||
80 | } | ||
81 | new PolyhedronSignature.Bounds(lowerBounds, upperBounds) | ||
82 | } | ||
83 | |||
84 | def applySignature(PolyhedronSignature.Bounds signature) { | ||
85 | val lowerBounds = signature.lowerBounds | ||
86 | val upperBounds = signature.upperBounds | ||
87 | var int i = 0 | ||
88 | for (dimension : dimensions) { | ||
89 | dimension.lowerBound = lowerBounds.get(i) | ||
90 | dimension.upperBound = upperBounds.get(i) | ||
91 | i++ | ||
92 | } | ||
93 | for (constraint : constraints) { | ||
94 | constraint.lowerBound = lowerBounds.get(i) | ||
95 | constraint.upperBound = upperBounds.get(i) | ||
96 | i++ | ||
97 | } | ||
98 | } | ||
99 | } | ||
100 | |||
101 | abstract class PolyhedronSignature { | ||
102 | public static val EMPTY = new PolyhedronSignature { | ||
103 | override toString() { | ||
104 | "PolyhedronSignature.EMPTY" | ||
105 | } | ||
106 | } | ||
107 | |||
108 | private new() { | ||
109 | } | ||
110 | |||
111 | @Data | ||
112 | static class Bounds extends PolyhedronSignature { | ||
113 | val Integer[] lowerBounds | ||
114 | val Integer[] upperBounds | ||
115 | } | ||
65 | } | 116 | } |
66 | 117 | ||
67 | @Accessors | 118 | @Accessors |
@@ -80,6 +131,11 @@ abstract class LinearBoundedExpression { | |||
80 | upperBound = tighterBound | 131 | upperBound = tighterBound |
81 | } | 132 | } |
82 | } | 133 | } |
134 | |||
135 | def void assertEqualsTo(int bound) { | ||
136 | tightenLowerBound(bound) | ||
137 | tightenUpperBound(bound) | ||
138 | } | ||
83 | } | 139 | } |
84 | 140 | ||
85 | @Accessors | 141 | @Accessors |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/RelationConstraintCalculator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/RelationConstraintCalculator.xtend index 52a390a8..013e53e1 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/RelationConstraintCalculator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/RelationConstraintCalculator.xtend | |||
@@ -117,9 +117,12 @@ class RelationConstraintCalculator { | |||
117 | var inverseUpperMultiplicity = -1 | 117 | var inverseUpperMultiplicity = -1 |
118 | val inverseRelation = inverseRelations.get(relation) | 118 | val inverseRelation = inverseRelations.get(relation) |
119 | if (inverseRelation !== null) { | 119 | if (inverseRelation !== null) { |
120 | inverseUpperMultiplicity = upperMultiplicities.get(relation) | 120 | inverseUpperMultiplicity = upperMultiplicities.get(inverseRelation) |
121 | container = containmentRelations.contains(inverseRelation) | 121 | container = containmentRelations.contains(inverseRelation) |
122 | } | 122 | } |
123 | if (containment) { | ||
124 | inverseUpperMultiplicity = 1 | ||
125 | } | ||
123 | val constraint = new RelationMultiplicityConstraint(relation, inverseRelation, containment, container, | 126 | val constraint = new RelationMultiplicityConstraint(relation, inverseRelation, containment, container, |
124 | lowerMultiplicity, upperMultiplicity, inverseUpperMultiplicity) | 127 | lowerMultiplicity, upperMultiplicity, inverseUpperMultiplicity) |
125 | if (constraint.isActive) { | 128 | if (constraint.isActive) { |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend index 0bdb202e..2376fb38 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend | |||
@@ -14,7 +14,7 @@ import org.eclipse.xtend.lib.annotations.Accessors | |||
14 | 14 | ||
15 | class ScopePropagator { | 15 | class ScopePropagator { |
16 | @Accessors(PROTECTED_GETTER) val PartialInterpretation partialInterpretation | 16 | @Accessors(PROTECTED_GETTER) val PartialInterpretation partialInterpretation |
17 | val ModelGenerationStatistics statistics | 17 | @Accessors(PROTECTED_GETTER) val ModelGenerationStatistics statistics |
18 | val Map<PartialTypeInterpratation, Scope> type2Scope | 18 | val Map<PartialTypeInterpratation, Scope> type2Scope |
19 | @Accessors(PROTECTED_GETTER) val Map<Scope, Set<Scope>> superScopes | 19 | @Accessors(PROTECTED_GETTER) val Map<Scope, Set<Scope>> superScopes |
20 | @Accessors(PROTECTED_GETTER) val Map<Scope, Set<Scope>> subScopes | 20 | @Accessors(PROTECTED_GETTER) val Map<Scope, Set<Scope>> subScopes |
@@ -59,12 +59,21 @@ class ScopePropagator { | |||
59 | } | 59 | } |
60 | } | 60 | } |
61 | } while (changed) | 61 | } while (changed) |
62 | |||
63 | copyScopeBoundsToHeuristic() | ||
62 | } | 64 | } |
63 | 65 | ||
64 | def propagateAllScopeConstraints() { | 66 | def propagateAllScopeConstraints() { |
65 | statistics.incrementScopePropagationCount() | 67 | statistics.incrementScopePropagationCount() |
66 | doPropagateAllScopeConstraints() | 68 | doPropagateAllScopeConstraints() |
67 | } | 69 | } |
70 | |||
71 | protected def copyScopeBoundsToHeuristic() { | ||
72 | partialInterpretation.minNewElementsHeuristic = partialInterpretation.minNewElements | ||
73 | for (scope : partialInterpretation.scopes) { | ||
74 | scope.minNewElementsHeuristic = scope.minNewElements | ||
75 | } | ||
76 | } | ||
68 | 77 | ||
69 | protected def void doPropagateAllScopeConstraints() { | 78 | protected def void doPropagateAllScopeConstraints() { |
70 | // Nothing to propagate. | 79 | // Nothing to propagate. |
@@ -73,12 +82,17 @@ class ScopePropagator { | |||
73 | def propagateAdditionToType(PartialTypeInterpratation t) { | 82 | def propagateAdditionToType(PartialTypeInterpratation t) { |
74 | // println('''Adding to «(t as PartialComplexTypeInterpretation).interpretationOf.name»''') | 83 | // println('''Adding to «(t as PartialComplexTypeInterpretation).interpretationOf.name»''') |
75 | val targetScope = type2Scope.get(t) | 84 | val targetScope = type2Scope.get(t) |
76 | targetScope.removeOne | 85 | if (targetScope !== null) { |
77 | val sups = superScopes.get(targetScope) | 86 | targetScope.removeOne |
78 | sups.forEach[removeOne] | 87 | val sups = superScopes.get(targetScope) |
88 | sups.forEach[removeOne] | ||
89 | } | ||
79 | if (this.partialInterpretation.minNewElements > 0) { | 90 | if (this.partialInterpretation.minNewElements > 0) { |
80 | this.partialInterpretation.minNewElements = this.partialInterpretation.minNewElements - 1 | 91 | this.partialInterpretation.minNewElements = this.partialInterpretation.minNewElements - 1 |
81 | } | 92 | } |
93 | if (this.partialInterpretation.minNewElementsHeuristic > 0) { | ||
94 | this.partialInterpretation.minNewElementsHeuristic = this.partialInterpretation.minNewElementsHeuristic - 1 | ||
95 | } | ||
82 | if (this.partialInterpretation.maxNewElements > 0) { | 96 | if (this.partialInterpretation.maxNewElements > 0) { |
83 | this.partialInterpretation.maxNewElements = this.partialInterpretation.maxNewElements - 1 | 97 | this.partialInterpretation.maxNewElements = this.partialInterpretation.maxNewElements - 1 |
84 | } else if (this.partialInterpretation.maxNewElements === 0) { | 98 | } else if (this.partialInterpretation.maxNewElements === 0) { |
@@ -105,5 +119,8 @@ class ScopePropagator { | |||
105 | if (scope.minNewElements > 0) { | 119 | if (scope.minNewElements > 0) { |
106 | scope.minNewElements = scope.minNewElements - 1 | 120 | scope.minNewElements = scope.minNewElements - 1 |
107 | } | 121 | } |
122 | if (scope.minNewElementsHeuristic > 0) { | ||
123 | scope.minNewElementsHeuristic = scope.minNewElementsHeuristic - 1 | ||
124 | } | ||
108 | } | 125 | } |
109 | } | 126 | } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagatorStrategy.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagatorStrategy.xtend index b0ed75cb..3165917a 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagatorStrategy.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagatorStrategy.xtend | |||
@@ -16,7 +16,9 @@ enum PolyhedralScopePropagatorSolver { | |||
16 | } | 16 | } |
17 | 17 | ||
18 | abstract class ScopePropagatorStrategy { | 18 | abstract class ScopePropagatorStrategy { |
19 | public static val Count = new Simple("Count") | 19 | public static val None = new Simple("None") |
20 | |||
21 | public static val Basic = new Simple("Basic") | ||
20 | 22 | ||
21 | public static val BasicTypeHierarchy = new Simple("BasicTypeHierarchy") | 23 | public static val BasicTypeHierarchy = new Simple("BasicTypeHierarchy") |
22 | 24 | ||
@@ -47,14 +49,19 @@ abstract class ScopePropagatorStrategy { | |||
47 | 49 | ||
48 | val PolyhedralScopePropagatorConstraints constraints | 50 | val PolyhedralScopePropagatorConstraints constraints |
49 | val PolyhedralScopePropagatorSolver solver | 51 | val PolyhedralScopePropagatorSolver solver |
52 | val boolean updateHeuristic | ||
50 | val double timeoutSeconds | 53 | val double timeoutSeconds |
51 | 54 | ||
52 | @FinalFieldsConstructor | 55 | @FinalFieldsConstructor |
53 | new() { | 56 | new() { |
54 | } | 57 | } |
55 | 58 | ||
59 | new(PolyhedralScopePropagatorConstraints constraints, PolyhedralScopePropagatorSolver solver, boolean updateHeuristic) { | ||
60 | this(constraints, solver, updateHeuristic, UNLIMITED_TIME) | ||
61 | } | ||
62 | |||
56 | new(PolyhedralScopePropagatorConstraints constraints, PolyhedralScopePropagatorSolver solver) { | 63 | new(PolyhedralScopePropagatorConstraints constraints, PolyhedralScopePropagatorSolver solver) { |
57 | this(constraints, solver, UNLIMITED_TIME) | 64 | this(constraints, solver, true) |
58 | } | 65 | } |
59 | 66 | ||
60 | override requiresUpperBoundIndexing() { | 67 | override requiresUpperBoundIndexing() { |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/TypeHierarchyScopePropagator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/TypeHierarchyScopePropagator.xtend index be8ef00a..d1704b39 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/TypeHierarchyScopePropagator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/TypeHierarchyScopePropagator.xtend | |||
@@ -27,12 +27,16 @@ class TypeHierarchyScopePropagator extends ScopePropagator { | |||
27 | } | 27 | } |
28 | 28 | ||
29 | private def propagateLowerLimitUp(Scope subScope, Scope superScope) { | 29 | private def propagateLowerLimitUp(Scope subScope, Scope superScope) { |
30 | var changed = false | ||
30 | if (subScope.minNewElements > superScope.minNewElements) { | 31 | if (subScope.minNewElements > superScope.minNewElements) { |
31 | superScope.minNewElements = subScope.minNewElements | 32 | superScope.minNewElements = subScope.minNewElements |
32 | return true | 33 | changed = true |
33 | } else { | 34 | } |
34 | return false | 35 | if (subScope.minNewElementsHeuristic > superScope.minNewElementsHeuristic) { |
36 | superScope.minNewElementsHeuristic = subScope.minNewElementsHeuristic | ||
37 | changed = true | ||
35 | } | 38 | } |
39 | changed | ||
36 | } | 40 | } |
37 | 41 | ||
38 | private def propagateUpperLimitDown(Scope subScope, Scope superScope) { | 42 | private def propagateUpperLimitDown(Scope subScope, Scope superScope) { |
@@ -50,16 +54,20 @@ class TypeHierarchyScopePropagator extends ScopePropagator { | |||
50 | } | 54 | } |
51 | 55 | ||
52 | private def propagateLowerLimitUp(Scope subScope, PartialInterpretation p) { | 56 | private def propagateLowerLimitUp(Scope subScope, PartialInterpretation p) { |
57 | var changed = false | ||
53 | if (subScope.minNewElements > p.minNewElements) { | 58 | if (subScope.minNewElements > p.minNewElements) { |
54 | // println(''' | 59 | // println(''' |
55 | // «(subScope.targetTypeInterpretation as PartialComplexTypeInterpretation).interpretationOf.name» -> nodes | 60 | // «(subScope.targetTypeInterpretation as PartialComplexTypeInterpretation).interpretationOf.name» -> nodes |
56 | // p.minNewElements «p.minNewElements» = subScope.minNewElements «subScope.minNewElements» | 61 | // p.minNewElements «p.minNewElements» = subScope.minNewElements «subScope.minNewElements» |
57 | // ''') | 62 | // ''') |
58 | p.minNewElements = subScope.minNewElements | 63 | p.minNewElements = subScope.minNewElements |
59 | return true | 64 | changed = true |
60 | } else { | 65 | } |
61 | return false | 66 | if (subScope.minNewElementsHeuristic > p.minNewElementsHeuristic) { |
67 | p.minNewElementsHeuristic = subScope.minNewElementsHeuristic | ||
68 | changed = true | ||
62 | } | 69 | } |
70 | changed | ||
63 | } | 71 | } |
64 | 72 | ||
65 | private def propagateUpperLimitDown(Scope subScope, PartialInterpretation p) { | 73 | private def propagateUpperLimitDown(Scope subScope, PartialInterpretation p) { |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/Z3PolyhedronSolver.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/Z3PolyhedronSolver.xtend index 23444956..3b831433 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/Z3PolyhedronSolver.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/Z3PolyhedronSolver.xtend | |||
@@ -13,6 +13,7 @@ import java.math.BigDecimal | |||
13 | import java.math.MathContext | 13 | import java.math.MathContext |
14 | import java.math.RoundingMode | 14 | import java.math.RoundingMode |
15 | import java.util.Map | 15 | import java.util.Map |
16 | import org.eclipse.xtend.lib.annotations.Accessors | ||
16 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor | 17 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor |
17 | 18 | ||
18 | class Z3PolyhedronSolver implements PolyhedronSolver { | 19 | class Z3PolyhedronSolver implements PolyhedronSolver { |
@@ -28,10 +29,33 @@ class Z3PolyhedronSolver implements PolyhedronSolver { | |||
28 | } | 29 | } |
29 | 30 | ||
30 | override createSaturationOperator(Polyhedron polyhedron) { | 31 | override createSaturationOperator(Polyhedron polyhedron) { |
32 | new DisposingZ3SaturationOperator(this, polyhedron) | ||
33 | } | ||
34 | |||
35 | def createPersistentSaturationOperator(Polyhedron polyhedron) { | ||
31 | new Z3SaturationOperator(polyhedron, lpRelaxation, timeoutSeconds) | 36 | new Z3SaturationOperator(polyhedron, lpRelaxation, timeoutSeconds) |
32 | } | 37 | } |
33 | } | 38 | } |
34 | 39 | ||
40 | @FinalFieldsConstructor | ||
41 | class DisposingZ3SaturationOperator implements PolyhedronSaturationOperator { | ||
42 | val Z3PolyhedronSolver solver | ||
43 | @Accessors val Polyhedron polyhedron | ||
44 | |||
45 | override saturate() { | ||
46 | val persistentOperator = solver.createPersistentSaturationOperator(polyhedron) | ||
47 | try { | ||
48 | persistentOperator.saturate | ||
49 | } finally { | ||
50 | persistentOperator.close | ||
51 | } | ||
52 | } | ||
53 | |||
54 | override close() throws Exception { | ||
55 | // Nothing to close. | ||
56 | } | ||
57 | } | ||
58 | |||
35 | class Z3SaturationOperator extends AbstractPolyhedronSaturationOperator { | 59 | class Z3SaturationOperator extends AbstractPolyhedronSaturationOperator { |
36 | static val INFINITY_SYMBOL_NAME = "oo" | 60 | static val INFINITY_SYMBOL_NAME = "oo" |
37 | static val MULT_SYMBOL_NAME = "*" | 61 | static val MULT_SYMBOL_NAME = "*" |
@@ -106,9 +130,9 @@ class Z3SaturationOperator extends AbstractPolyhedronSaturationOperator { | |||
106 | IntNum: | 130 | IntNum: |
107 | resultExpr.getInt() | 131 | resultExpr.getInt() |
108 | RatNum: | 132 | RatNum: |
109 | floor(resultExpr) | 133 | ceil(resultExpr) |
110 | AlgebraicNum: | 134 | AlgebraicNum: |
111 | floor(resultExpr.toLower(ALGEBRAIC_NUMBER_ROUNDING)) | 135 | ceil(resultExpr.toUpper(ALGEBRAIC_NUMBER_ROUNDING)) |
112 | default: | 136 | default: |
113 | if (isNegativeInfinity(resultExpr)) { | 137 | if (isNegativeInfinity(resultExpr)) { |
114 | null | 138 | null |
@@ -136,9 +160,9 @@ class Z3SaturationOperator extends AbstractPolyhedronSaturationOperator { | |||
136 | IntNum: | 160 | IntNum: |
137 | resultExpr.getInt() | 161 | resultExpr.getInt() |
138 | RatNum: | 162 | RatNum: |
139 | ceil(resultExpr) | 163 | floor(resultExpr) |
140 | AlgebraicNum: | 164 | AlgebraicNum: |
141 | ceil(resultExpr.toUpper(ALGEBRAIC_NUMBER_ROUNDING)) | 165 | floor(resultExpr.toLower(ALGEBRAIC_NUMBER_ROUNDING)) |
142 | default: | 166 | default: |
143 | if (isPositiveInfinity(resultExpr)) { | 167 | if (isPositiveInfinity(resultExpr)) { |
144 | null | 168 | null |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend index 1b0db90e..5c35fb54 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend | |||
@@ -16,8 +16,11 @@ import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.Transform | |||
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | 16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality |
17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | 17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult |
18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod | 18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod |
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint | ||
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraints | 20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraints |
21 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy | ||
20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | 22 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation |
23 | import java.util.Collection | ||
21 | import java.util.HashMap | 24 | import java.util.HashMap |
22 | import java.util.Map | 25 | import java.util.Map |
23 | import org.eclipse.emf.ecore.EAttribute | 26 | import org.eclipse.emf.ecore.EAttribute |
@@ -26,7 +29,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | |||
26 | import org.eclipse.xtend.lib.annotations.Accessors | 29 | import org.eclipse.xtend.lib.annotations.Accessors |
27 | 30 | ||
28 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | 31 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* |
29 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy | ||
30 | 32 | ||
31 | class PatternGenerator { | 33 | class PatternGenerator { |
32 | @Accessors(PUBLIC_GETTER) val TypeIndexer typeIndexer // = new TypeIndexer(this) | 34 | @Accessors(PUBLIC_GETTER) val TypeIndexer typeIndexer // = new TypeIndexer(this) |
@@ -104,7 +106,9 @@ class PatternGenerator { | |||
104 | } | 106 | } |
105 | 107 | ||
106 | def isRepresentative(Relation relation, Relation inverse) { | 108 | def isRepresentative(Relation relation, Relation inverse) { |
107 | if (inverse === null) { | 109 | if (relation === null) { |
110 | return false | ||
111 | } else if (inverse === null) { | ||
108 | return true | 112 | return true |
109 | } else { | 113 | } else { |
110 | relation.name.compareTo(inverse.name) < 1 | 114 | relation.name.compareTo(inverse.name) < 1 |
@@ -144,7 +148,8 @@ class PatternGenerator { | |||
144 | PartialInterpretation emptySolution, | 148 | PartialInterpretation emptySolution, |
145 | Map<String, PQuery> fqn2PQuery, | 149 | Map<String, PQuery> fqn2PQuery, |
146 | TypeAnalysisResult typeAnalysisResult, | 150 | TypeAnalysisResult typeAnalysisResult, |
147 | RelationConstraints constraints | 151 | RelationConstraints constraints, |
152 | Collection<LinearTypeConstraintHint> hints | ||
148 | ) { | 153 | ) { |
149 | 154 | ||
150 | return ''' | 155 | return ''' |
@@ -294,6 +299,13 @@ class PatternGenerator { | |||
294 | // 4.3 Relation refinement | 299 | // 4.3 Relation refinement |
295 | ////////// | 300 | ////////// |
296 | «relationRefinementGenerator.generateRefineReference(problem)» | 301 | «relationRefinementGenerator.generateRefineReference(problem)» |
302 | |||
303 | ////////// | ||
304 | // 5 Hints | ||
305 | ////////// | ||
306 | «FOR hint : hints» | ||
307 | «hint.getAdditionalPatterns(this)» | ||
308 | «ENDFOR» | ||
297 | ''' | 309 | ''' |
298 | } | 310 | } |
299 | } | 311 | } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend index eadf0ae0..f5c85524 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend | |||
@@ -26,6 +26,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery | |||
26 | import org.eclipse.xtend.lib.annotations.Data | 26 | import org.eclipse.xtend.lib.annotations.Data |
27 | 27 | ||
28 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | 28 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* |
29 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint | ||
29 | 30 | ||
30 | @Data | 31 | @Data |
31 | class GeneratedPatterns { | 32 | class GeneratedPatterns { |
@@ -62,7 +63,8 @@ class PatternProvider { | |||
62 | 63 | ||
63 | def generateQueries(LogicProblem problem, PartialInterpretation emptySolution, ModelGenerationStatistics statistics, | 64 | def generateQueries(LogicProblem problem, PartialInterpretation emptySolution, ModelGenerationStatistics statistics, |
64 | Set<PQuery> existingQueries, ReasonerWorkspace workspace, TypeInferenceMethod typeInferenceMethod, | 65 | Set<PQuery> existingQueries, ReasonerWorkspace workspace, TypeInferenceMethod typeInferenceMethod, |
65 | ScopePropagatorStrategy scopePropagatorStrategy, RelationConstraints relationConstraints, boolean writeToFile) { | 66 | ScopePropagatorStrategy scopePropagatorStrategy, RelationConstraints relationConstraints, |
67 | Collection<LinearTypeConstraintHint> hints, boolean writeToFile) { | ||
66 | val fqn2Query = existingQueries.toMap[it.fullyQualifiedName] | 68 | val fqn2Query = existingQueries.toMap[it.fullyQualifiedName] |
67 | val PatternGenerator patternGenerator = new PatternGenerator(typeInferenceMethod, scopePropagatorStrategy) | 69 | val PatternGenerator patternGenerator = new PatternGenerator(typeInferenceMethod, scopePropagatorStrategy) |
68 | val typeAnalysisResult = if (patternGenerator.requiresTypeAnalysis) { | 70 | val typeAnalysisResult = if (patternGenerator.requiresTypeAnalysis) { |
@@ -75,7 +77,7 @@ class PatternProvider { | |||
75 | null | 77 | null |
76 | } | 78 | } |
77 | val baseIndexerFile = patternGenerator.transformBaseProperties(problem, emptySolution, fqn2Query, | 79 | val baseIndexerFile = patternGenerator.transformBaseProperties(problem, emptySolution, fqn2Query, |
78 | typeAnalysisResult, relationConstraints) | 80 | typeAnalysisResult, relationConstraints, hints) |
79 | if (writeToFile) { | 81 | if (writeToFile) { |
80 | workspace.writeText('''generated3valued.vql_deactivated''', baseIndexerFile) | 82 | workspace.writeText('''generated3valued.vql_deactivated''', baseIndexerFile) |
81 | } | 83 | } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend index fa73c861..d915d47e 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend | |||
@@ -44,7 +44,7 @@ class RelationRefinementGenerator { | |||
44 | 44 | ||
45 | def referRefinementQuery(RelationDeclaration relation, Relation inverseRelation, String relInterpretationName, | 45 | def referRefinementQuery(RelationDeclaration relation, Relation inverseRelation, String relInterpretationName, |
46 | String inverseInterpretationName, String sourceName, | 46 | String inverseInterpretationName, String sourceName, |
47 | String targetName) '''find «this.relationRefinementQueryName(relation,inverseRelation)»(problem, interpretation, «relInterpretationName», «IF inverseRelation !== null»inverseInterpretationName, «ENDIF»«sourceName», «targetName»);''' | 47 | String targetName) '''find «this.relationRefinementQueryName(relation,inverseRelation)»(problem, interpretation, «relInterpretationName», «IF inverseRelation !== null»«inverseInterpretationName», «ENDIF»«sourceName», «targetName»);''' |
48 | 48 | ||
49 | def getRefineRelationQueries(LogicProblem p) { | 49 | def getRefineRelationQueries(LogicProblem p) { |
50 | // val containmentRelations = p.containmentHierarchies.map[containmentRelations].flatten.toSet | 50 | // val containmentRelations = p.containmentHierarchies.map[containmentRelations].flatten.toSet |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend index 15b5a047..a8a07756 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend | |||
@@ -1,5 +1,6 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns | 1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns |
2 | 2 | ||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | 4 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem |
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | 5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality |
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationMultiplicityConstraint | 6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationMultiplicityConstraint |
@@ -76,21 +77,26 @@ class UnfinishedIndexer { | |||
76 | «IF indexUpperMultiplicities» | 77 | «IF indexUpperMultiplicities» |
77 | «IF constraint.constrainsUnrepairable || constraint.constrainsRemainingInverse» | 78 | «IF constraint.constrainsUnrepairable || constraint.constrainsRemainingInverse» |
78 | private pattern «repairMatchName(constraint)»(problem:LogicProblem, interpretation:PartialInterpretation, source:DefinedElement, target:DefinedElement) { | 79 | private pattern «repairMatchName(constraint)»(problem:LogicProblem, interpretation:PartialInterpretation, source:DefinedElement, target:DefinedElement) { |
79 | find interpretation(problem,interpretation); | 80 | «IF base.isRepresentative(constraint.relation, constraint.inverseRelation) && constraint.relation instanceof RelationDeclaration» |
80 | find mustExist(problem,interpretation,source); | 81 | «base.relationRefinementGenerator.referRefinementQuery(constraint.relation as RelationDeclaration, constraint.inverseRelation, "_", "_", "source", "target")» |
81 | «base.typeIndexer.referInstanceOf(constraint.sourceType,Modality::MUST,"source")» | 82 | «ELSE» |
82 | find mustExist(problem,interpretation,target); | 83 | «IF base.isRepresentative(constraint.inverseRelation, constraint.relation) && constraint.inverseRelation instanceof RelationDeclaration» |
83 | «base.typeIndexer.referInstanceOf(constraint.targetType,Modality::MUST,"target")» | 84 | «base.relationRefinementGenerator.referRefinementQuery(constraint.inverseRelation as RelationDeclaration, constraint.relation, "_", "_", "target", "source")» |
84 | neg «base.referRelation(constraint.relation,"source","target",Modality.MUST,fqn2PQuery)» | 85 | «ELSE» |
85 | «base.referRelation(constraint.relation,"source","target",Modality.MAY,fqn2PQuery)» | 86 | find interpretation(problem,interpretation); |
87 | find mustExist(problem,interpretation,source); | ||
88 | «base.typeIndexer.referInstanceOf(constraint.sourceType,Modality::MUST,"source")» | ||
89 | find mustExist(problem,interpretation,target); | ||
90 | «base.typeIndexer.referInstanceOf(constraint.targetType,Modality::MUST,"target")» | ||
91 | neg «base.referRelation(constraint.relation,"source","target",Modality.MUST,fqn2PQuery)» | ||
92 | «base.referRelation(constraint.relation,"source","target",Modality.MAY,fqn2PQuery)» | ||
93 | «ENDIF» | ||
94 | «ENDIF» | ||
86 | } | 95 | } |
87 | «ENDIF» | 96 | «ENDIF» |
88 | 97 | ||
89 | «IF constraint.constrainsUnrepairable» | 98 | «IF constraint.constrainsUnrepairable» |
90 | private pattern «unrepairableMultiplicityName(constraint)»_helper(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement, unrepairableMultiplicity:java Integer) { | 99 | private pattern «unrepairableMultiplicityName(constraint)»_helper(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement, unrepairableMultiplicity:java Integer) { |
91 | find interpretation(problem,interpretation); | ||
92 | find mustExist(problem,interpretation,object); | ||
93 | «base.typeIndexer.referInstanceOf(constraint.sourceType,Modality::MUST,"object")» | ||
94 | find «unfinishedMultiplicityName(constraint)»_helper(problem, interpretation, object, missingMultiplicity); | 100 | find «unfinishedMultiplicityName(constraint)»_helper(problem, interpretation, object, missingMultiplicity); |
95 | numberOfRepairMatches == count find «repairMatchName(constraint)»(problem, interpretation, object, _); | 101 | numberOfRepairMatches == count find «repairMatchName(constraint)»(problem, interpretation, object, _); |
96 | check(numberOfRepairMatches < missingMultiplicity); | 102 | check(numberOfRepairMatches < missingMultiplicity); |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend index bf816de9..7891ebd8 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend | |||
@@ -67,7 +67,8 @@ class RefinementRuleProvider { | |||
67 | if(containmentRelation != null) { | 67 | if(containmentRelation != null) { |
68 | if(inverseRelation!= null) { | 68 | if(inverseRelation!= null) { |
69 | ruleBuilder.action[match | | 69 | ruleBuilder.action[match | |
70 | //println(name) | 70 | statistics.incrementTransformationCount |
71 | // println(name) | ||
71 | val startTime = System.nanoTime | 72 | val startTime = System.nanoTime |
72 | //val problem = match.get(0) as LogicProblem | 73 | //val problem = match.get(0) as LogicProblem |
73 | val interpretation = match.get(1) as PartialInterpretation | 74 | val interpretation = match.get(1) as PartialInterpretation |
@@ -107,7 +108,8 @@ class RefinementRuleProvider { | |||
107 | ] | 108 | ] |
108 | } else { | 109 | } else { |
109 | ruleBuilder.action[match | | 110 | ruleBuilder.action[match | |
110 | //println(name) | 111 | statistics.incrementTransformationCount |
112 | // println(name) | ||
111 | val startTime = System.nanoTime | 113 | val startTime = System.nanoTime |
112 | //val problem = match.get(0) as LogicProblem | 114 | //val problem = match.get(0) as LogicProblem |
113 | val interpretation = match.get(1) as PartialInterpretation | 115 | val interpretation = match.get(1) as PartialInterpretation |
@@ -144,6 +146,9 @@ class RefinementRuleProvider { | |||
144 | } | 146 | } |
145 | } else { | 147 | } else { |
146 | ruleBuilder.action[match | | 148 | ruleBuilder.action[match | |
149 | statistics.incrementTransformationCount | ||
150 | // println(name) | ||
151 | |||
147 | val startTime = System.nanoTime | 152 | val startTime = System.nanoTime |
148 | //val problem = match.get(0) as LogicProblem | 153 | //val problem = match.get(0) as LogicProblem |
149 | val interpretation = match.get(1) as PartialInterpretation | 154 | val interpretation = match.get(1) as PartialInterpretation |
@@ -198,8 +203,9 @@ class RefinementRuleProvider { | |||
198 | .precondition(lhs) | 203 | .precondition(lhs) |
199 | if (inverseRelation == null) { | 204 | if (inverseRelation == null) { |
200 | ruleBuilder.action [ match | | 205 | ruleBuilder.action [ match | |
206 | statistics.incrementTransformationCount | ||
201 | val startTime = System.nanoTime | 207 | val startTime = System.nanoTime |
202 | //println(name) | 208 | // println(name) |
203 | // val problem = match.get(0) as LogicProblem | 209 | // val problem = match.get(0) as LogicProblem |
204 | // val interpretation = match.get(1) as PartialInterpretation | 210 | // val interpretation = match.get(1) as PartialInterpretation |
205 | val relationInterpretation = match.get(2) as PartialRelationInterpretation | 211 | val relationInterpretation = match.get(2) as PartialRelationInterpretation |
@@ -217,8 +223,9 @@ class RefinementRuleProvider { | |||
217 | ] | 223 | ] |
218 | } else { | 224 | } else { |
219 | ruleBuilder.action [ match | | 225 | ruleBuilder.action [ match | |
226 | statistics.incrementTransformationCount | ||
220 | val startTime = System.nanoTime | 227 | val startTime = System.nanoTime |
221 | //println(name) | 228 | // println(name) |
222 | // val problem = match.get(0) as LogicProblem | 229 | // val problem = match.get(0) as LogicProblem |
223 | // val interpretation = match.get(1) as PartialInterpretation | 230 | // val interpretation = match.get(1) as PartialInterpretation |
224 | val relationInterpretation = match.get(2) as PartialRelationInterpretation | 231 | val relationInterpretation = match.get(2) as PartialRelationInterpretation |
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/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 c7c1ad77..e4bdb086 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 | |||
@@ -60,6 +60,10 @@ import org.eclipse.xtend2.lib.StringConcatenationClient | |||
60 | return this.dataHash.hashCode | 60 | return this.dataHash.hashCode |
61 | } | 61 | } |
62 | 62 | ||
63 | override equals(Object other) { | ||
64 | other.class == LocalNodeDescriptor && (other as AbstractNodeDescriptor).hashCode == hashCode | ||
65 | } | ||
66 | |||
63 | override protected prettyPrint() { | 67 | override protected prettyPrint() { |
64 | '''(«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»]''' | 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»]''' |
65 | } | 69 | } |
@@ -143,6 +147,10 @@ import org.eclipse.xtend2.lib.StringConcatenationClient | |||
143 | return this.dataHash.hashCode | 147 | return this.dataHash.hashCode |
144 | } | 148 | } |
145 | 149 | ||
150 | override equals(Object other) { | ||
151 | other.class == FurtherNodeDescriptor && (other as AbstractNodeDescriptor).hashCode == hashCode | ||
152 | } | ||
153 | |||
146 | override prettyPrint() { | 154 | override prettyPrint() { |
147 | ''' | 155 | ''' |
148 | («dataHash»)[ | 156 | («dataHash»)[ |
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 index efc89803..c6e03f75 100644 --- 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 | |||
@@ -7,12 +7,12 @@ import org.eclipse.xtend.lib.annotations.Data | |||
7 | 7 | ||
8 | @Data | 8 | @Data |
9 | class NeighbourhoodOptions { | 9 | class NeighbourhoodOptions { |
10 | public static val FixPointRage = -1 | 10 | public static val FixPointRange = -1 |
11 | public static val GraphWidthRange = -2 | 11 | public static val GraphWidthRange = -2 |
12 | public static val FullParallels = Integer.MAX_VALUE | 12 | public static val FullParallels = Integer.MAX_VALUE |
13 | public static val MaxNumbers = Integer.MAX_VALUE | 13 | public static val MaxNumbers = Integer.MAX_VALUE |
14 | 14 | ||
15 | public static val DEFAULT = new NeighbourhoodOptions(GraphWidthRange, FullParallels, MaxNumbers, null, null) | 15 | public static val DEFAULT = new NeighbourhoodOptions(FixPointRange, FullParallels, MaxNumbers, null, null) |
16 | 16 | ||
17 | val int range | 17 | val int range |
18 | val int parallels | 18 | val int parallels |
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..ddf7d712 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 | |||
@@ -5,7 +5,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | |||
5 | 5 | ||
6 | class PartialInterpretation2Hash extends PartialInterpretation2NeighbourhoodRepresentation<Integer, Integer>{ | 6 | class PartialInterpretation2Hash extends PartialInterpretation2NeighbourhoodRepresentation<Integer, Integer>{ |
7 | 7 | ||
8 | protected new() { | 8 | new() { |
9 | super(false, true) | 9 | super(false, true) |
10 | } | 10 | } |
11 | 11 | ||
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 a0382e8e..3048167e 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 | |||
@@ -25,7 +25,7 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresenta | |||
25 | this.mergeSimilarNeighbourhood = mergeSimilarNeighbourhood | 25 | this.mergeSimilarNeighbourhood = mergeSimilarNeighbourhood |
26 | } | 26 | } |
27 | 27 | ||
28 | public static val FixPointRage = NeighbourhoodOptions.FixPointRage | 28 | public static val FixPointRange = NeighbourhoodOptions.FixPointRange |
29 | public static val GraphWidthRange = NeighbourhoodOptions.GraphWidthRange | 29 | public static val GraphWidthRange = NeighbourhoodOptions.GraphWidthRange |
30 | public static val FullParallels = NeighbourhoodOptions.FullParallels | 30 | public static val FullParallels = NeighbourhoodOptions.FullParallels |
31 | public static val MaxNumbers = NeighbourhoodOptions.MaxNumbers | 31 | public static val MaxNumbers = NeighbourhoodOptions.MaxNumbers |
@@ -174,7 +174,7 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresenta | |||
174 | throw new IllegalArgumentException('''Need previous representations''') | 174 | throw new IllegalArgumentException('''Need previous representations''') |
175 | } else | 175 | } else |
176 | return res | 176 | return res |
177 | } else if (range == FixPointRage) { | 177 | } else if (range == FixPointRange) { |
178 | return refineUntilFixpoint(model, types, IncomingRelations, OutgoingRelations, parallels, maxNumber, | 178 | return refineUntilFixpoint(model, types, IncomingRelations, OutgoingRelations, parallels, maxNumber, |
179 | focusedElement) | 179 | focusedElement) |
180 | } else if (range == GraphWidthRange) { | 180 | } else if (range == GraphWidthRange) { |
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 4ff39999..5e442ca7 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,9 +1,10 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder | 1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder |
2 | 2 | ||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | 3 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement |
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.AbstractNodeDescriptor | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodOptions | 4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodOptions |
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2Hash | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice | 6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice |
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2NeighbourhoodRepresentation | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | 8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation |
8 | import java.util.ArrayList | 9 | import java.util.ArrayList |
9 | import java.util.Map | 10 | import java.util.Map |
@@ -18,21 +19,33 @@ class NeighbourhoodBasedStateCoderFactory extends AbstractNeighbourhoodBasedStat | |||
18 | } | 19 | } |
19 | 20 | ||
20 | override protected doCreateStateCoder(NeighbourhoodOptions options) { | 21 | override protected doCreateStateCoder(NeighbourhoodOptions options) { |
21 | new NeighbourhoodBasedPartialInterpretationStateCoder(options) | 22 | new NeighbourhoodBasedPartialInterpretationStateCoder(new PartialInterpretation2ImmutableTypeLattice, options) |
22 | } | 23 | } |
23 | |||
24 | } | 24 | } |
25 | 25 | ||
26 | class NeighbourhoodBasedPartialInterpretationStateCoder extends AbstractNeighbourhoodBasedPartialInterpretationStateCoder { | 26 | class NeighbourhoodBasedHashStateCoderFactory extends AbstractNeighbourhoodBasedStateCoderFactory { |
27 | val calculator = new PartialInterpretation2ImmutableTypeLattice | 27 | new() { |
28 | 28 | } | |
29 | var Map<DefinedElement, ? extends AbstractNodeDescriptor> nodeRepresentations = null | ||
30 | var Map<? extends AbstractNodeDescriptor, Integer> modelRepresentation = null | ||
31 | 29 | ||
32 | new(NeighbourhoodOptions options) { | 30 | new(NeighbourhoodOptions options) { |
33 | super(options) | 31 | super(options) |
34 | } | 32 | } |
35 | 33 | ||
34 | override protected doCreateStateCoder(NeighbourhoodOptions options) { | ||
35 | new NeighbourhoodBasedPartialInterpretationStateCoder(new PartialInterpretation2Hash, options) | ||
36 | } | ||
37 | } | ||
38 | |||
39 | class NeighbourhoodBasedPartialInterpretationStateCoder<ModelRep, NodeRep> extends AbstractNeighbourhoodBasedPartialInterpretationStateCoder { | ||
40 | val PartialInterpretation2NeighbourhoodRepresentation<ModelRep, NodeRep> calculator | ||
41 | var Map<DefinedElement, ? extends NodeRep> nodeRepresentations = null | ||
42 | var ModelRep modelRepresentation = null | ||
43 | |||
44 | new(PartialInterpretation2NeighbourhoodRepresentation<ModelRep, NodeRep> calculator, NeighbourhoodOptions options) { | ||
45 | super(options) | ||
46 | this.calculator = calculator | ||
47 | } | ||
48 | |||
36 | override protected isRefreshNeeded() { | 49 | override protected isRefreshNeeded() { |
37 | nodeRepresentations === null || modelRepresentation === null | 50 | nodeRepresentations === null || modelRepresentation === null |
38 | } | 51 | } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend index 1abde0a8..aa02cd30 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend | |||
@@ -12,12 +12,15 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage | |||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicresultFactory | 12 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicresultFactory |
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult | 13 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult |
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider | 14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider |
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy | ||
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.PartialInterpretationInitialiser | 16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.PartialInterpretationInitialiser |
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | 17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation |
17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage | 18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage |
18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.AbstractNeighbourhoodBasedStateCoderFactory | 19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.AbstractNeighbourhoodBasedStateCoderFactory |
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.IdentifierBasedStateCoderFactory | 20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.IdentifierBasedStateCoderFactory |
21 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.NeighbourhoodBasedHashStateCoderFactory | ||
20 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.PairwiseNeighbourhoodBasedStateCoderFactory | 22 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.PairwiseNeighbourhoodBasedStateCoderFactory |
23 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BasicScopeGlobalConstraint | ||
21 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BestFirstStrategyForModelGeneration | 24 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BestFirstStrategyForModelGeneration |
22 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.DiversityChecker | 25 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.DiversityChecker |
23 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.InconsistentScopeGlobalConstraint | 26 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.InconsistentScopeGlobalConstraint |
@@ -39,7 +42,6 @@ import org.eclipse.viatra.dse.api.DesignSpaceExplorer | |||
39 | import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel | 42 | import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel |
40 | import org.eclipse.viatra.dse.solutionstore.SolutionStore | 43 | import org.eclipse.viatra.dse.solutionstore.SolutionStore |
41 | import org.eclipse.viatra.dse.statecode.IStateCoderFactory | 44 | import org.eclipse.viatra.dse.statecode.IStateCoderFactory |
42 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.NeighbourhoodBasedStateCoderFactory | ||
43 | 45 | ||
44 | class ViatraReasoner extends LogicReasoner { | 46 | class ViatraReasoner extends LogicReasoner { |
45 | val PartialInterpretationInitialiser initialiser = new PartialInterpretationInitialiser() | 47 | val PartialInterpretationInitialiser initialiser = new PartialInterpretationInitialiser() |
@@ -71,6 +73,11 @@ class ViatraReasoner extends LogicReasoner { | |||
71 | workspace.writeModel(emptySolution, "init.partialmodel") | 73 | workspace.writeModel(emptySolution, "init.partialmodel") |
72 | } | 74 | } |
73 | emptySolution.problemConainer = problem | 75 | emptySolution.problemConainer = problem |
76 | var BasicScopeGlobalConstraint basicScopeGlobalConstraint = null | ||
77 | if (viatraConfig.scopePropagatorStrategy == ScopePropagatorStrategy.None) { | ||
78 | basicScopeGlobalConstraint = new BasicScopeGlobalConstraint(emptySolution) | ||
79 | emptySolution.scopes.clear | ||
80 | } | ||
74 | 81 | ||
75 | val method = modelGenerationMethodProvider.createModelGenerationMethod( | 82 | val method = modelGenerationMethodProvider.createModelGenerationMethod( |
76 | problem, | 83 | problem, |
@@ -79,11 +86,12 @@ class ViatraReasoner extends LogicReasoner { | |||
79 | viatraConfig.nameNewElements, | 86 | viatraConfig.nameNewElements, |
80 | viatraConfig.typeInferenceMethod, | 87 | viatraConfig.typeInferenceMethod, |
81 | viatraConfig.scopePropagatorStrategy, | 88 | viatraConfig.scopePropagatorStrategy, |
89 | viatraConfig.hints, | ||
82 | viatraConfig.documentationLevel | 90 | viatraConfig.documentationLevel |
83 | ) | 91 | ) |
84 | 92 | ||
85 | dse.addObjective(new ModelGenerationCompositeObjective( | 93 | dse.addObjective(new ModelGenerationCompositeObjective( |
86 | new ScopeObjective, | 94 | basicScopeGlobalConstraint ?: new ScopeObjective, |
87 | method.unfinishedMultiplicities.map[new UnfinishedMultiplicityObjective(it)], | 95 | method.unfinishedMultiplicities.map[new UnfinishedMultiplicityObjective(it)], |
88 | wf2ObjectiveConverter.createCompletenessObjective(method.unfinishedWF) | 96 | wf2ObjectiveConverter.createCompletenessObjective(method.unfinishedWF) |
89 | )) | 97 | )) |
@@ -132,6 +140,9 @@ class ViatraReasoner extends LogicReasoner { | |||
132 | dse.addGlobalConstraint(wf2ObjectiveConverter.createInvalidationGlobalConstraint(method.invalidWF)) | 140 | dse.addGlobalConstraint(wf2ObjectiveConverter.createInvalidationGlobalConstraint(method.invalidWF)) |
133 | dse.addGlobalConstraint(new SurelyViolatedObjectiveGlobalConstraint(solutionSaver)) | 141 | dse.addGlobalConstraint(new SurelyViolatedObjectiveGlobalConstraint(solutionSaver)) |
134 | dse.addGlobalConstraint(new InconsistentScopeGlobalConstraint) | 142 | dse.addGlobalConstraint(new InconsistentScopeGlobalConstraint) |
143 | if (basicScopeGlobalConstraint !== null) { | ||
144 | dse.addGlobalConstraint(basicScopeGlobalConstraint) | ||
145 | } | ||
135 | for (additionalConstraint : viatraConfig.searchSpaceConstraints.additionalGlobalConstraints) { | 146 | for (additionalConstraint : viatraConfig.searchSpaceConstraints.additionalGlobalConstraints) { |
136 | dse.addGlobalConstraint(additionalConstraint.apply(method)) | 147 | dse.addGlobalConstraint(additionalConstraint.apply(method)) |
137 | } | 148 | } |
@@ -140,7 +151,7 @@ class ViatraReasoner extends LogicReasoner { | |||
140 | 151 | ||
141 | val IStateCoderFactory statecoder = switch (viatraConfig.stateCoderStrategy) { | 152 | val IStateCoderFactory statecoder = switch (viatraConfig.stateCoderStrategy) { |
142 | case Neighbourhood: | 153 | case Neighbourhood: |
143 | new NeighbourhoodBasedStateCoderFactory | 154 | new NeighbourhoodBasedHashStateCoderFactory |
144 | case PairwiseNeighbourhood: | 155 | case PairwiseNeighbourhood: |
145 | new PairwiseNeighbourhoodBasedStateCoderFactory | 156 | new PairwiseNeighbourhoodBasedStateCoderFactory |
146 | default: | 157 | default: |
@@ -216,9 +227,17 @@ class ViatraReasoner extends LogicReasoner { | |||
216 | it.value = method.statistics.decisionsTried | 227 | it.value = method.statistics.decisionsTried |
217 | ] | 228 | ] |
218 | it.entries += createIntStatisticEntry => [ | 229 | it.entries += createIntStatisticEntry => [ |
230 | it.name = "Transformations" | ||
231 | it.value = method.statistics.transformationInvocations | ||
232 | ] | ||
233 | it.entries += createIntStatisticEntry => [ | ||
219 | it.name = "ScopePropagations" | 234 | it.name = "ScopePropagations" |
220 | it.value = method.statistics.scopePropagatorInvocations | 235 | it.value = method.statistics.scopePropagatorInvocations |
221 | ] | 236 | ] |
237 | it.entries += createIntStatisticEntry => [ | ||
238 | it.name = "ScopePropagationsSolverCalls" | ||
239 | it.value = method.statistics.scopePropagatorSolverInvocations | ||
240 | ] | ||
222 | if (diversityChecker.isActive) { | 241 | if (diversityChecker.isActive) { |
223 | it.entries += createIntStatisticEntry => [ | 242 | it.entries += createIntStatisticEntry => [ |
224 | it.name = "SolutionDiversityCheckTime" | 243 | it.name = "SolutionDiversityCheckTime" |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend index a5f42a5f..6f38d261 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend | |||
@@ -16,6 +16,7 @@ import java.util.LinkedList | |||
16 | import java.util.List | 16 | import java.util.List |
17 | import java.util.Set | 17 | import java.util.Set |
18 | import org.eclipse.xtext.xbase.lib.Functions.Function1 | 18 | import org.eclipse.xtext.xbase.lib.Functions.Function1 |
19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint | ||
19 | 20 | ||
20 | enum StateCoderStrategy { | 21 | enum StateCoderStrategy { |
21 | Neighbourhood, | 22 | Neighbourhood, |
@@ -56,6 +57,8 @@ class ViatraReasonerConfiguration extends LogicSolverConfiguration { | |||
56 | 57 | ||
57 | public var ScopePropagatorStrategy scopePropagatorStrategy = new ScopePropagatorStrategy.Polyhedral( | 58 | public var ScopePropagatorStrategy scopePropagatorStrategy = new ScopePropagatorStrategy.Polyhedral( |
58 | PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp) | 59 | PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp) |
60 | |||
61 | public var List<LinearTypeConstraintHint> hints = newArrayList | ||
59 | 62 | ||
60 | public var List<CostObjectiveConfiguration> costObjectives = newArrayList | 63 | public var List<CostObjectiveConfiguration> costObjectives = newArrayList |
61 | } | 64 | } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BasicScopeGlobalConstraint.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BasicScopeGlobalConstraint.xtend new file mode 100644 index 00000000..67f447ed --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BasicScopeGlobalConstraint.xtend | |||
@@ -0,0 +1,103 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse | ||
2 | |||
3 | import com.google.common.collect.ImmutableList | ||
4 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation | ||
6 | import java.util.Comparator | ||
7 | import java.util.List | ||
8 | import org.eclipse.viatra.dse.base.ThreadContext | ||
9 | import org.eclipse.viatra.dse.objectives.Comparators | ||
10 | import org.eclipse.viatra.dse.objectives.IGlobalConstraint | ||
11 | import org.eclipse.viatra.dse.objectives.IObjective | ||
12 | import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor | ||
13 | |||
14 | class BasicScopeGlobalConstraint implements IGlobalConstraint, IObjective { | ||
15 | val PartialInterpretation p | ||
16 | val List<ScopeAssertion> assertions | ||
17 | |||
18 | new(PartialInterpretation p) { | ||
19 | this.p = p | ||
20 | assertions = ImmutableList.copyOf(p.scopes.map [ | ||
21 | val currentSize = targetTypeInterpretation.elements.size | ||
22 | val minElements = minNewElements + currentSize | ||
23 | val maxElements = if (maxNewElements < 0) { | ||
24 | -1 | ||
25 | } else { | ||
26 | maxNewElements + currentSize | ||
27 | } | ||
28 | new ScopeAssertion(minElements, maxElements, targetTypeInterpretation) | ||
29 | ]) | ||
30 | } | ||
31 | |||
32 | override init(ThreadContext context) { | ||
33 | if (context.model != p) { | ||
34 | throw new IllegalArgumentException( | ||
35 | "Partial model must be passed to the constructor of BasicScopeGlobalConstraint") | ||
36 | } | ||
37 | } | ||
38 | |||
39 | override checkGlobalConstraint(ThreadContext context) { | ||
40 | assertions.forall[upperBoundSatisfied] | ||
41 | } | ||
42 | |||
43 | override getFitness(ThreadContext context) { | ||
44 | var double fitness = p.minNewElements | ||
45 | for (assertion : assertions) { | ||
46 | if (!assertion.lowerBoundSatisfied) { | ||
47 | fitness += 1 | ||
48 | } | ||
49 | } | ||
50 | fitness | ||
51 | } | ||
52 | |||
53 | override satisifiesHardObjective(Double fitness) { | ||
54 | fitness <= 0.01 | ||
55 | } | ||
56 | |||
57 | override BasicScopeGlobalConstraint createNew() { | ||
58 | this | ||
59 | } | ||
60 | |||
61 | override getName() { | ||
62 | class.name | ||
63 | } | ||
64 | |||
65 | override getComparator() { | ||
66 | Comparators.LOWER_IS_BETTER | ||
67 | } | ||
68 | |||
69 | override getLevel() { | ||
70 | 2 | ||
71 | } | ||
72 | |||
73 | override isHardObjective() { | ||
74 | true | ||
75 | } | ||
76 | |||
77 | override setComparator(Comparator<Double> comparator) { | ||
78 | throw new UnsupportedOperationException | ||
79 | } | ||
80 | |||
81 | override setLevel(int level) { | ||
82 | throw new UnsupportedOperationException | ||
83 | } | ||
84 | |||
85 | @FinalFieldsConstructor | ||
86 | private static class ScopeAssertion { | ||
87 | val int lowerBound | ||
88 | val int upperBound | ||
89 | val PartialTypeInterpratation typeDefinitions | ||
90 | |||
91 | private def getCount() { | ||
92 | typeDefinitions.elements.size | ||
93 | } | ||
94 | |||
95 | private def isLowerBoundSatisfied() { | ||
96 | count >= lowerBound | ||
97 | } | ||
98 | |||
99 | private def isUpperBoundSatisfied() { | ||
100 | upperBound < 0 || count <= upperBound | ||
101 | } | ||
102 | } | ||
103 | } | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java index 5af7fc69..081e48fa 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java | |||
@@ -255,7 +255,7 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { | |||
255 | activationIds = new ArrayList<Object>(context.getUntraversedActivationIds()); | 255 | activationIds = new ArrayList<Object>(context.getUntraversedActivationIds()); |
256 | Collections.shuffle(activationIds); | 256 | Collections.shuffle(activationIds); |
257 | } catch (NullPointerException e) { | 257 | } catch (NullPointerException e) { |
258 | logger.warn("Unexpected state code: " + context.getDesignSpaceManager().getCurrentState()); | 258 | // logger.warn("Unexpected state code: " + context.getDesignSpaceManager().getCurrentState()); |
259 | numberOfStatecoderFail++; | 259 | numberOfStatecoderFail++; |
260 | activationIds = Collections.emptyList(); | 260 | activationIds = Collections.emptyList(); |
261 | } | 261 | } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend index 9a33753c..2976bebe 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend | |||
@@ -59,7 +59,7 @@ class ModelGenerationCompositeObjective implements IThreeValuedObjective { | |||
59 | } | 59 | } |
60 | sum += multiplicity | 60 | sum += multiplicity |
61 | sum += unfinishedWFsFitness // *0.5 | 61 | sum += unfinishedWFsFitness // *0.5 |
62 | // println('''Sum=«sum»|Scope=«scopeFitnes»|Multiplicity=«multiplicity»|WFs=«unfinishedWFsFitness»''') | 62 | // println('''Sum=«sum»|Scope=«scopeFitnes»|Multiplicity=«multiplicity»|WFs=«unfinishedWFsFitness»''') |
63 | return sum | 63 | return sum |
64 | } | 64 | } |
65 | 65 | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend index 69efe0d7..e7967b00 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend | |||
@@ -23,9 +23,9 @@ class ScopeObjective implements IObjective{ | |||
23 | 23 | ||
24 | override getFitness(ThreadContext context) { | 24 | override getFitness(ThreadContext context) { |
25 | val interpretation = context.model as PartialInterpretation | 25 | val interpretation = context.model as PartialInterpretation |
26 | var res = interpretation.minNewElements.doubleValue | 26 | var res = interpretation.minNewElementsHeuristic.doubleValue |
27 | for(scope : interpretation.scopes) { | 27 | for(scope : interpretation.scopes) { |
28 | res += scope.minNewElements*2 | 28 | res += scope.minNewElementsHeuristic*2 |
29 | } | 29 | } |
30 | return res | 30 | return res |
31 | } | 31 | } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend index bf34aeeb..1b61ffa5 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend | |||
@@ -14,41 +14,51 @@ import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | |||
14 | class UnfinishedWFObjective implements IObjective { | 14 | class UnfinishedWFObjective implements IObjective { |
15 | Collection<? extends IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> unfinishedWFs | 15 | Collection<? extends IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> unfinishedWFs |
16 | val List<ViatraQueryMatcher<?>> matchers | 16 | val List<ViatraQueryMatcher<?>> matchers |
17 | 17 | ||
18 | new(Collection<? extends IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> unfinishedWFs) { | 18 | new( |
19 | Collection<? extends IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> unfinishedWFs) { | ||
19 | this.unfinishedWFs = unfinishedWFs | 20 | this.unfinishedWFs = unfinishedWFs |
20 | matchers = new ArrayList(unfinishedWFs.size) | 21 | matchers = new ArrayList(unfinishedWFs.size) |
21 | } | 22 | } |
23 | |||
22 | override getName() '''unfinishedWFs''' | 24 | override getName() '''unfinishedWFs''' |
25 | |||
23 | override createNew() { | 26 | override createNew() { |
24 | return new UnfinishedWFObjective(unfinishedWFs) | 27 | return new UnfinishedWFObjective(unfinishedWFs) |
25 | } | 28 | } |
29 | |||
26 | override init(ThreadContext context) { | 30 | override init(ThreadContext context) { |
27 | val engine = context.queryEngine//ViatraQueryEngine.on(new EMFScope(context.model)) | 31 | val engine = context.queryEngine // ViatraQueryEngine.on(new EMFScope(context.model)) |
28 | for(unfinishedWF : unfinishedWFs) { | 32 | for (unfinishedWF : unfinishedWFs) { |
29 | matchers += unfinishedWF.getMatcher(engine) | 33 | matchers += unfinishedWF.getMatcher(engine) |
30 | } | 34 | } |
31 | } | 35 | } |
32 | 36 | ||
33 | override getComparator() { Comparators.LOWER_IS_BETTER } | 37 | override getComparator() { Comparators.LOWER_IS_BETTER } |
38 | |||
34 | override getFitness(ThreadContext context) { | 39 | override getFitness(ThreadContext context) { |
35 | var sumOfMatches = 0 | 40 | var sumOfMatches = 0 |
36 | for(matcher : matchers) { | 41 | for (matcher : matchers) { |
37 | val number = matcher.countMatches | 42 | val number = matcher.countMatches |
38 | //println('''«matcher.patternName» = «number»''') | 43 | // if (number > 0) { |
39 | sumOfMatches+=number | 44 | // println('''«matcher.patternName» = «number»''') |
45 | // } | ||
46 | sumOfMatches += number | ||
40 | } | 47 | } |
41 | return sumOfMatches.doubleValue | 48 | return sumOfMatches.doubleValue |
42 | } | 49 | } |
43 | 50 | ||
44 | override getLevel() { 2 } | 51 | override getLevel() { 2 } |
52 | |||
45 | override isHardObjective() { true } | 53 | override isHardObjective() { true } |
46 | override satisifiesHardObjective(Double fitness) { return fitness <=0.01 } | 54 | |
47 | 55 | override satisifiesHardObjective(Double fitness) { return fitness <= 0.01 } | |
56 | |||
48 | override setComparator(Comparator<Double> comparator) { | 57 | override setComparator(Comparator<Double> comparator) { |
49 | throw new UnsupportedOperationException() | 58 | throw new UnsupportedOperationException() |
50 | } | 59 | } |
60 | |||
51 | override setLevel(int level) { | 61 | override setLevel(int level) { |
52 | throw new UnsupportedOperationException() | 62 | throw new UnsupportedOperationException() |
53 | } | 63 | } |
54 | } \ No newline at end of file | 64 | } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend index 6bffeb59..74500cc2 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend | |||
@@ -42,7 +42,7 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { | |||
42 | 42 | ||
43 | private def saveBestSolutionOnly(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) { | 43 | private def saveBestSolutionOnly(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) { |
44 | val fitness = context.lastFitness | 44 | val fitness = context.lastFitness |
45 | if (!fitness.satisifiesHardObjectives) { | 45 | if (!shouldSaveSolution(fitness, context)) { |
46 | return false | 46 | return false |
47 | } | 47 | } |
48 | val dominatedTrajectories = newArrayList | 48 | val dominatedTrajectories = newArrayList |
@@ -83,7 +83,7 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { | |||
83 | 83 | ||
84 | private def saveAnyDiverseSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) { | 84 | private def saveAnyDiverseSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) { |
85 | val fitness = context.lastFitness | 85 | val fitness = context.lastFitness |
86 | if (!fitness.satisifiesHardObjectives) { | 86 | if (!shouldSaveSolution(fitness, context)) { |
87 | return false | 87 | return false |
88 | } | 88 | } |
89 | if (!diversityChecker.newSolution(context, id, emptyList)) { | 89 | if (!diversityChecker.newSolution(context, id, emptyList)) { |
@@ -92,7 +92,12 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { | |||
92 | basicSaveSolution(context, id, solutionTrajectory, fitness) | 92 | basicSaveSolution(context, id, solutionTrajectory, fitness) |
93 | } | 93 | } |
94 | 94 | ||
95 | private def basicSaveSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory, Fitness fitness) { | 95 | private def shouldSaveSolution(Fitness fitness, ThreadContext context) { |
96 | return fitness.satisifiesHardObjectives | ||
97 | } | ||
98 | |||
99 | private def basicSaveSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory, | ||
100 | Fitness fitness) { | ||
96 | var boolean solutionSaved = false | 101 | var boolean solutionSaved = false |
97 | var dseSolution = solutionsCollection.get(id) | 102 | var dseSolution = solutionsCollection.get(id) |
98 | if (dseSolution === null) { | 103 | if (dseSolution === null) { |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF b/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF index cc274c7c..fe223d4a 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF | |||
@@ -28,8 +28,10 @@ Require-Bundle: hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlan | |||
28 | hu.bme.mit.inf.dslreasoner.visualisation;bundle-version="1.0.0", | 28 | hu.bme.mit.inf.dslreasoner.visualisation;bundle-version="1.0.0", |
29 | hu.bme.mit.inf.dslreasoner.domains.alloyexamples;bundle-version="1.0.0", | 29 | hu.bme.mit.inf.dslreasoner.domains.alloyexamples;bundle-version="1.0.0", |
30 | org.eclipse.collections;bundle-version="9.2.0", | 30 | org.eclipse.collections;bundle-version="9.2.0", |
31 | org.eclipse.viatra.query.patternlanguage.emf;bundle-version="2.2.0", | 31 | org.eclipse.viatra.query.patternlanguage.emf;bundle-version="2.0.0", |
32 | org.eclipse.viatra.query.runtime.rete;bundle-version="2.2.0", | 32 | org.eclipse.viatra.query.runtime.rete;bundle-version="2.0.0", |
33 | org.objectweb.asm;bundle-version="7.0.0" | 33 | org.objectweb.asm;bundle-version="7.0.0", |
34 | com.google.gson;bundle-version="2.8.2", | ||
35 | hu.bme.mit.inf.dslreasoner.domains.satellite;bundle-version="0.1.0" | ||
34 | Import-Package: org.apache.log4j | 36 | Import-Package: org.apache.log4j |
35 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | 37 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/configs/FAM_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/FAM_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json new file mode 100644 index 00000000..26df3c74 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/FAM_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json | |||
@@ -0,0 +1,13 @@ | |||
1 | { | ||
2 | "inputPath": "initialModels", | ||
3 | "outputPath": "outputModels", | ||
4 | "timeout": 1200, | ||
5 | "saveModels": true, | ||
6 | "warmupIterations": 0, | ||
7 | "iterations": 1, | ||
8 | "domain": "FAM", | ||
9 | "scope": "none", | ||
10 | "sizes": [500], | ||
11 | "solver": "ViatraSolver", | ||
12 | "scopePropagator": "basic" | ||
13 | } | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/configs/Yakindu_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/Yakindu_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json new file mode 100644 index 00000000..5f8a01b1 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/Yakindu_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json | |||
@@ -0,0 +1,16 @@ | |||
1 | { | ||
2 | "inputPath": "initialModels", | ||
3 | "outputPath": "outputModels", | ||
4 | "timeout": 1200, | ||
5 | "saveModels": false, | ||
6 | "warmupIterations": 0, | ||
7 | "iterations": 5, | ||
8 | "domain": "Yakindu", | ||
9 | "scope": "quantiles", | ||
10 | "sizes": [100], | ||
11 | "solver": "ViatraSolver", | ||
12 | "scopePropagator": "polyhedral", | ||
13 | "propagatedConstraints": "hints", | ||
14 | "polyhedronSolver": "Clp", | ||
15 | "scopeHeuristic": "basic" | ||
16 | } | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/configs/ecore_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/ecore_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json new file mode 100644 index 00000000..42073422 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/ecore_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "inputPath": "initialModels", | ||
3 | "outputPath": "outputModels", | ||
4 | "timeout": 1200, | ||
5 | "saveModels": true, | ||
6 | "warmupIterations": 0, | ||
7 | "iterations": 5, | ||
8 | "domain": "ecore", | ||
9 | "scope": "quantiles", | ||
10 | "sizes": [100], | ||
11 | "solver": "ViatraSolver", | ||
12 | "scopePropagator": "polyhedral", | ||
13 | "propagatedConstraints": "relations", | ||
14 | "polyhedronSolver": "Clp" | ||
15 | } | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/configs/fs_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/fs_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json new file mode 100644 index 00000000..d7955ddd --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/fs_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "inputPath": "initialModels", | ||
3 | "outputPath": "outputModels", | ||
4 | "timeout": 1200, | ||
5 | "saveModels": true, | ||
6 | "warmupIterations": 1, | ||
7 | "iterations": 1, | ||
8 | "domain": "fs", | ||
9 | "scope": "useful", | ||
10 | "sizes": [50, 100, 150, 200, 250, 300, 350, 400, 450, 500], | ||
11 | "solver": "ViatraSolver", | ||
12 | "scopePropagator": "polyhedral", | ||
13 | "propagatedConstraints": "relations", | ||
14 | "polyhedronSolver": "Clp" | ||
15 | } | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/configs/satellite_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/satellite_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json new file mode 100644 index 00000000..474962e7 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/satellite_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json | |||
@@ -0,0 +1,17 @@ | |||
1 | { | ||
2 | "inputPath": "initialModels", | ||
3 | "outputPath": "outputModels", | ||
4 | "timeout": 1200, | ||
5 | "saveModels": true, | ||
6 | "saveTemporaryFiles": true, | ||
7 | "warmupIterations": 0, | ||
8 | "iterations": 1, | ||
9 | "domain": "satellite", | ||
10 | "scope": "quantiles", | ||
11 | "sizes": [50], | ||
12 | "solver": "ViatraSolver", | ||
13 | "scopePropagator": "polyhedral", | ||
14 | "propagatedConstraints": "hints", | ||
15 | "polyhedronSolver": "Clp", | ||
16 | "scopeHeuristic": "polyhedral" | ||
17 | } | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/satellite.xmi b/Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/satellite.xmi new file mode 100644 index 00000000..77f6ecfd --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/satellite.xmi | |||
@@ -0,0 +1,14 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <satellite:InterferometryMission | ||
3 | xmi:version="2.0" | ||
4 | xmlns:xmi="http://www.omg.org/XMI" | ||
5 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
6 | xmlns:satellite="http://www.example.org/satellite" | ||
7 | xsi:schemaLocation="http://www.example.org/satellite ../../hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore"> | ||
8 | <groundStationNetwork> | ||
9 | <commSubsystem | ||
10 | xsi:type="satellite:XCommSubsystem"/> | ||
11 | <commSubsystem | ||
12 | xsi:type="satellite:KaCommSubsystem"/> | ||
13 | </groundStationNetwork> | ||
14 | </satellite:InterferometryMission> | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend deleted file mode 100644 index 02caf9dd..00000000 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend +++ /dev/null | |||
@@ -1,176 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.YakindummPackage | ||
4 | import hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.Mutated | ||
5 | import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace | ||
6 | import java.io.File | ||
7 | import java.util.ArrayList | ||
8 | import java.util.Collection | ||
9 | import java.util.Comparator | ||
10 | import java.util.HashMap | ||
11 | import java.util.List | ||
12 | import java.util.Map | ||
13 | import java.util.TreeSet | ||
14 | import org.eclipse.emf.ecore.EObject | ||
15 | import org.eclipse.emf.ecore.resource.Resource | ||
16 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | ||
17 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
18 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification | ||
19 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
20 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
21 | |||
22 | class QueryComparator implements Comparator<IQuerySpecification<?>>{ | ||
23 | |||
24 | override compare(IQuerySpecification<?> arg0, IQuerySpecification<?> arg1) { | ||
25 | arg0.fullyQualifiedName.compareTo(arg1.fullyQualifiedName) | ||
26 | } | ||
27 | } | ||
28 | |||
29 | class CountMatches { | ||
30 | var static List<IQuerySpecification<?>> wfPatterns; | ||
31 | var static Map<IQuerySpecification<?>,IQuerySpecification<?>> query2Reference | ||
32 | |||
33 | def static void main(String[] args) { | ||
34 | YakindummPackage.eINSTANCE.eClass | ||
35 | Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put("*",new XMIResourceFactoryImpl) | ||
36 | |||
37 | wfPatterns = Mutated.instance.specifications.toList; | ||
38 | //wfPatterns = wfPatterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toList | ||
39 | wfPatterns.sort(new QueryComparator) | ||
40 | |||
41 | val groupName2Representant = new HashMap | ||
42 | query2Reference = new HashMap | ||
43 | for(wfPattern : wfPatterns) { | ||
44 | val groupName = wfPattern.groupName | ||
45 | if(groupName2Representant.containsKey(groupName)) { | ||
46 | val representant = groupName2Representant.get(groupName) | ||
47 | query2Reference.put(wfPattern,representant) | ||
48 | } else { | ||
49 | groupName2Representant.put(groupName,wfPattern) | ||
50 | } | ||
51 | } | ||
52 | |||
53 | |||
54 | println('''modelpath;run;model;« | ||
55 | FOR wfPattern:wfPatterns SEPARATOR ";"»#(« | ||
56 | wfPattern.fullyQualifiedName.split("\\.").last»);hash(« | ||
57 | wfPattern.fullyQualifiedName.split("\\.").last»)«ENDFOR»;« | ||
58 | FOR mutant : wfPatterns.filter[query2Reference.keySet.contains(it)] SEPARATOR ';'»diff(« | ||
59 | mutant.fullyQualifiedName.split("\\.").last»)«ENDFOR»''' | ||
60 | ) | ||
61 | countMatches('''D:/FASE18Meas/RemoHF''') | ||
62 | } | ||
63 | |||
64 | def private static simpleName(IQuerySpecification<?> wfPattern) { | ||
65 | wfPattern.fullyQualifiedName.split("\\.").last | ||
66 | } | ||
67 | def private static groupName(IQuerySpecification<?> wfPattern) { | ||
68 | wfPattern.simpleName.split('_').head | ||
69 | } | ||
70 | |||
71 | def static void countMatches(String path) { | ||
72 | val file = new File(path) | ||
73 | if(file.isDirectory) { | ||
74 | for(subFileName : file.list) { | ||
75 | (path + "/" + subFileName).countMatches | ||
76 | } | ||
77 | } else if(file.isFile) { | ||
78 | if(path.endsWith("xmi")) { | ||
79 | countMatches(file,path) | ||
80 | } | ||
81 | } | ||
82 | } | ||
83 | |||
84 | def static void countMatches(File file, String path) { | ||
85 | |||
86 | |||
87 | val pathSegments = path.split("/") | ||
88 | val groupName = pathSegments.get(pathSegments.size-2).split("\\.").last.split("_").get(0) | ||
89 | print(groupName +";") | ||
90 | val nameExtension = pathSegments.get(pathSegments.size-1).split("\\.").get(0).split("_") | ||
91 | try{ | ||
92 | val runNumber = nameExtension.get(1) | ||
93 | val modelNumber = nameExtension.get(2) | ||
94 | print('''«runNumber»;«modelNumber»''') | ||
95 | } catch(Exception e) { | ||
96 | print('''«file.name»;0''') | ||
97 | } | ||
98 | |||
99 | val parent = file.parent | ||
100 | val workspace = new FileSystemWorkspace(parent,"") | ||
101 | val model = workspace.readModel(EObject,file.name) | ||
102 | |||
103 | val engine = ViatraQueryEngine.on(new EMFScope(model)) | ||
104 | val objectCode = model.eResource.calculateObjectCode | ||
105 | |||
106 | val pattern2Hash = new HashMap | ||
107 | for(pattern : wfPatterns) { | ||
108 | val matcher = pattern.getMatcher(engine) | ||
109 | val matches = matcher.allMatches | ||
110 | val hash = matches.getMatchSetDescriptor(objectCode) | ||
111 | pattern2Hash.put(pattern,hash) | ||
112 | print(''';«matcher.countMatches»;«hash»''') | ||
113 | } | ||
114 | var mutantsKilled = 0 | ||
115 | for(mutant : wfPatterns.filter[query2Reference.keySet.contains(it)]) { | ||
116 | val equals = pattern2Hash.get(mutant) == pattern2Hash.get(query2Reference.get(mutant)) | ||
117 | print(''';''') | ||
118 | if(equals) { | ||
119 | print('0') | ||
120 | } else { | ||
121 | print('1') | ||
122 | mutantsKilled++ | ||
123 | } | ||
124 | } | ||
125 | //print(''';«mutantsKilled»''') | ||
126 | println() | ||
127 | } | ||
128 | |||
129 | def static Map<EObject,Integer> calculateObjectCode(Resource resource) { | ||
130 | val res = new HashMap | ||
131 | val iterator = resource.allContents | ||
132 | var index = 1 | ||
133 | while(iterator.hasNext) { | ||
134 | res.put(iterator.next,index++) | ||
135 | } | ||
136 | return res | ||
137 | } | ||
138 | |||
139 | def static getMatchSetDescriptor(Collection<? extends IPatternMatch> matchSet, Map<EObject,Integer> objectCode) { | ||
140 | val set = new TreeSet(new ArrayComparator) | ||
141 | for(match: matchSet) { | ||
142 | val size = match.parameterNames.size | ||
143 | val idArray = new ArrayList<Integer>(size) | ||
144 | for(i:0..<size) { | ||
145 | val objectInMatch = match.get(i) | ||
146 | if(objectInMatch instanceof EObject) { | ||
147 | val id = objectCode.get(objectInMatch) | ||
148 | if(id!== null) { | ||
149 | idArray+= id | ||
150 | } else { | ||
151 | throw new IllegalArgumentException('''Unindexed object in match: «objectInMatch»''') | ||
152 | } | ||
153 | } else { | ||
154 | throw new IllegalArgumentException('''Unknown type object in match: "«objectInMatch.class.simpleName»"''') | ||
155 | } | ||
156 | } | ||
157 | set += idArray | ||
158 | } | ||
159 | return '''«FOR match : set SEPARATOR ','»[«FOR index : match SEPARATOR ','»«index»«ENDFOR»]«ENDFOR»'''.toString.hashCode | ||
160 | } | ||
161 | } | ||
162 | |||
163 | class ArrayComparator implements Comparator<List<Integer>> { | ||
164 | |||
165 | override compare(List<Integer> arg0, List<Integer> arg1) { | ||
166 | if(arg0.size === arg1.size) { | ||
167 | for(i : 0..<arg0.size) { | ||
168 | val comparison = arg0.get(i).compareTo(arg1.get(i)) | ||
169 | if(comparison !== 0) return comparison | ||
170 | } | ||
171 | return 0 | ||
172 | } else { | ||
173 | throw new IllegalArgumentException('''the arrays need to be in the same size''') | ||
174 | } | ||
175 | } | ||
176 | } \ No newline at end of file | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/Ecore2LogicTraceBasedHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/Ecore2LogicTraceBasedHint.xtend new file mode 100644 index 00000000..dc2de30c --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/Ecore2LogicTraceBasedHint.xtend | |||
@@ -0,0 +1,56 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run | ||
2 | |||
3 | import com.google.common.collect.ImmutableMap | ||
4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | ||
5 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | ||
10 | import java.util.Map | ||
11 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
12 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
13 | |||
14 | abstract class Ecore2LogicTraceBasedHint implements LinearTypeConstraintHint { | ||
15 | val Map<String, Type> nameToType | ||
16 | val Map<String, Map<String, RelationDeclaration>> nameToRelation | ||
17 | |||
18 | protected new(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { | ||
19 | nameToType = ImmutableMap.copyOf(ecore2Logic.allClassesInScope(trace).toMap[name].mapValues [ eClass | | ||
20 | ecore2Logic.TypeofEClass(trace, eClass) | ||
21 | ]) | ||
22 | nameToRelation = ImmutableMap.copyOf(ecore2Logic.allReferencesInScope(trace).groupBy[EContainingClass.name]. | ||
23 | mapValues [ references | | ||
24 | ImmutableMap.copyOf(references.toMap[name].mapValues [ reference | | ||
25 | ecore2Logic.relationOfReference(trace, reference) | ||
26 | ]) | ||
27 | ]) | ||
28 | } | ||
29 | |||
30 | protected def getType(String name) { | ||
31 | nameToType.get(name) | ||
32 | } | ||
33 | |||
34 | protected def relation(String typeName, String relationName) { | ||
35 | nameToRelation.get(typeName).get(relationName) | ||
36 | } | ||
37 | |||
38 | protected static def <T extends IPatternMatch> int countMatches(ViatraQueryMatcher<T> matcher, PartialInterpretation p) { | ||
39 | val match = matcher.newEmptyMatch | ||
40 | match.set(0, p.problem) | ||
41 | match.set(1, p) | ||
42 | matcher.countMatches(match) | ||
43 | } | ||
44 | |||
45 | protected static def <T extends IPatternMatch> int getCount(ViatraQueryMatcher<T> matcher, PartialInterpretation p) { | ||
46 | val match = matcher.newEmptyMatch | ||
47 | match.set(0, p.problem) | ||
48 | match.set(1, p) | ||
49 | val realMatch = matcher.getOneArbitraryMatch(match) | ||
50 | if (realMatch.present) { | ||
51 | realMatch.get.get(2) as Integer | ||
52 | } else { | ||
53 | 0 | ||
54 | } | ||
55 | } | ||
56 | } | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend index 34f3c267..54724226 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend | |||
@@ -4,18 +4,23 @@ import functionalarchitecture.FunctionalarchitecturePackage | |||
4 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Ecore | 4 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Ecore |
5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.FileSystem | 5 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.FileSystem |
6 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage | 6 | import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage |
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SatelliteQueriesAll | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns | 8 | import hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns |
8 | import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.YakindummPackage | 9 | import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.YakindummPackage |
10 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | ||
11 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | ||
9 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor | 12 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor |
10 | import hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.Patterns | 13 | import hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.Patterns |
11 | import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor | 14 | import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor |
12 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod | 15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod |
16 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint | ||
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint | 17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint |
14 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | 18 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace |
15 | import java.util.Collection | 19 | import java.util.Collection |
16 | import java.util.HashMap | 20 | import java.util.HashMap |
17 | import java.util.LinkedHashMap | 21 | import java.util.LinkedHashMap |
18 | import java.util.List | 22 | import java.util.List |
23 | import java.util.Map | ||
19 | import java.util.Set | 24 | import java.util.Set |
20 | import org.eclipse.emf.ecore.EAttribute | 25 | import org.eclipse.emf.ecore.EAttribute |
21 | import org.eclipse.emf.ecore.EClass | 26 | import org.eclipse.emf.ecore.EClass |
@@ -24,60 +29,83 @@ import org.eclipse.emf.ecore.EEnumLiteral | |||
24 | import org.eclipse.emf.ecore.EObject | 29 | import org.eclipse.emf.ecore.EObject |
25 | import org.eclipse.emf.ecore.EReference | 30 | import org.eclipse.emf.ecore.EReference |
26 | import org.eclipse.emf.ecore.EcorePackage | 31 | import org.eclipse.emf.ecore.EcorePackage |
32 | import org.eclipse.xtend.lib.annotations.Data | ||
27 | import org.eclipse.xtext.xbase.lib.Functions.Function1 | 33 | import org.eclipse.xtext.xbase.lib.Functions.Function1 |
28 | import hu.bme.mit.inf.dslreasoner.domains.transima.fam.Type | 34 | import satellite.SatellitePackage |
29 | import hu.bme.mit.inf.dslreasoner.domains.transima.fam.Model | 35 | |
36 | @Data | ||
37 | class TypeQuantiles { | ||
38 | double low | ||
39 | double high | ||
40 | } | ||
30 | 41 | ||
31 | abstract class MetamodelLoader { | 42 | abstract class MetamodelLoader { |
32 | protected val ReasonerWorkspace workspace | 43 | protected val ReasonerWorkspace workspace |
44 | |||
33 | new(ReasonerWorkspace workspace) { | 45 | new(ReasonerWorkspace workspace) { |
34 | this.workspace = workspace | 46 | this.workspace = workspace |
35 | } | 47 | } |
48 | |||
36 | def EcoreMetamodelDescriptor loadMetamodel() | 49 | def EcoreMetamodelDescriptor loadMetamodel() |
50 | |||
37 | def Set<EClass> getRelevantTypes(EcoreMetamodelDescriptor descriptor) | 51 | def Set<EClass> getRelevantTypes(EcoreMetamodelDescriptor descriptor) |
52 | |||
38 | def Set<EReference> getRelevantReferences(EcoreMetamodelDescriptor descriptor) | 53 | def Set<EReference> getRelevantReferences(EcoreMetamodelDescriptor descriptor) |
54 | |||
39 | def ViatraQuerySetDescriptor loadQueries(EcoreMetamodelDescriptor metamodel) | 55 | def ViatraQuerySetDescriptor loadQueries(EcoreMetamodelDescriptor metamodel) |
56 | |||
40 | def List<EObject> loadPartialModel() | 57 | def List<EObject> loadPartialModel() |
41 | 58 | ||
42 | def List<Function1<ModelGenerationMethod,ModelGenerationMethodBasedGlobalConstraint>> additionalConstraints() | 59 | def List<Function1<ModelGenerationMethod, ModelGenerationMethodBasedGlobalConstraint>> additionalConstraints() |
43 | 60 | ||
44 | def <T> filterByNames(Iterable<T> collection, Function1<T,String> nameExtractor, Collection<String> requiredNames) { | 61 | def Map<String, TypeQuantiles> getTypeQuantiles() { |
62 | emptyMap | ||
63 | } | ||
64 | |||
65 | def List<LinearTypeConstraintHint> getHints(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { | ||
66 | emptyList | ||
67 | } | ||
68 | |||
69 | def <T> filterByNames(Iterable<T> collection, Function1<T, String> nameExtractor, | ||
70 | Collection<String> requiredNames) { | ||
45 | val res = collection.filter[requiredNames.contains(nameExtractor.apply(it))] | 71 | val res = collection.filter[requiredNames.contains(nameExtractor.apply(it))] |
46 | if(res.size != requiredNames.size) throw new IllegalArgumentException | 72 | if(res.size != requiredNames.size) throw new IllegalArgumentException |
47 | return res.toSet | 73 | return res.toSet |
48 | } | 74 | } |
49 | } | 75 | } |
50 | 76 | ||
51 | class FAMLoader extends MetamodelLoader{ | 77 | class FAMLoader extends MetamodelLoader { |
52 | 78 | ||
53 | new(ReasonerWorkspace workspace) { | 79 | new(ReasonerWorkspace workspace) { |
54 | super(workspace) | 80 | super(workspace) |
55 | } | 81 | } |
56 | 82 | ||
57 | override loadMetamodel() { | 83 | override loadMetamodel() { |
58 | val package = FunctionalarchitecturePackage.eINSTANCE | 84 | val package = FunctionalarchitecturePackage.eINSTANCE |
59 | val List<EClass> classes = package.EClassifiers.filter(EClass).toList | 85 | val List<EClass> classes = package.EClassifiers.filter(EClass).toList |
60 | val List<EEnum> enums = package.EClassifiers.filter(EEnum).toList | 86 | val List<EEnum> enums = package.EClassifiers.filter(EEnum).toList |
61 | val List<EEnumLiteral> literals = enums.map[ELiterals].flatten.toList | 87 | val List<EEnumLiteral> literals = enums.map[ELiterals].flatten.toList |
62 | val List<EReference> references = classes.map[EReferences].flatten.toList | 88 | val List<EReference> references = classes.map[EReferences].flatten.filter[name != "type" && name != "model"]. |
89 | toList | ||
63 | val List<EAttribute> attributes = classes.map[EAttributes].flatten.toList | 90 | val List<EAttribute> attributes = classes.map[EAttributes].flatten.toList |
64 | return new EcoreMetamodelDescriptor(classes,#{},false,enums,literals,references,attributes) | 91 | return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) |
65 | } | 92 | } |
66 | 93 | ||
67 | override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { | 94 | override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { |
68 | return descriptor.classes.filterByNames([it.name],#["FunctionalElement"]) | 95 | return descriptor.classes.filterByNames([it.name], #["FunctionalElement"]) |
69 | } | 96 | } |
97 | |||
70 | override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { | 98 | override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { |
71 | return descriptor.references.filterByNames([it.name],#["subElements"]) | 99 | return descriptor.references.filterByNames([it.name], #["subElements"]) |
72 | } | 100 | } |
73 | 101 | ||
74 | override loadQueries(EcoreMetamodelDescriptor metamodel) { | 102 | override loadQueries(EcoreMetamodelDescriptor metamodel) { |
75 | val i = FamPatterns.instance | 103 | val i = FamPatterns.instance |
76 | val patterns = i.specifications.toList | 104 | val patterns = i.specifications.toList |
77 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet | 105 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet |
78 | val derivedFeatures = new LinkedHashMap | 106 | val derivedFeatures = new LinkedHashMap |
79 | derivedFeatures.put(Type.instance,metamodel.attributes.filter[it.name == "type"].head) | 107 | // derivedFeatures.put(Type.instance,metamodel.attributes.filter[it.name == "type"].head) |
80 | derivedFeatures.put(Model.instance,metamodel.references.filter[it.name == "model"].head) | 108 | // derivedFeatures.put(Model.instance,metamodel.references.filter[it.name == "model"].head) |
81 | val res = new ViatraQuerySetDescriptor( | 109 | val res = new ViatraQuerySetDescriptor( |
82 | patterns, | 110 | patterns, |
83 | wfPatterns, | 111 | wfPatterns, |
@@ -85,65 +113,67 @@ class FAMLoader extends MetamodelLoader{ | |||
85 | ) | 113 | ) |
86 | return res | 114 | return res |
87 | } | 115 | } |
116 | |||
88 | override loadPartialModel() { | 117 | override loadPartialModel() { |
89 | this.workspace.readModel(EObject,"FAM.xmi").eResource.allContents.toList | 118 | this.workspace.readModel(EObject, "FAM.xmi").eResource.allContents.toList |
90 | } | 119 | } |
91 | 120 | ||
92 | override additionalConstraints() { #[] } | 121 | override additionalConstraints() { #[] } |
93 | } | 122 | } |
94 | 123 | ||
95 | class YakinduLoader extends MetamodelLoader{ | 124 | class YakinduLoader extends MetamodelLoader { |
96 | 125 | ||
97 | var useSynchronization = true; | 126 | var useSynchronization = true; |
98 | var useComplexStates = false; | 127 | var useComplexStates = false; |
99 | public static val patternsWithSynchronization = #[ | 128 | public static val patternsWithSynchronization = #["synchHasNoOutgoing", "synchHasNoIncoming", |
100 | "synchHasNoOutgoing", "synchHasNoIncoming", "SynchronizedIncomingInSameRegion", "notSynchronizingStates", | 129 | "SynchronizedIncomingInSameRegion", "SynchronizedIncomingInSameRegionHelper1", |
101 | "hasMultipleOutgoingTrainsition", "hasMultipleIncomingTrainsition", "SynchronizedRegionsAreNotSiblings", | 130 | "SynchronizedIncomingInSameRegionHelper2", "notSynchronizingStates", "hasMultipleOutgoingTrainsition", |
102 | "SynchronizedRegionDoesNotHaveMultipleRegions", "synchThree", "twoSynch","noSynch2","synch","noSynch4","noSynch3","noSynch"] | 131 | "hasMultipleIncomingTrainsition", "SynchronizedRegionsAreNotSiblings", |
103 | public static val patternsWithComplexStates =#["outgoingFromExit","outgoingFromFinal","choiceHasNoOutgoing","choiceHasNoIncoming"] | 132 | "SynchronizedRegionsAreNotSiblingsHelper1", "SynchronizedRegionsAreNotSiblingsHelper2", |
133 | "SynchronizedRegionDoesNotHaveMultipleRegions", "synchThree", "twoSynch", "noSynch2", "synch", "noSynch4", | ||
134 | "noSynch3", "noSynch"] | ||
135 | public static val patternsWithComplexStates = #["outgoingFromExit", "outgoingFromFinal", "choiceHasNoOutgoing", | ||
136 | "choiceHasNoIncoming"] | ||
137 | |||
104 | new(ReasonerWorkspace workspace) { | 138 | new(ReasonerWorkspace workspace) { |
105 | super(workspace) | 139 | super(workspace) |
106 | YakindummPackage.eINSTANCE.eClass | 140 | YakindummPackage.eINSTANCE.eClass |
107 | } | 141 | } |
108 | 142 | ||
109 | def setUseSynchronization(boolean useSynchronization) { | 143 | def setUseSynchronization(boolean useSynchronization) { |
110 | this.useSynchronization = useSynchronization | 144 | this.useSynchronization = useSynchronization |
111 | } | 145 | } |
146 | |||
112 | def setUseComplexStates(boolean useComplexStates) { | 147 | def setUseComplexStates(boolean useComplexStates) { |
113 | this.useComplexStates = useComplexStates | 148 | this.useComplexStates = useComplexStates |
114 | } | 149 | } |
115 | 150 | ||
116 | override loadMetamodel() { | 151 | override loadMetamodel() { |
117 | val useSynchInThisLoad = this.useSynchronization | 152 | val useSynchInThisLoad = this.useSynchronization |
118 | val useComplexStates = this.useComplexStates | 153 | val useComplexStates = this.useComplexStates |
119 | 154 | ||
120 | val package = YakindummPackage.eINSTANCE | 155 | val package = YakindummPackage.eINSTANCE |
121 | val List<EClass> classes = package.EClassifiers.filter(EClass) | 156 | val List<EClass> classes = package.EClassifiers.filter(EClass).filter [ |
122 | .filter[useSynchInThisLoad || (it.name != "Synchronization")] | 157 | useSynchInThisLoad || (it.name != "Synchronization") |
123 | .filter[useComplexStates || (it.name != "Choice" && it.name != "Exit" && it.name != "FinalState")] | 158 | ].filter[useComplexStates || (it.name != "Choice" && it.name != "Exit" && it.name != "FinalState")].toList |
124 | .toList | ||
125 | val List<EEnum> enums = package.EClassifiers.filter(EEnum).toList | 159 | val List<EEnum> enums = package.EClassifiers.filter(EEnum).toList |
126 | val List<EEnumLiteral> literals = enums.map[ELiterals].flatten.toList | 160 | val List<EEnumLiteral> literals = enums.map[ELiterals].flatten.toList |
127 | val List<EReference> references = classes.map[EReferences].flatten.toList | 161 | val List<EReference> references = classes.map[EReferences].flatten.toList |
128 | val List<EAttribute> attributes = classes.map[EAttributes].flatten.toList | 162 | val List<EAttribute> attributes = classes.map[EAttributes].flatten.toList |
129 | 163 | ||
130 | return new EcoreMetamodelDescriptor(classes,#{},false,enums,literals,references,attributes) | 164 | return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) |
131 | } | 165 | } |
166 | |||
132 | override loadQueries(EcoreMetamodelDescriptor metamodel) { | 167 | override loadQueries(EcoreMetamodelDescriptor metamodel) { |
133 | val useSynchInThisLoad = this.useSynchronization | 168 | val useSynchInThisLoad = this.useSynchronization |
134 | 169 | ||
135 | val i = Patterns.instance | 170 | val i = Patterns.instance |
136 | val patterns = i.specifications | 171 | val patterns = i.specifications.filter [ spec | |
137 | .filter[spec | | 172 | useSynchInThisLoad || !patternsWithSynchronization.exists[spec.fullyQualifiedName.endsWith(it)] |
138 | useSynchInThisLoad || | 173 | ].filter [ spec | |
139 | !patternsWithSynchronization.exists[spec.fullyQualifiedName.endsWith(it)] | 174 | useComplexStates || !patternsWithComplexStates.exists[spec.fullyQualifiedName.endsWith(it)] |
140 | ] | 175 | ].toList |
141 | .filter[spec | | 176 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet |
142 | useComplexStates || | ||
143 | !patternsWithComplexStates.exists[spec.fullyQualifiedName.endsWith(it)] | ||
144 | ] | ||
145 | .toList | ||
146 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet | ||
147 | val derivedFeatures = new LinkedHashMap | 177 | val derivedFeatures = new LinkedHashMap |
148 | val res = new ViatraQuerySetDescriptor( | 178 | val res = new ViatraQuerySetDescriptor( |
149 | patterns, | 179 | patterns, |
@@ -152,53 +182,71 @@ class YakinduLoader extends MetamodelLoader{ | |||
152 | ) | 182 | ) |
153 | return res | 183 | return res |
154 | } | 184 | } |
185 | |||
155 | override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { | 186 | override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { |
156 | descriptor.classes.filterByNames([it.name],#["Vertex","Transition","Synchronization"]) | 187 | descriptor.classes.filterByNames([it.name], #["Vertex", "Transition", "Synchronization"]) |
157 | } | 188 | } |
158 | 189 | ||
159 | override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { | 190 | override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { |
160 | descriptor.references.filterByNames([it.name],#["source","target"]) | 191 | descriptor.references.filterByNames([it.name], #["source", "target"]) |
161 | } | 192 | } |
162 | 193 | ||
163 | override loadPartialModel() { | 194 | override loadPartialModel() { |
164 | this.workspace.readModel(EObject,"Yakindu.xmi").eResource.allContents.toList | 195 | this.workspace.readModel(EObject, "Yakindu.xmi").eResource.allContents.toList |
165 | } | 196 | } |
166 | 197 | ||
167 | override additionalConstraints() { //#[] | 198 | override additionalConstraints() { // #[] |
168 | #[[method | new SGraphInconsistencyDetector(method)]] | 199 | #[[method|new SGraphInconsistencyDetector(method)]] |
200 | } | ||
201 | |||
202 | override getTypeQuantiles() { | ||
203 | #{ | ||
204 | "Choice" -> new TypeQuantiles(0.118279569892473, 0.154020979020979), | ||
205 | "Entry" -> new TypeQuantiles(0.0283018867924528, 0.0620167525773196), | ||
206 | "Exit" -> new TypeQuantiles(0, 0), | ||
207 | "FinalState" -> new TypeQuantiles(0, 0), | ||
208 | "Region" -> new TypeQuantiles(0.0294117647058824, 0.0633258678611422), | ||
209 | "State" -> new TypeQuantiles(0.132023636740618, 0.175925925925926), | ||
210 | // "Statechart" -> new TypeQuantiles(0.00961538461538462, 0.010752688172043), | ||
211 | "Transition" -> new TypeQuantiles(0.581632653061224, 0.645161290322581) | ||
212 | } | ||
213 | } | ||
214 | |||
215 | override getHints(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { | ||
216 | #[new SGraphHint(ecore2Logic, trace)] | ||
169 | } | 217 | } |
170 | } | 218 | } |
171 | 219 | ||
172 | class FileSystemLoader extends MetamodelLoader{ | 220 | class FileSystemLoader extends MetamodelLoader { |
173 | 221 | ||
174 | new(ReasonerWorkspace workspace) { | 222 | new(ReasonerWorkspace workspace) { |
175 | super(workspace) | 223 | super(workspace) |
176 | } | 224 | } |
177 | 225 | ||
178 | override loadMetamodel() { | 226 | override loadMetamodel() { |
179 | val package = FilesystemPackage.eINSTANCE | 227 | val package = FilesystemPackage.eINSTANCE |
180 | val List<EClass> classes = package.EClassifiers.filter(EClass).toList | 228 | val List<EClass> classes = package.EClassifiers.filter(EClass).toList |
181 | val List<EEnum> enums = package.EClassifiers.filter(EEnum).toList | 229 | val List<EEnum> enums = package.EClassifiers.filter(EEnum).toList |
182 | val List<EEnumLiteral> literals = enums.map[ELiterals].flatten.toList | 230 | val List<EEnumLiteral> literals = enums.map[ELiterals].flatten.toList |
183 | val List<EReference> references = classes.map[EReferences].flatten.toList | 231 | val List<EReference> references = classes.map[EReferences].flatten.filter[name != "live"].toList |
184 | val List<EAttribute> attributes = classes.map[EAttributes].flatten.toList | 232 | val List<EAttribute> attributes = classes.map[EAttributes].flatten.toList |
185 | return new EcoreMetamodelDescriptor(classes,#{},false,enums,literals,references,attributes) | 233 | return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) |
186 | } | 234 | } |
187 | 235 | ||
188 | override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { | 236 | override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { |
189 | return null | 237 | return null |
190 | } | 238 | } |
191 | 239 | ||
192 | override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { | 240 | override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { |
193 | null | 241 | null |
194 | } | 242 | } |
195 | 243 | ||
196 | override loadQueries(EcoreMetamodelDescriptor metamodel) { | 244 | override loadQueries(EcoreMetamodelDescriptor metamodel) { |
197 | val patternGroup = FileSystem.instance | 245 | val patternGroup = FileSystem.instance |
198 | val patterns = patternGroup.specifications.toList | 246 | val patterns = patternGroup.specifications.toList |
199 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet | 247 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet |
200 | val derivedFeatures = new HashMap | 248 | val derivedFeatures = new HashMap |
201 | derivedFeatures.put(patternGroup.live,metamodel.references.filter[it.name == "live"].head) | 249 | // derivedFeatures.put(patternGroup.live,metamodel.references.filter[it.name == "live"].head) |
202 | return new ViatraQuerySetDescriptor( | 250 | return new ViatraQuerySetDescriptor( |
203 | patterns, | 251 | patterns, |
204 | wfPatterns, | 252 | wfPatterns, |
@@ -206,41 +254,46 @@ class FileSystemLoader extends MetamodelLoader{ | |||
206 | ) | 254 | ) |
207 | 255 | ||
208 | } | 256 | } |
209 | 257 | ||
210 | override loadPartialModel() { | 258 | override loadPartialModel() { |
211 | this.workspace.readModel(EObject,"fs.xmi").eResource.allContents.toList | 259 | this.workspace.readModel(EObject, "fs.xmi").eResource.allContents.toList |
212 | } | 260 | } |
213 | 261 | ||
214 | override additionalConstraints() { | 262 | override additionalConstraints() { |
215 | #[[method | new FileSystemInconsistencyDetector(method)]] | 263 | #[[method|new FileSystemInconsistencyDetector(method)]] |
216 | } | 264 | } |
217 | 265 | ||
218 | } | 266 | } |
219 | 267 | ||
220 | class EcoreLoader extends MetamodelLoader { | 268 | class EcoreLoader extends MetamodelLoader { |
221 | 269 | ||
222 | new(ReasonerWorkspace workspace) { | 270 | new(ReasonerWorkspace workspace) { |
223 | super(workspace) | 271 | super(workspace) |
224 | } | 272 | } |
225 | 273 | ||
226 | override loadMetamodel() { | 274 | override loadMetamodel() { |
227 | val package = EcorePackage.eINSTANCE | 275 | val package = EcorePackage.eINSTANCE |
228 | val List<EClass> classes = package.EClassifiers.filter(EClass).filter[it.name!="EFactory"].toList | 276 | val List<EClass> classes = package.EClassifiers.filter(EClass).filter [ |
277 | it.name != "EFactory" && it.name != "EObject" && it.name != "EResource" | ||
278 | ].toList | ||
229 | val List<EEnum> enums = package.EClassifiers.filter(EEnum).toList | 279 | val List<EEnum> enums = package.EClassifiers.filter(EEnum).toList |
230 | val List<EEnumLiteral> literals = enums.map[ELiterals].flatten.toList | 280 | val List<EEnumLiteral> literals = enums.map[ELiterals].flatten.toList |
231 | val List<EReference> references = classes.map[EReferences].flatten.filter[it.name!="eFactoryInstance"].filter[!it.derived].toList | 281 | val List<EReference> references = classes.map[EReferences].flatten.filter [ |
232 | val List<EAttribute> attributes = #[] //classes.map[EAttributes].flatten.toList | 282 | it.name != "eFactoryInstance" && it.name != "contents" && it.name != "references" && |
233 | return new EcoreMetamodelDescriptor(classes,#{},false,enums,literals,references,attributes) | 283 | it.name != "eGenericType" && it.name != "eGenericSuperTypes" |
284 | ].filter[!it.derived].toList | ||
285 | val List<EAttribute> attributes = #[] // classes.map[EAttributes].flatten.toList | ||
286 | return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) | ||
234 | } | 287 | } |
235 | 288 | ||
236 | override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { | 289 | override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { |
237 | return null | 290 | return null |
238 | } | 291 | } |
239 | 292 | ||
240 | override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { | 293 | override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { |
241 | null | 294 | null |
242 | } | 295 | } |
243 | 296 | ||
244 | override loadQueries(EcoreMetamodelDescriptor metamodel) { | 297 | override loadQueries(EcoreMetamodelDescriptor metamodel) { |
245 | val patternGroup = Ecore.instance | 298 | val patternGroup = Ecore.instance |
246 | val patterns = patternGroup.specifications.toList | 299 | val patterns = patternGroup.specifications.toList |
@@ -253,13 +306,92 @@ class EcoreLoader extends MetamodelLoader { | |||
253 | ) | 306 | ) |
254 | 307 | ||
255 | } | 308 | } |
256 | 309 | ||
257 | override loadPartialModel() { | 310 | override loadPartialModel() { |
258 | this.workspace.readModel(EObject,"ecore.xmi").eResource.allContents.toList | 311 | this.workspace.readModel(EObject, "ecore.xmi").eResource.allContents.toList |
259 | } | 312 | } |
260 | 313 | ||
261 | override additionalConstraints() { | 314 | override additionalConstraints() { |
262 | #[] | 315 | #[] |
263 | } | 316 | } |
317 | |||
318 | override getTypeQuantiles() { | ||
319 | #{ | ||
320 | "EAnnotation" -> new TypeQuantiles(0, 0), | ||
321 | "EAttribute" -> new TypeQuantiles(0.14, 0.300943396226415), | ||
322 | "EClass" -> new TypeQuantiles(0.224014336917563, 0.372881355932203), | ||
323 | "EDataType" -> new TypeQuantiles(0, 0), | ||
324 | "EEnum" -> new TypeQuantiles(0, 0.0275208638045255), | ||
325 | "EEnumLiteral" -> new TypeQuantiles(0, 0.105204907665065), | ||
326 | "EGenericType" -> new TypeQuantiles(0, 0), | ||
327 | "EOperation" -> new TypeQuantiles(0, 0), | ||
328 | "EPackage" -> new TypeQuantiles(0.0119047619047619, 0.0192307692307692), | ||
329 | "EParameter" -> new TypeQuantiles(0, 0), | ||
330 | "EReference" -> new TypeQuantiles(0.217599234815878, 0.406779661016949), | ||
331 | "EStringToStringMapEntry" -> new TypeQuantiles(0, 0), | ||
332 | "ETypeParameter" -> new TypeQuantiles(0, 0) | ||
333 | } | ||
334 | } | ||
335 | |||
336 | } | ||
337 | |||
338 | class SatelliteLoader extends MetamodelLoader { | ||
339 | |||
340 | new(ReasonerWorkspace workspace) { | ||
341 | super(workspace) | ||
342 | } | ||
343 | |||
344 | override loadMetamodel() { | ||
345 | val package = SatellitePackage.eINSTANCE | ||
346 | val List<EClass> classes = package.EClassifiers.filter(EClass).toList | ||
347 | val List<EEnum> enums = package.EClassifiers.filter(EEnum).toList | ||
348 | val List<EEnumLiteral> literals = enums.map[ELiterals].flatten.toList | ||
349 | val List<EReference> references = classes.map[EReferences].flatten.toList | ||
350 | val List<EAttribute> attributes = classes.map[EAttributes].flatten.toList | ||
351 | return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) | ||
352 | } | ||
353 | |||
354 | override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { | ||
355 | null | ||
356 | } | ||
357 | |||
358 | override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { | ||
359 | null | ||
360 | } | ||
361 | |||
362 | override loadQueries(EcoreMetamodelDescriptor metamodel) { | ||
363 | val i = SatelliteQueriesAll.instance | ||
364 | val patterns = i.specifications.toList | ||
365 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet | ||
366 | val derivedFeatures = new LinkedHashMap | ||
367 | val res = new ViatraQuerySetDescriptor( | ||
368 | patterns, | ||
369 | wfPatterns, | ||
370 | derivedFeatures | ||
371 | ) | ||
372 | return res | ||
373 | } | ||
374 | |||
375 | override loadPartialModel() { | ||
376 | this.workspace.readModel(EObject, "satellite.xmi").eResource.allContents.toList | ||
377 | } | ||
378 | |||
379 | override additionalConstraints() { #[] } | ||
380 | |||
381 | override getHints(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { | ||
382 | #[new SatelliteHint(ecore2Logic, trace)] | ||
383 | } | ||
384 | |||
385 | override getTypeQuantiles() { | ||
386 | #{ | ||
387 | "CubeSat3U" -> new TypeQuantiles(0.1, 0.25), | ||
388 | "CubeSat6U" -> new TypeQuantiles(0, 0.25), | ||
389 | "SmallSat" -> new TypeQuantiles(0, 0.15), | ||
390 | "UHFCommSubsystem" -> new TypeQuantiles(0.08, 0.25), | ||
391 | "XCommSubsystem" -> new TypeQuantiles(0.08, 0.25), | ||
392 | "KaCommSubsystem" -> new TypeQuantiles(0, 0.1), | ||
393 | "InterferometryPayload" -> new TypeQuantiles(0.15, 0.25) | ||
394 | } | ||
395 | } | ||
264 | 396 | ||
265 | } \ No newline at end of file | 397 | } |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend new file mode 100644 index 00000000..97ce4ee6 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend | |||
@@ -0,0 +1,46 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | ||
4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator | ||
7 | |||
8 | class SGraphHint extends Ecore2LogicTraceBasedHint { | ||
9 | new(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { | ||
10 | super(ecore2Logic, trace) | ||
11 | } | ||
12 | |||
13 | override getAdditionalPatterns(extension PatternGenerator patternGenerator) { | ||
14 | "" | ||
15 | } | ||
16 | |||
17 | override createConstraintUpdater(LinearTypeExpressionBuilderFactory it) { | ||
18 | val newEntriesWithoutRegionCount = createBuilder.add(1, "Entry".type).add(-1, "Region".type).build | ||
19 | val newStatesWithoutRegionCount = createBuilder.add(1, "State".type).add(-1, "Region".type).build | ||
20 | val newTransitionWithoutNeedsOutgoingCount = createBuilder.add(1, "Transition".type).add(-1, "Entry".type). | ||
21 | add(-1, "Choice".type).build | ||
22 | val newTransitionWithoutNeedsIncomingCount = createBuilder.add(1, "Transition".type).add(-1, "Choice".type). | ||
23 | build | ||
24 | |||
25 | val regionsWithoutEntryMatcher = createMatcher( | ||
26 | "unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_partialsnapshot_mavo_yakindu_noEntryInRegion") | ||
27 | val regionsWithoutStateMatcher = createMatcher( | ||
28 | "unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_partialsnapshot_mavo_yakindu_noStateInRegion") | ||
29 | val entryHasNoOutgoingMatcher = createMatcher( | ||
30 | "unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_partialsnapshot_mavo_yakindu_noOutgoingTransitionFromEntry") | ||
31 | val choiceHasNoOutgoingMatcher = createMatcher( | ||
32 | "unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_partialsnapshot_mavo_yakindu_choiceHasNoOutgoing") | ||
33 | val choiceHasNoIncomingMatcher = createMatcher( | ||
34 | "unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_partialsnapshot_mavo_yakindu_choiceHasNoIncoming") | ||
35 | val transitionWithoutTargetMatcher = createMatcher("unfinishedLowerMultiplicity_target_reference_Transition") | ||
36 | |||
37 | return [ p | | ||
38 | newEntriesWithoutRegionCount.assertEqualsTo(regionsWithoutEntryMatcher.countMatches(p)) | ||
39 | newStatesWithoutRegionCount.tightenLowerBound(regionsWithoutStateMatcher.countMatches(p)) | ||
40 | newTransitionWithoutNeedsOutgoingCount.tightenLowerBound( | ||
41 | entryHasNoOutgoingMatcher.countMatches(p) + choiceHasNoOutgoingMatcher.countMatches(p)) | ||
42 | newTransitionWithoutNeedsIncomingCount.tightenLowerBound( | ||
43 | choiceHasNoIncomingMatcher.countMatches(p) - transitionWithoutTargetMatcher.getCount(p)) | ||
44 | ] | ||
45 | } | ||
46 | } | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend new file mode 100644 index 00000000..e95c0c64 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend | |||
@@ -0,0 +1,86 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | ||
4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | ||
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | ||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator | ||
8 | |||
9 | class SatelliteHint extends Ecore2LogicTraceBasedHint { | ||
10 | static val INTERFEROMETY_PAYLOAD = "hint_interferometryPayload" | ||
11 | static val REMAINING_CONTENTS_KA_COMM_SUBSYSTEM = "hint_kaCommSubsystem" | ||
12 | static val HINT_SPACECRAFT_UHF_POSSIBLE_LINK = "hint_spacecraftWithUhfPossibleLink" | ||
13 | static val HINT_SPACECRAFT_UHF_ONLY_NO_LINK = "hint_spacecraftUhfOnlyNoLink" | ||
14 | |||
15 | new(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { | ||
16 | super(ecore2Logic, trace) | ||
17 | } | ||
18 | |||
19 | override getAdditionalPatterns(PatternGenerator it) ''' | ||
20 | pattern «INTERFEROMETY_PAYLOAD»(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement) { | ||
21 | find interpretation(problem, interpretation); | ||
22 | find mustExist(problem, interpretation, object); | ||
23 | «typeIndexer.referInstanceOf("InterferometryPayload".type, Modality.MUST, "object")» | ||
24 | } | ||
25 | |||
26 | private pattern «REMAINING_CONTENTS_KA_COMM_SUBSYSTEM»_helper(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement, remainingContents:java Integer) { | ||
27 | find remainingContents_commSubsystem_reference_CommunicatingElement_helper(problem, interpretation, object, remainingContents); | ||
28 | «typeIndexer.referInstanceOf("SmallSat".type, Modality.MUST, "object")» | ||
29 | } | ||
30 | |||
31 | pattern «REMAINING_CONTENTS_KA_COMM_SUBSYSTEM»(problem:LogicProblem, interpretation:PartialInterpretation, remainingContents:java Integer) { | ||
32 | find interpretation(problem, interpretation); | ||
33 | remainingContents == sum find «REMAINING_CONTENTS_KA_COMM_SUBSYSTEM»_helper(problem, interpretation, _, #_); | ||
34 | } | ||
35 | |||
36 | private pattern hint_spacecraftNotUhfOnly(problem:LogicProblem, interpretation:PartialInterpretation, spacecraft:DefinedElement) { | ||
37 | find interpretation(problem, interpretation); | ||
38 | find mustExist(problem, interpretation, spacecraft); | ||
39 | «typeIndexer.referInstanceOf("Spacecraft".type, Modality.MUST, "spacecraft")» | ||
40 | «relationDeclarationIndexer.referRelation("CommunicatingElement".relation("commSubsystem"), "spacecraft", "comm", Modality.MAY)» | ||
41 | neg «typeIndexer.referInstanceOf("UHFCommSubsystem".type, Modality.MUST, "comm")» | ||
42 | } | ||
43 | |||
44 | private pattern hint_spacecraftWithUhf(problem:LogicProblem, interpretation:PartialInterpretation, spacecraft:DefinedElement) { | ||
45 | find interpretation(problem, interpretation); | ||
46 | find mustExist(problem, interpretation, spacecraft); | ||
47 | «typeIndexer.referInstanceOf("Spacecraft".type, Modality.MUST, "spacecraft")» | ||
48 | «relationDeclarationIndexer.referRelation("CommunicatingElement".relation("commSubsystem"), "spacecraft", "comm", Modality.MUST)» | ||
49 | «typeIndexer.referInstanceOf("UHFCommSubsystem".type, Modality.MUST, "comm")» | ||
50 | } | ||
51 | |||
52 | pattern «HINT_SPACECRAFT_UHF_POSSIBLE_LINK»(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
53 | find hint_spacecraftWithUhf(problem, interpretation, spacecraft); | ||
54 | find hint_spacecraftNotUhfOnly(problem, interpretation, spacecraft); | ||
55 | } | ||
56 | |||
57 | pattern «HINT_SPACECRAFT_UHF_ONLY_NO_LINK»(problem:LogicProblem, interpretation:PartialInterpretation) { | ||
58 | find interpretation(problem, interpretation); | ||
59 | find mustExist(problem, interpretation, spacecraft); | ||
60 | «typeIndexer.referInstanceOf("Spacecraft".type, Modality.MUST, "spacecraft")» | ||
61 | neg find hint_spacecraftNotUhfOnly(problem, interpretation, spacecraft); | ||
62 | find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noLinkToGroundStation(problem, interpretation, spacecraft); | ||
63 | } | ||
64 | ''' | ||
65 | |||
66 | override createConstraintUpdater(LinearTypeExpressionBuilderFactory it) { | ||
67 | val interferometryPayloadCount = createBuilder.add(1, "InterferometryPayload".type).build | ||
68 | val kaCommSubsystemWithoutSmallSatCount = createBuilder.add(1, "KaCommSubsystem".type).add(-2, "SmallSat".type). | ||
69 | build | ||
70 | val uhfCommSubsystemCount = createBuilder.add(1, "UHFCommSubsystem".type).build | ||
71 | |||
72 | val interferometryPayloadMatcher = createMatcher(INTERFEROMETY_PAYLOAD) | ||
73 | val kaCommSubsystemRemainingContentsMatcher = createMatcher(REMAINING_CONTENTS_KA_COMM_SUBSYSTEM) | ||
74 | val uhfPossibleLinkMatcher = createMatcher(HINT_SPACECRAFT_UHF_POSSIBLE_LINK) | ||
75 | val uhfNoLinkMatcher = createMatcher(HINT_SPACECRAFT_UHF_ONLY_NO_LINK) | ||
76 | |||
77 | return [ p | | ||
78 | interferometryPayloadCount.tightenLowerBound(2 - interferometryPayloadMatcher.countMatches(p)) | ||
79 | kaCommSubsystemWithoutSmallSatCount.tightenUpperBound(kaCommSubsystemRemainingContentsMatcher.getCount(p)) | ||
80 | if (uhfPossibleLinkMatcher.countMatches(p) == 0 && uhfNoLinkMatcher.countMatches(p) >= 1) { | ||
81 | uhfCommSubsystemCount.tightenLowerBound(1) | ||
82 | } | ||
83 | ] | ||
84 | } | ||
85 | |||
86 | } | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/TypeDistributionCalculator.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/TypeDistributionCalculator.xtend new file mode 100644 index 00000000..e2d6e6ca --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/TypeDistributionCalculator.xtend | |||
@@ -0,0 +1,35 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.YakindummPackage | ||
4 | import java.io.File | ||
5 | import org.eclipse.emf.common.util.URI | ||
6 | import org.eclipse.emf.ecore.EPackage | ||
7 | import org.eclipse.emf.ecore.EcorePackage | ||
8 | import org.eclipse.emf.ecore.resource.Resource | ||
9 | import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl | ||
10 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | ||
11 | |||
12 | class TypeDistributionCalculator { | ||
13 | public static def void main(String[] args) { | ||
14 | Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl) | ||
15 | EPackage.Registry.INSTANCE.put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE) | ||
16 | EPackage.Registry.INSTANCE.put(YakindummPackage.eNS_URI, YakindummPackage.eINSTANCE) | ||
17 | |||
18 | println("model,className,count") | ||
19 | val directory = new File(args.get(0)) | ||
20 | for (file : directory.listFiles) { | ||
21 | val modelName = file.name | ||
22 | val resourceSet = new ResourceSetImpl | ||
23 | val resource = resourceSet.getResource(URI.createFileURI(file.absolutePath), true) | ||
24 | val objectsByTypeName = resource.allContents.filter [ obj | | ||
25 | val featureName = obj.eContainingFeature?.name | ||
26 | // Filter out "derived containment" references in Ecore. | ||
27 | // See https://stackoverflow.com/a/46340165 | ||
28 | featureName != "eGenericType" && featureName != "eGenericSuperTypes" | ||
29 | ].groupBy[eClass.name] | ||
30 | for (pair : objectsByTypeName.entrySet) { | ||
31 | println('''«modelName»,«pair.key»,«pair.value.size»''') | ||
32 | } | ||
33 | } | ||
34 | } | ||
35 | } | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScript.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScript.xtend new file mode 100644 index 00000000..5abff962 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScript.xtend | |||
@@ -0,0 +1,70 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run.script | ||
2 | |||
3 | import java.util.List | ||
4 | import org.eclipse.xtend.lib.annotations.Accessors | ||
5 | |||
6 | @Accessors | ||
7 | class MeasurementScript { | ||
8 | String inputPath | ||
9 | String outputPath | ||
10 | int timeout | ||
11 | boolean saveModels | ||
12 | boolean saveTemporaryFiles | ||
13 | int warmupIterations | ||
14 | int iterations | ||
15 | Domain domain | ||
16 | Scope scope | ||
17 | List<Integer> sizes | ||
18 | Solver solver | ||
19 | ScopePropagator scopePropagator | ||
20 | ScopeConstraints propagatedConstraints | ||
21 | PolyhedronSolver polyhedronSolver | ||
22 | ScopeHeuristic scopeHeuristic | ||
23 | |||
24 | def toCsvHeader() { | ||
25 | '''«domain»,«scope»,«solver»,«scopePropagator ?: "NULL"»,«propagatedConstraints ?: "NULL"»,«polyhedronSolver ?: "NULL"»''' | ||
26 | } | ||
27 | } | ||
28 | |||
29 | enum Domain { | ||
30 | fs, | ||
31 | ecore, | ||
32 | Yakindu, | ||
33 | FAM, | ||
34 | satellite | ||
35 | } | ||
36 | |||
37 | enum Scope { | ||
38 | none, | ||
39 | quantiles | ||
40 | } | ||
41 | |||
42 | enum Solver { | ||
43 | ViatraSolver, | ||
44 | AlloySolver | ||
45 | } | ||
46 | |||
47 | enum ScopePropagator { | ||
48 | none, | ||
49 | basic, | ||
50 | polyhedral | ||
51 | } | ||
52 | |||
53 | enum ScopeConstraints { | ||
54 | none, | ||
55 | typeHierarchy, | ||
56 | relations, | ||
57 | hints | ||
58 | } | ||
59 | |||
60 | enum PolyhedronSolver { | ||
61 | Z3Integer, | ||
62 | Z3Real, | ||
63 | Cbc, | ||
64 | Clp | ||
65 | } | ||
66 | |||
67 | enum ScopeHeuristic { | ||
68 | basic, | ||
69 | polyhedral | ||
70 | } | ||
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScriptRunner.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScriptRunner.xtend new file mode 100644 index 00000000..48e750cb --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScriptRunner.xtend | |||
@@ -0,0 +1,351 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.run.script | ||
2 | |||
3 | import com.google.gson.Gson | ||
4 | import hu.bme.mit.inf.dslreasoner.ecore2logic.EClassMapper | ||
5 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic | ||
6 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration | ||
7 | import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel | ||
9 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes | ||
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement | ||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral | ||
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringLiteral | ||
14 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | ||
15 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | ||
16 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | ||
17 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.IntStatisticEntry | ||
18 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicresultFactory | ||
19 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult | ||
20 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.RealStatisticEntry | ||
21 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.Statistics | ||
22 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.StringStatisticEntry | ||
23 | import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore | ||
24 | import hu.bme.mit.inf.dslreasoner.run.EcoreLoader | ||
25 | import hu.bme.mit.inf.dslreasoner.run.FAMLoader | ||
26 | import hu.bme.mit.inf.dslreasoner.run.FileSystemLoader | ||
27 | import hu.bme.mit.inf.dslreasoner.run.MetamodelLoader | ||
28 | import hu.bme.mit.inf.dslreasoner.run.SatelliteLoader | ||
29 | import hu.bme.mit.inf.dslreasoner.run.YakinduLoader | ||
30 | import hu.bme.mit.inf.dslreasoner.util.CollectionsUtil | ||
31 | import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic | ||
32 | import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration | ||
33 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedralScopePropagatorConstraints | ||
34 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedralScopePropagatorSolver | ||
35 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy | ||
36 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic | ||
37 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion | ||
38 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner | ||
39 | import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration | ||
40 | import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace | ||
41 | import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace | ||
42 | import java.io.FileReader | ||
43 | import java.util.HashMap | ||
44 | import java.util.HashSet | ||
45 | import java.util.Map | ||
46 | import java.util.Set | ||
47 | import org.eclipse.emf.ecore.EObject | ||
48 | import org.eclipse.emf.ecore.resource.Resource | ||
49 | import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl | ||
50 | import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageStandaloneSetup | ||
51 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions | ||
52 | import org.eclipse.viatra.query.runtime.rete.matcher.ReteBackendFactory | ||
53 | import org.eclipse.xtend.lib.annotations.Data | ||
54 | |||
55 | class MeasurementScriptRunner { | ||
56 | static val MODEL_SIZE_GAP = 0 | ||
57 | static val SCOPE_PROPAGATOR_TIMEOUT = 10 | ||
58 | static val USEC_TO_MSEC = 1000000 | ||
59 | |||
60 | static extension val LogicresultFactory = LogicresultFactory.eINSTANCE | ||
61 | |||
62 | val MeasurementScript script | ||
63 | val ReasonerWorkspace inputWorkspace | ||
64 | val ReasonerWorkspace outputWorkspace | ||
65 | val MetamodelLoader metamodelLoader | ||
66 | |||
67 | new(MeasurementScript script) { | ||
68 | this.script = script | ||
69 | inputWorkspace = new FileSystemWorkspace(script.inputPath + "/", "") | ||
70 | outputWorkspace = new FileSystemWorkspace(script.outputPath + | ||
71 | "/", '''«script.domain»_«script.solver»_«script.scope»_«script.scopePropagator ?: "na"»_«script.propagatedConstraints ?: "na"»_«script.polyhedronSolver ?: "na"»_''') | ||
72 | metamodelLoader = switch (script.domain) { | ||
73 | case fs: new FileSystemLoader(inputWorkspace) | ||
74 | case ecore: new EcoreLoader(inputWorkspace) | ||
75 | case Yakindu: new YakinduLoader(inputWorkspace) => [useSynchronization = false; useComplexStates = true] | ||
76 | case FAM: new FAMLoader(inputWorkspace) | ||
77 | case satellite: new SatelliteLoader(inputWorkspace) | ||
78 | default: throw new IllegalArgumentException("Unsupported domain: " + script.domain) | ||
79 | } | ||
80 | } | ||
81 | |||
82 | def run() { | ||
83 | if (script.sizes.empty) { | ||
84 | return | ||
85 | } | ||
86 | val start = System.currentTimeMillis | ||
87 | val warmupSize = script.sizes.head | ||
88 | for (var int i = 0; i < script.warmupIterations; i++) { | ||
89 | System.err.println('''Warmup «i + 1»/«script.warmupIterations»...''') | ||
90 | runExperiment(warmupSize) | ||
91 | } | ||
92 | val warmupEnd = System.currentTimeMillis | ||
93 | System.err.println('''Warmup completed in «(warmupEnd - start) / 1000» seconds''') | ||
94 | for (size : script.sizes) { | ||
95 | var int failures = 0 | ||
96 | for (var int i = 0; i < script.iterations; i++) { | ||
97 | System.err.println("Running GC...") | ||
98 | runGc() | ||
99 | System.err.println('''Iteration «i + 1»/«script.iterations» of size «size»...''') | ||
100 | val startTime = System.currentTimeMillis | ||
101 | val result = runExperiment(size) | ||
102 | val headerPrefix = '''«script.toCsvHeader»,«size»,«i + 1»,«result.resultName»''' | ||
103 | println('''«headerPrefix»,startTime,«startTime»''') | ||
104 | println('''«headerPrefix»,logic2SolverTransformationTime,«result.statistics.transformationTime»''') | ||
105 | println('''«headerPrefix»,solverTime,«result.statistics.solverTime»''') | ||
106 | for (statistic : result.statistics.entries) { | ||
107 | val valueString = switch (statistic) { | ||
108 | IntStatisticEntry: statistic.value.toString | ||
109 | RealStatisticEntry: statistic.value.toString | ||
110 | StringStatisticEntry: statistic.value.toString | ||
111 | default: statistic.toString | ||
112 | } | ||
113 | println('''«headerPrefix»,«statistic.name»,«valueString»''') | ||
114 | } | ||
115 | if (script.saveModels && result.model !== null) { | ||
116 | outputWorkspace.writeModel(result.model, '''«size»_«i + 1».xmi''') | ||
117 | } | ||
118 | if (result.resultName === "InsuficientResourcesResultImpl") { | ||
119 | failures++ | ||
120 | } | ||
121 | System.out.flush | ||
122 | } | ||
123 | if (failures == script.iterations) { | ||
124 | System.err.println("All measurements failed") | ||
125 | return | ||
126 | } | ||
127 | } | ||
128 | val end = System.currentTimeMillis | ||
129 | System.err.println('''Measurement completed in «(end - start) / 1000» seconds''') | ||
130 | } | ||
131 | |||
132 | private static def void runGc() { | ||
133 | System.gc | ||
134 | Thread.sleep(100) | ||
135 | System.gc | ||
136 | Thread.sleep(100) | ||
137 | System.gc | ||
138 | Thread.sleep(800) | ||
139 | } | ||
140 | |||
141 | private def runExperiment(int modelSize) { | ||
142 | if (script.solver != Solver.ViatraSolver) { | ||
143 | throw new IllegalArgumentException("Only VIATRA-Generator is supported") | ||
144 | } | ||
145 | val config = new ViatraReasonerConfiguration | ||
146 | config.solutionScope.numberOfRequiredSolutions = 1 | ||
147 | config.scopePropagatorStrategy = switch (script.scopePropagator) { | ||
148 | case none: | ||
149 | ScopePropagatorStrategy.None | ||
150 | case basic: | ||
151 | switch (script.propagatedConstraints) { | ||
152 | case none: | ||
153 | ScopePropagatorStrategy.Basic | ||
154 | case typeHierarchy: | ||
155 | ScopePropagatorStrategy.BasicTypeHierarchy | ||
156 | case relations, | ||
157 | case hints: | ||
158 | throw new IllegalArgumentException( | ||
159 | "Basic scope propagator does not support relational and hint constraints") | ||
160 | default: | ||
161 | throw new IllegalArgumentException("Unknown scope constraints: " + script.propagatedConstraints) | ||
162 | } | ||
163 | case polyhedral: { | ||
164 | val constraints = switch (script.propagatedConstraints) { | ||
165 | case none: | ||
166 | throw new IllegalArgumentException( | ||
167 | "Polyhedral scope propagator needs at least type hierarchy constraints") | ||
168 | case typeHierarchy: | ||
169 | PolyhedralScopePropagatorConstraints.TypeHierarchy | ||
170 | case relations, | ||
171 | case hints: | ||
172 | PolyhedralScopePropagatorConstraints.Relational | ||
173 | default: | ||
174 | throw new IllegalArgumentException("Unknown scope constraints: " + script.propagatedConstraints) | ||
175 | } | ||
176 | val polyhedronSolver = switch (script.polyhedronSolver) { | ||
177 | case Z3Integer: PolyhedralScopePropagatorSolver.Z3Integer | ||
178 | case Z3Real: PolyhedralScopePropagatorSolver.Z3Real | ||
179 | case Cbc: PolyhedralScopePropagatorSolver.Cbc | ||
180 | case Clp: PolyhedralScopePropagatorSolver.Clp | ||
181 | default: throw new IllegalArgumentException("Unknown polyhedron solver: " + script.polyhedronSolver) | ||
182 | } | ||
183 | val updateHeuristic = script.scopeHeuristic != ScopeHeuristic.basic | ||
184 | new ScopePropagatorStrategy.Polyhedral(constraints, polyhedronSolver, updateHeuristic, | ||
185 | SCOPE_PROPAGATOR_TIMEOUT) | ||
186 | } | ||
187 | default: | ||
188 | throw new IllegalArgumentException("Unknown scope propagator: " + script.scopePropagator) | ||
189 | } | ||
190 | config.runtimeLimit = script.timeout | ||
191 | config.documentationLevel = if(script.saveTemporaryFiles) DocumentationLevel.NORMAL else DocumentationLevel.NONE | ||
192 | config.debugConfiguration.partialInterpretatioVisualiser = null | ||
193 | config.searchSpaceConstraints.additionalGlobalConstraints += metamodelLoader.additionalConstraints | ||
194 | |||
195 | val modelLoadingStart = System.nanoTime | ||
196 | val metamodelDescriptor = metamodelLoader.loadMetamodel | ||
197 | val partialModelDescriptor = metamodelLoader.loadPartialModel | ||
198 | val queryDescriptor = metamodelLoader.loadQueries(metamodelDescriptor) | ||
199 | val modelLoadingTime = System.nanoTime - modelLoadingStart | ||
200 | |||
201 | val domain2LogicTransformationStart = System.nanoTime | ||
202 | val Ecore2Logic ecore2Logic = new Ecore2Logic | ||
203 | val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic) | ||
204 | val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic | ||
205 | var modelGeneration = ecore2Logic.transformMetamodel(metamodelDescriptor, new Ecore2LogicConfiguration()) | ||
206 | var problem = modelGeneration.output | ||
207 | problem = instanceModel2Logic.transform( | ||
208 | modelGeneration, | ||
209 | partialModelDescriptor | ||
210 | ).output | ||
211 | problem = viatra2Logic.transformQueries( | ||
212 | queryDescriptor, | ||
213 | modelGeneration, | ||
214 | new Viatra2LogicConfiguration | ||
215 | ).output | ||
216 | initializeScope(config, modelSize, problem, ecore2Logic, modelGeneration.trace) | ||
217 | if (script.propagatedConstraints == ScopeConstraints.hints) { | ||
218 | config.hints = metamodelLoader.getHints(ecore2Logic, modelGeneration.trace) | ||
219 | } | ||
220 | val domain2LogicTransformationTime = System.nanoTime - domain2LogicTransformationStart | ||
221 | |||
222 | if (config.documentationLevel != DocumentationLevel.NONE) { | ||
223 | outputWorkspace.writeModel(problem, "initial.logicproblem") | ||
224 | } | ||
225 | |||
226 | val solver = new ViatraReasoner | ||
227 | val result = solver.solve(problem, config, outputWorkspace) | ||
228 | val statistics = result.statistics | ||
229 | statistics.entries += createIntStatisticEntry => [ | ||
230 | name = "modelLoadingTime" | ||
231 | value = (modelLoadingTime / USEC_TO_MSEC) as int | ||
232 | ] | ||
233 | statistics.entries += createIntStatisticEntry => [ | ||
234 | name = "domain2LogicTransformationTime" | ||
235 | value = (domain2LogicTransformationTime / USEC_TO_MSEC) as int | ||
236 | ] | ||
237 | var EObject modelResult = null | ||
238 | if (result instanceof ModelResult) { | ||
239 | val intepretations = solver.getInterpretations(result) | ||
240 | if (intepretations.size != 1) { | ||
241 | throw new IllegalStateException("Expected 1 interpretation, got " + intepretations.size) | ||
242 | } | ||
243 | var resultTransformationStart = System.nanoTime | ||
244 | val logic2Ecore = new Logic2Ecore(ecore2Logic) | ||
245 | modelResult = logic2Ecore.transformInterpretation(intepretations.head, modelGeneration.trace) | ||
246 | val resultTransformationTime = System.nanoTime - resultTransformationStart | ||
247 | statistics.entries += createIntStatisticEntry => [ | ||
248 | name = "ecore2LogicTransformationTime" | ||
249 | value = (resultTransformationTime / USEC_TO_MSEC) as int | ||
250 | ] | ||
251 | } | ||
252 | |||
253 | new ExperimentResult(result.class.simpleName, statistics, modelResult) | ||
254 | } | ||
255 | |||
256 | private def initializeScope(ViatraReasonerConfiguration config, int modelSize, LogicProblem problem, | ||
257 | EClassMapper eClassMapper, Ecore2Logic_Trace trace) { | ||
258 | val knownElements = initializeKnownElements(problem, config.typeScopes) | ||
259 | if (modelSize < 0) { | ||
260 | config.typeScopes.minNewElements = 0 | ||
261 | config.typeScopes.maxNewElements = TypeScopes.Unlimited | ||
262 | } else { | ||
263 | val numberOfKnownElements = knownElements.values.flatten.toSet.size | ||
264 | val newElementCount = modelSize - numberOfKnownElements | ||
265 | config.typeScopes.minNewElements = newElementCount | ||
266 | config.typeScopes.maxNewElements = newElementCount + MODEL_SIZE_GAP | ||
267 | } | ||
268 | switch (script.scope) { | ||
269 | case none: | ||
270 | return | ||
271 | case quantiles: { | ||
272 | val quantiles = metamodelLoader.typeQuantiles | ||
273 | for (eClassInScope : eClassMapper.allClassesInScope(trace)) { | ||
274 | val quantile = quantiles.get(eClassInScope.name) | ||
275 | if (quantile !== null) { | ||
276 | val type = eClassMapper.TypeofEClass(trace, eClassInScope) | ||
277 | val knownInstances = knownElements.get(type) | ||
278 | val currentCount = if(knownInstances === null) 0 else knownInstances.size | ||
279 | val lowCount = Math.floor(modelSize * quantile.low) as int | ||
280 | val highCount = Math.ceil((modelSize + MODEL_SIZE_GAP) * quantile.high) as int | ||
281 | config.typeScopes.minNewElementsByType.put(type, lowCount - currentCount) | ||
282 | config.typeScopes.maxNewElementsByType.put(type, highCount - currentCount) | ||
283 | } | ||
284 | } | ||
285 | } | ||
286 | default: | ||
287 | throw new IllegalArgumentException("Unknown scope: " + script.scope) | ||
288 | } | ||
289 | } | ||
290 | |||
291 | /* | ||
292 | * Copied from hu.bme.mit.inf.dslreasoner.application.execution.ScopeLoader.initialiseknownElements(LogicProblem, TypeScopes) | ||
293 | */ | ||
294 | private static def initializeKnownElements(LogicProblem p, TypeScopes s) { | ||
295 | val Map<Type, Set<DefinedElement>> res = new HashMap | ||
296 | |||
297 | // 1. fill map with every types | ||
298 | for (t : p.types) { | ||
299 | res.put(t, new HashSet) | ||
300 | } | ||
301 | |||
302 | // 2. fill map with every objects | ||
303 | for (definedType : p.types.filter(TypeDefinition)) { | ||
304 | val supertypes = CollectionsUtil.<Type>transitiveClosureStar(definedType)[supertypes] | ||
305 | for (supertype : supertypes) { | ||
306 | for (element : definedType.elements) { | ||
307 | res.get(supertype).add(element) | ||
308 | } | ||
309 | } | ||
310 | } | ||
311 | val partialModelContents = p.annotations.filter(PartialModelRelation2Assertion).map[target].toList.map [ | ||
312 | eAllContents.toIterable | ||
313 | ].flatten.toList | ||
314 | s.knownIntegers += partialModelContents.filter(IntLiteral).map[it.value] | ||
315 | s.knownReals += partialModelContents.filter(RealLiteral).map[it.value] | ||
316 | s.knownStrings += partialModelContents.filter(StringLiteral).map[it.value] | ||
317 | |||
318 | res | ||
319 | } | ||
320 | |||
321 | public static def void main(String[] args) { | ||
322 | if (args.length != 1) { | ||
323 | System.err.println("Missing measurement script name.") | ||
324 | System.exit(-1) | ||
325 | } | ||
326 | EMFPatternLanguageStandaloneSetup.doSetup | ||
327 | ViatraQueryEngineOptions.setSystemDefaultBackends(ReteBackendFactory.INSTANCE, ReteBackendFactory.INSTANCE, | ||
328 | ReteBackendFactory.INSTANCE) | ||
329 | Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl) | ||
330 | val config = readConfig(args.get(0)) | ||
331 | val runnner = new MeasurementScriptRunner(config) | ||
332 | runnner.run() | ||
333 | } | ||
334 | |||
335 | static def readConfig(String scriptPath) { | ||
336 | val gson = new Gson | ||
337 | val reader = new FileReader(scriptPath) | ||
338 | try { | ||
339 | gson.fromJson(reader, MeasurementScript) | ||
340 | } finally { | ||
341 | reader.close | ||
342 | } | ||
343 | } | ||
344 | |||
345 | @Data | ||
346 | private static class ExperimentResult { | ||
347 | String resultName | ||
348 | Statistics statistics | ||
349 | EObject model | ||
350 | } | ||
351 | } | ||