aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kris7topher@gmail.com>2019-08-14 18:26:33 +0200
committerLibravatar Kristóf Marussy <kris7topher@gmail.com>2019-08-14 18:26:33 +0200
commitfc84d3fe670331bc89fb1e4c44104bc1fc811438 (patch)
tree466da8333151c51d2e17075600f9452ed35835da /Solvers
parentBe more lenient with rounding IP solver results (diff)
downloadVIATRA-Generator-fc84d3fe670331bc89fb1e4c44104bc1fc811438.tar.gz
VIATRA-Generator-fc84d3fe670331bc89fb1e4c44104bc1fc811438.tar.zst
VIATRA-Generator-fc84d3fe670331bc89fb1e4c44104bc1fc811438.zip
Measurements WIP
Diffstat (limited to 'Solvers')
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend35
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend30
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagator.xtend106
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronSolver.xtend72
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/RelationConstraintCalculator.xtend5
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend25
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagatorStrategy.xtend11
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/TypeHierarchyScopePropagator.xtend20
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/Z3PolyhedronSolver.xtend32
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend18
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend6
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend26
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend15
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java24
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java60
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/Scope.java24
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BooleanElementImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/IntegerElementImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java6
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java1
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialComplexTypeInterpretationImpl.java3
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java73
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java7
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java19
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java88
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PrimitiveElementImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RealElementImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java64
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/StringElementImpl.java4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore6
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel14
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend8
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodOptions.xtend4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend29
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend25
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend3
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BasicScopeGlobalConstraint.xtend103
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend2
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend4
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend34
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend11
50 files changed, 930 insertions, 125 deletions
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
5import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem 5import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem
6import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery 6import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery
7import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.CbcPolyhedronSolver 7import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.CbcPolyhedronSolver
8import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint
8import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.MultiplicityGoalConstraintCalculator 9import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.MultiplicityGoalConstraintCalculator
9import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronScopePropagator 10import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronScopePropagator
10import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraintCalculator 11import 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 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality
2
3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type
4import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator
5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
6import org.eclipse.viatra.query.runtime.api.IPatternMatch
7import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher
8
9interface LinearTypeExpressionBuilderFactory {
10 def ViatraQueryMatcher<? extends IPatternMatch> createMatcher(String queryName)
11
12 def LinearTypeExpressionBuilder createBuilder()
13}
14
15interface LinearTypeExpressionBuilder {
16 def LinearTypeExpressionBuilder add(int scale, Type type)
17
18 def LinearBoundedExpression build()
19}
20
21@FunctionalInterface
22interface RelationConstraintUpdater {
23 def void update(PartialInterpretation p)
24}
25
26interface 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 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality 1package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality
2 2
3import com.google.common.cache.Cache
4import com.google.common.cache.CacheBuilder
3import com.google.common.collect.ImmutableList 5import com.google.common.collect.ImmutableList
4import com.google.common.collect.ImmutableMap 6import com.google.common.collect.ImmutableMap
5import com.google.common.collect.ImmutableSet 7import com.google.common.collect.ImmutableSet
@@ -15,6 +17,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par
15import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope 17import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope
16import java.util.ArrayDeque 18import java.util.ArrayDeque
17import java.util.ArrayList 19import java.util.ArrayList
20import java.util.Collection
18import java.util.HashMap 21import java.util.HashMap
19import java.util.HashSet 22import java.util.HashSet
20import java.util.List 23import java.util.List
@@ -29,26 +32,33 @@ import org.eclipse.viatra.query.runtime.emf.EMFScope
29import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor 32import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
30 33
31class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { 34class 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
3import java.util.List 3import java.util.List
4import java.util.Map 4import java.util.Map
5import org.eclipse.xtend.lib.annotations.Accessors 5import org.eclipse.xtend.lib.annotations.Accessors
6import org.eclipse.xtend.lib.annotations.Data
6import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor 7import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
7 8
8interface PolyhedronSolver { 9interface 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
101abstract 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
15class ScopePropagator { 15class 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
18abstract class ScopePropagatorStrategy { 18abstract 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
13import java.math.MathContext 13import java.math.MathContext
14import java.math.RoundingMode 14import java.math.RoundingMode
15import java.util.Map 15import java.util.Map
16import org.eclipse.xtend.lib.annotations.Accessors
16import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor 17import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
17 18
18class Z3PolyhedronSolver implements PolyhedronSolver { 19class 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
41class 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
35class Z3SaturationOperator extends AbstractPolyhedronSaturationOperator { 59class 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
16import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality 16import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality
17import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult 17import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult
18import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod 18import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod
19import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint
19import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraints 20import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraints
21import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy
20import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation 22import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
23import java.util.Collection
21import java.util.HashMap 24import java.util.HashMap
22import java.util.Map 25import java.util.Map
23import org.eclipse.emf.ecore.EAttribute 26import org.eclipse.emf.ecore.EAttribute
@@ -26,7 +29,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery
26import org.eclipse.xtend.lib.annotations.Accessors 29import org.eclipse.xtend.lib.annotations.Accessors
27 30
28import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* 31import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.*
29import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy
30 32
31class PatternGenerator { 33class 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
26import org.eclipse.xtend.lib.annotations.Data 26import org.eclipse.xtend.lib.annotations.Data
27 27
28import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* 28import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.*
29import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint
29 30
30@Data 31@Data
31class GeneratedPatterns { 32class 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 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns 1package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns
2 2
3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration
3import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem 4import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem
4import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality 5import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality
5import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationMultiplicityConstraint 6import 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
9class NeighbourhoodOptions { 9class 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
6class PartialInterpretation2Hash extends PartialInterpretation2NeighbourhoodRepresentation<Integer, Integer>{ 6class 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 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder 1package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder
2 2
3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement 3import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement
4import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.AbstractNodeDescriptor
5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodOptions 4import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodOptions
5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2Hash
6import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice 6import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice
7import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2NeighbourhoodRepresentation
7import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation 8import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
8import java.util.ArrayList 9import java.util.ArrayList
9import java.util.Map 10import 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
26class NeighbourhoodBasedPartialInterpretationStateCoder extends AbstractNeighbourhoodBasedPartialInterpretationStateCoder { 26class 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
39class 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
12import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicresultFactory 12import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicresultFactory
13import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult 13import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult
14import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider 14import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider
15import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy
15import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.PartialInterpretationInitialiser 16import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.PartialInterpretationInitialiser
16import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation 17import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
17import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage 18import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage
18import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.AbstractNeighbourhoodBasedStateCoderFactory 19import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.AbstractNeighbourhoodBasedStateCoderFactory
19import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.IdentifierBasedStateCoderFactory 20import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.IdentifierBasedStateCoderFactory
21import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.NeighbourhoodBasedHashStateCoderFactory
20import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.PairwiseNeighbourhoodBasedStateCoderFactory 22import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.PairwiseNeighbourhoodBasedStateCoderFactory
23import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BasicScopeGlobalConstraint
21import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BestFirstStrategyForModelGeneration 24import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BestFirstStrategyForModelGeneration
22import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.DiversityChecker 25import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.DiversityChecker
23import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.InconsistentScopeGlobalConstraint 26import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.InconsistentScopeGlobalConstraint
@@ -39,7 +42,6 @@ import org.eclipse.viatra.dse.api.DesignSpaceExplorer
39import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel 42import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel
40import org.eclipse.viatra.dse.solutionstore.SolutionStore 43import org.eclipse.viatra.dse.solutionstore.SolutionStore
41import org.eclipse.viatra.dse.statecode.IStateCoderFactory 44import org.eclipse.viatra.dse.statecode.IStateCoderFactory
42import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.NeighbourhoodBasedStateCoderFactory
43 45
44class ViatraReasoner extends LogicReasoner { 46class 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
16import java.util.List 16import java.util.List
17import java.util.Set 17import java.util.Set
18import org.eclipse.xtext.xbase.lib.Functions.Function1 18import org.eclipse.xtext.xbase.lib.Functions.Function1
19import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint
19 20
20enum StateCoderStrategy { 21enum 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 @@
1package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
2
3import com.google.common.collect.ImmutableList
4import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
5import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation
6import java.util.Comparator
7import java.util.List
8import org.eclipse.viatra.dse.base.ThreadContext
9import org.eclipse.viatra.dse.objectives.Comparators
10import org.eclipse.viatra.dse.objectives.IGlobalConstraint
11import org.eclipse.viatra.dse.objectives.IObjective
12import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
13
14class 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
14class UnfinishedWFObjective implements IObjective { 14class 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) {