diff options
author | OszkarSemerath <oszkar.semerath@gmail.com> | 2018-06-25 00:16:48 +0200 |
---|---|---|
committer | OszkarSemerath <oszkar.semerath@gmail.com> | 2018-06-25 00:16:48 +0200 |
commit | 6bd475a3eced9d9a912f76e24f91d2ad8da13d54 (patch) | |
tree | 66b3fbfb52e204d605225d1eac7e371eecea791e /Solvers | |
parent | Fixing multiple "true" and "false" objects (diff) | |
download | VIATRA-Generator-6bd475a3eced9d9a912f76e24f91d2ad8da13d54.tar.gz VIATRA-Generator-6bd475a3eced9d9a912f76e24f91d2ad8da13d54.tar.zst VIATRA-Generator-6bd475a3eced9d9a912f76e24f91d2ad8da13d54.zip |
Fixing multiple true/false + bug preventing generation without PS
Diffstat (limited to 'Solvers')
16 files changed, 363 insertions, 83 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend index 2dae95be..dce04a7f 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeIndexer.xtend | |||
@@ -80,6 +80,11 @@ class GenericTypeIndexer extends TypeIndexer { | |||
80 | Type.isAbstract(dynamic,false); | 80 | Type.isAbstract(dynamic,false); |
81 | } | 81 | } |
82 | 82 | ||
83 | |||
84 | private pattern isPrimitive(element: PrimitiveElement) { | ||
85 | PrimitiveElement(element); | ||
86 | } | ||
87 | |||
83 | private pattern possibleDynamicType(problem: LogicProblem, interpretation:PartialInterpretation, dynamic:Type, element:DefinedElement) | 88 | private pattern possibleDynamicType(problem: LogicProblem, interpretation:PartialInterpretation, dynamic:Type, element:DefinedElement) |
84 | // case 1: element is defined at least once | 89 | // case 1: element is defined at least once |
85 | { | 90 | { |
@@ -94,6 +99,8 @@ class GenericTypeIndexer extends TypeIndexer { | |||
94 | neg find dynamicTypeIsSubtypeOfANonDefinition(problem,interpretation,element,dynamic); | 99 | neg find dynamicTypeIsSubtypeOfANonDefinition(problem,interpretation,element,dynamic); |
95 | // 4: T is not abstract | 100 | // 4: T is not abstract |
96 | Type.isAbstract(dynamic,false); | 101 | Type.isAbstract(dynamic,false); |
102 | // 5. element is not primitive datatype | ||
103 | neg find isPrimitive(element); | ||
97 | } or | 104 | } or |
98 | // case 2: element is not defined anywhere | 105 | // case 2: element is not defined anywhere |
99 | { | 106 | { |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeRefinementGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeRefinementGenerator.xtend index 1aa3b955..2e03d6ed 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeRefinementGenerator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/GenericTypeRefinementGenerator.xtend | |||
@@ -28,7 +28,7 @@ class GenericTypeRefinementGenerator extends TypeRefinementGenerator { | |||
28 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | 28 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) |
29 | «FOR type :containment.typesOrderedInHierarchy SEPARATOR "or"»{ | 29 | «FOR type :containment.typesOrderedInHierarchy SEPARATOR "or"»{ |
30 | find interpretation(problem,interpretation); | 30 | find interpretation(problem,interpretation); |
31 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"root")» | 31 | «base.typeIndexer.referInstanceOf(type,Modality.MUST,"root")» |
32 | find mustExist(problem, interpretation, root); | 32 | find mustExist(problem, interpretation, root); |
33 | }«ENDFOR» | 33 | }«ENDFOR» |
34 | «FOR type:newObjectTypes» | 34 | «FOR type:newObjectTypes» |
@@ -37,7 +37,7 @@ class GenericTypeRefinementGenerator extends TypeRefinementGenerator { | |||
37 | «IF inverseRelations.containsKey(containmentRelation)» | 37 | «IF inverseRelations.containsKey(containmentRelation)» |
38 | pattern «this.patternName(containmentRelation,inverseRelations.get(containmentRelation),type)»( | 38 | pattern «this.patternName(containmentRelation,inverseRelations.get(containmentRelation),type)»( |
39 | problem:LogicProblem, interpretation:PartialInterpretation, | 39 | problem:LogicProblem, interpretation:PartialInterpretation, |
40 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation ,typeInterpretation:PartialTypeInterpratation, | 40 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation ,typeInterpretation:PartialComplexTypeInterpretation, |
41 | container:DefinedElement) | 41 | container:DefinedElement) |
42 | { | 42 | { |
43 | find interpretation(problem,interpretation); | 43 | find interpretation(problem,interpretation); |
@@ -56,7 +56,7 @@ class GenericTypeRefinementGenerator extends TypeRefinementGenerator { | |||
56 | «ELSE» | 56 | «ELSE» |
57 | pattern «this.patternName(containmentRelation,null,type)»( | 57 | pattern «this.patternName(containmentRelation,null,type)»( |
58 | problem:LogicProblem, interpretation:PartialInterpretation, | 58 | problem:LogicProblem, interpretation:PartialInterpretation, |
59 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialTypeInterpratation, | 59 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, |
60 | container:DefinedElement) | 60 | container:DefinedElement) |
61 | { | 61 | { |
62 | find interpretation(problem,interpretation); | 62 | find interpretation(problem,interpretation); |
@@ -74,7 +74,7 @@ class GenericTypeRefinementGenerator extends TypeRefinementGenerator { | |||
74 | «ENDFOR» | 74 | «ENDFOR» |
75 | pattern «patternName(null,null,type)»( | 75 | pattern «patternName(null,null,type)»( |
76 | problem:LogicProblem, interpretation:PartialInterpretation, | 76 | problem:LogicProblem, interpretation:PartialInterpretation, |
77 | typeInterpretation:PartialTypeInterpratation) | 77 | typeInterpretation:PartialComplexTypeInterpretation) |
78 | { | 78 | { |
79 | find interpretation(problem,interpretation); | 79 | find interpretation(problem,interpretation); |
80 | neg find hasElementInContainment(problem,interpretation); | 80 | neg find hasElementInContainment(problem,interpretation); |
@@ -87,7 +87,7 @@ class GenericTypeRefinementGenerator extends TypeRefinementGenerator { | |||
87 | «ELSE» | 87 | «ELSE» |
88 | pattern createObject_«this.patternName(null,null,type)»( | 88 | pattern createObject_«this.patternName(null,null,type)»( |
89 | problem:LogicProblem, interpretation:PartialInterpretation, | 89 | problem:LogicProblem, interpretation:PartialInterpretation, |
90 | typeInterpretation:PartialTypeInterpratation) | 90 | typeInterpretation:PartialComplexTypeInterpretation) |
91 | { | 91 | { |
92 | find interpretation(problem,interpretation); | 92 | find interpretation(problem,interpretation); |
93 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | 93 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); |
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 001ff13f..0fed5c76 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 | |||
@@ -163,35 +163,35 @@ class PatternGenerator { | |||
163 | ////////// | 163 | ////////// |
164 | // 0. Util | 164 | // 0. Util |
165 | ////////// | 165 | ////////// |
166 | private pattern interpretation(problem:LogicProblem, interpetation:PartialInterpretation) { | 166 | private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { |
167 | PartialInterpretation.problem(interpetation,problem); | 167 | PartialInterpretation.problem(interpretation,problem); |
168 | } | 168 | } |
169 | 169 | ||
170 | ///////////////////////// | 170 | ///////////////////////// |
171 | // 0.1 Existence | 171 | // 0.1 Existence |
172 | ///////////////////////// | 172 | ///////////////////////// |
173 | private pattern mustExist(problem:LogicProblem, interpetation:PartialInterpretation, element:DefinedElement) { | 173 | private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { |
174 | find interpretation(problem,interpetation); | 174 | find interpretation(problem,interpretation); |
175 | LogicProblem.elements(problem,element); | 175 | LogicProblem.elements(problem,element); |
176 | } or { | 176 | } or { |
177 | find interpretation(problem,interpetation); | 177 | find interpretation(problem,interpretation); |
178 | PartialInterpretation.newElements(interpetation,element); | 178 | PartialInterpretation.newElements(interpretation,element); |
179 | } | 179 | } |
180 | 180 | ||
181 | private pattern mayExist(problem:LogicProblem, interpetation:PartialInterpretation, element:DefinedElement) { | 181 | private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { |
182 | find mustExist(problem,interpetation,element); | 182 | find mustExist(problem,interpretation,element); |
183 | } or { | 183 | } or { |
184 | find interpretation(problem,interpetation); | 184 | find interpretation(problem,interpretation); |
185 | neg find elementCloseWorld(interpetation); | 185 | neg find elementCloseWorld(element); |
186 | PartialInterpretation.openWorldElements(interpetation,element); | 186 | PartialInterpretation.openWorldElements(interpretation,element); |
187 | } | 187 | } |
188 | 188 | ||
189 | private pattern elementCloseWorld(element:DefinedElement) { | 189 | private pattern elementCloseWorld(element:DefinedElement) { |
190 | PartialInterpretation.newElements(i,element); | 190 | PartialInterpretation.newElements(i,element); |
191 | PartialInterpretation.maxNewElements(i,0); | 191 | PartialInterpretation.maxNewElements(i,0); |
192 | } or { | 192 | } or { |
193 | Scope.targetTypeInterpretation(scope,interpetation); | 193 | Scope.targetTypeInterpretation(scope,interpretation); |
194 | PartialTypeInterpratation.elements(interpetation,element); | 194 | PartialTypeInterpratation.elements(interpretation,element); |
195 | Scope.maxNewElements(scope,0); | 195 | Scope.maxNewElements(scope,0); |
196 | } | 196 | } |
197 | 197 | ||
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexer.xtend index 630fad51..d1d57189 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexer.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexer.xtend | |||
@@ -11,6 +11,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference | |||
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntTypeReference | 11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntTypeReference |
12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealTypeReference | 12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealTypeReference |
13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringTypeReference | 13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringTypeReference |
14 | import java.math.BigDecimal | ||
14 | 15 | ||
15 | abstract class TypeIndexer { | 16 | abstract class TypeIndexer { |
16 | public def CharSequence getRequiredQueries() | 17 | public def CharSequence getRequiredQueries() |
@@ -34,5 +35,18 @@ abstract class TypeIndexer { | |||
34 | public def dispatch CharSequence referInstanceOfByReference(StringTypeReference reference, Modality modality, String variableName) { | 35 | public def dispatch CharSequence referInstanceOfByReference(StringTypeReference reference, Modality modality, String variableName) { |
35 | '''StringElement(«variableName»);''' | 36 | '''StringElement(«variableName»);''' |
36 | } | 37 | } |
38 | public def dispatch CharSequence referPrimitiveValue(String variableName, Boolean value) { | ||
39 | '''BooleanElement.value(«variableName»,«value»);''' | ||
40 | } | ||
41 | public def dispatch CharSequence referPrimitiveValue(String variableName, Integer value) { | ||
42 | '''IntegerElement.value(«variableName»,«value»);''' | ||
43 | } | ||
44 | public def dispatch CharSequence referPrimitiveValue(String variableName, BigDecimal value) { | ||
45 | '''RealElement.value(«variableName»,«value»);''' | ||
46 | } | ||
47 | ///TODO: de-escaping string literals | ||
48 | public def dispatch CharSequence referPrimitiveValue(String variableName, String value) { | ||
49 | '''StringElement.value(«variableName»,"«value»");''' | ||
50 | } | ||
37 | 51 | ||
38 | } \ No newline at end of file | 52 | } \ No newline at end of file |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend index 7bdb9a5b..fde5f4b6 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeIndexerWithPreliminaryTypeAnalysis.xtend | |||
@@ -4,10 +4,9 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | |||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | 4 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem |
5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality | 5 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality |
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult | 6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult |
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeRefinementPrecondition | ||
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | 8 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation |
8 | import org.eclipse.emf.ecore.EClass | 9 | import org.eclipse.emf.ecore.EClass |
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeRefinementPrecondition | ||
10 | import java.util.Collections | ||
11 | 10 | ||
12 | class TypeIndexerWithPreliminaryTypeAnalysis extends TypeIndexer{ | 11 | class TypeIndexerWithPreliminaryTypeAnalysis extends TypeIndexer{ |
13 | val PatternGenerator base; | 12 | val PatternGenerator base; |
@@ -18,22 +17,26 @@ class TypeIndexerWithPreliminaryTypeAnalysis extends TypeIndexer{ | |||
18 | override requiresTypeAnalysis() { true } | 17 | override requiresTypeAnalysis() { true } |
19 | 18 | ||
20 | override getRequiredQueries() ''' | 19 | override getRequiredQueries() ''' |
21 | private pattern typeInterpretation(problem:LogicProblem, interpetation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { | 20 | private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { |
22 | find interpretation(problem,interpetation); | 21 | find interpretation(problem,interpretation); |
23 | LogicProblem.types(problem,type); | 22 | LogicProblem.types(problem,type); |
24 | PartialInterpretation.partialtypeinterpratation(interpetation,typeInterpretation); | 23 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); |
25 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); | 24 | PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); |
26 | } | 25 | } |
27 | 26 | ||
28 | private pattern directInstanceOf(problem:LogicProblem, interpetation:PartialInterpretation, element:DefinedElement, type:Type) { | 27 | private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { |
29 | find interpretation(problem,interpetation); | 28 | find interpretation(problem,interpretation); |
30 | LogicProblem.types(problem,type); | 29 | LogicProblem.types(problem,type); |
31 | TypeDefinition.elements(type,element); | 30 | TypeDefinition.elements(type,element); |
32 | } or { | 31 | } or { |
33 | find interpretation(problem,interpetation); | 32 | find interpretation(problem,interpretation); |
34 | find typeInterpretation(problem,interpetation,type,typeInterpretation); | 33 | find typeInterpretation(problem,interpretation,type,typeInterpretation); |
35 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); | 34 | PartialComplexTypeInterpretation.elements(typeInterpretation,element); |
36 | } | 35 | } |
36 | |||
37 | private pattern isPrimitive(element: PrimitiveElement) { | ||
38 | PrimitiveElement(element); | ||
39 | } | ||
37 | ''' | 40 | ''' |
38 | 41 | ||
39 | override generateInstanceOfQueries(LogicProblem problem, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { | 42 | override generateInstanceOfQueries(LogicProblem problem, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { |
@@ -73,15 +76,16 @@ class TypeIndexerWithPreliminaryTypeAnalysis extends TypeIndexer{ | |||
73 | * An element may be an instance of type "«type.name»". | 76 | * An element may be an instance of type "«type.name»". |
74 | */ | 77 | */ |
75 | private pattern «patternName(type,Modality.MAY)»(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) | 78 | private pattern «patternName(type,Modality.MAY)»(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) |
76 | «IF inhibitorTypes != null»{ | 79 | «IF inhibitorTypes !== null»{ |
77 | find interpretation(problem,interpretation); | 80 | find interpretation(problem,interpretation); |
78 | PartialInterpretation.newElements(interpretation,element); | 81 | PartialInterpretation.newElements(interpretation,element); |
79 | «FOR inhibitorType : inhibitorTypes» | 82 | «FOR inhibitorType : inhibitorTypes» |
80 | neg «referInstanceOf(inhibitorType,Modality.MUST,"element")» | 83 | neg «referInstanceOf(inhibitorType,Modality.MUST,"element")» |
81 | «ENDFOR» | 84 | «ENDFOR» |
85 | neg find isPrimitive(element); | ||
82 | } or { | 86 | } or { |
83 | find interpretation(problem,interpretation); | 87 | find interpretation(problem,interpretation); |
84 | PartialInterpretation.openWorldElements(interpetation,element); | 88 | PartialInterpretation.openWorldElements(interpretation,element); |
85 | } or | 89 | } or |
86 | «ENDIF» | 90 | «ENDIF» |
87 | { «referInstanceOf(type,Modality.MUST,"element")» } | 91 | { «referInstanceOf(type,Modality.MUST,"element")» } |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeRefinementWithPreliminaryTypeAnalysis.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeRefinementWithPreliminaryTypeAnalysis.xtend index 7c5f507b..cbbbcb08 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeRefinementWithPreliminaryTypeAnalysis.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/TypeRefinementWithPreliminaryTypeAnalysis.xtend | |||
@@ -27,7 +27,7 @@ class TypeRefinementWithPreliminaryTypeAnalysis extends TypeRefinementGenerator{ | |||
27 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) | 27 | private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) |
28 | «FOR type :containment.typesOrderedInHierarchy SEPARATOR "or"»{ | 28 | «FOR type :containment.typesOrderedInHierarchy SEPARATOR "or"»{ |
29 | find interpretation(problem,interpretation); | 29 | find interpretation(problem,interpretation); |
30 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"root")» | 30 | «base.typeIndexer.referInstanceOf(type,Modality.MUST,"root")» |
31 | find mustExist(problem, interpretation, root); | 31 | find mustExist(problem, interpretation, root); |
32 | }«ENDFOR» | 32 | }«ENDFOR» |
33 | «FOR type:possibleNewDynamicType» | 33 | «FOR type:possibleNewDynamicType» |
@@ -36,7 +36,7 @@ class TypeRefinementWithPreliminaryTypeAnalysis extends TypeRefinementGenerator{ | |||
36 | «IF inverseRelations.containsKey(containmentRelation)» | 36 | «IF inverseRelations.containsKey(containmentRelation)» |
37 | pattern «this.patternName(containmentRelation,inverseRelations.get(containmentRelation),type)»( | 37 | pattern «this.patternName(containmentRelation,inverseRelations.get(containmentRelation),type)»( |
38 | problem:LogicProblem, interpretation:PartialInterpretation, | 38 | problem:LogicProblem, interpretation:PartialInterpretation, |
39 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialTypeInterpratation, | 39 | relationInterpretation:PartialRelationInterpretation, inverseInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, |
40 | container:DefinedElement) | 40 | container:DefinedElement) |
41 | { | 41 | { |
42 | find interpretation(problem,interpretation); | 42 | find interpretation(problem,interpretation); |
@@ -55,7 +55,7 @@ class TypeRefinementWithPreliminaryTypeAnalysis extends TypeRefinementGenerator{ | |||
55 | «ELSE» | 55 | «ELSE» |
56 | pattern «this.patternName(containmentRelation,null,type)»( | 56 | pattern «this.patternName(containmentRelation,null,type)»( |
57 | problem:LogicProblem, interpretation:PartialInterpretation, | 57 | problem:LogicProblem, interpretation:PartialInterpretation, |
58 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialTypeInterpratation, | 58 | relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, |
59 | container:DefinedElement) | 59 | container:DefinedElement) |
60 | { | 60 | { |
61 | find interpretation(problem,interpretation); | 61 | find interpretation(problem,interpretation); |
@@ -73,7 +73,7 @@ class TypeRefinementWithPreliminaryTypeAnalysis extends TypeRefinementGenerator{ | |||
73 | «ENDFOR» | 73 | «ENDFOR» |
74 | pattern «patternName(null,null,type)»( | 74 | pattern «patternName(null,null,type)»( |
75 | problem:LogicProblem, interpretation:PartialInterpretation, | 75 | problem:LogicProblem, interpretation:PartialInterpretation, |
76 | typeInterpretation:PartialTypeInterpratation) | 76 | typeInterpretation:PartialComplexTypeInterpretation) |
77 | { | 77 | { |
78 | find interpretation(problem,interpretation); | 78 | find interpretation(problem,interpretation); |
79 | neg find hasElementInContainment(problem,interpretation); | 79 | neg find hasElementInContainment(problem,interpretation); |
@@ -86,7 +86,7 @@ class TypeRefinementWithPreliminaryTypeAnalysis extends TypeRefinementGenerator{ | |||
86 | «ELSE» | 86 | «ELSE» |
87 | pattern «this.patternName(null,null,type)»( | 87 | pattern «this.patternName(null,null,type)»( |
88 | problem:LogicProblem, interpretation:PartialInterpretation, | 88 | problem:LogicProblem, interpretation:PartialInterpretation, |
89 | typeInterpretation:PartialTypeInterpratation) | 89 | typeInterpretation:PartialComplexTypeInterpretation) |
90 | { | 90 | { |
91 | find interpretation(problem,interpretation); | 91 | find interpretation(problem,interpretation); |
92 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | 92 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); |
@@ -107,6 +107,7 @@ class TypeRefinementWithPreliminaryTypeAnalysis extends TypeRefinementGenerator{ | |||
107 | pattern refineTypeTo_«base.canonizeName(newTypeRefinement.targetType.name)»(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { | 107 | pattern refineTypeTo_«base.canonizeName(newTypeRefinement.targetType.name)»(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { |
108 | find interpretation(problem,interpretation); | 108 | find interpretation(problem,interpretation); |
109 | PartialInterpretation.newElements(interpretation,element); | 109 | PartialInterpretation.newElements(interpretation,element); |
110 | «base.typeIndexer.referInstanceOf(newTypeRefinement.targetType,Modality.MAY,"element")» | ||
110 | «FOR inhibitorType : newTypeRefinement.inhibitorTypes» | 111 | «FOR inhibitorType : newTypeRefinement.inhibitorTypes» |
111 | neg «base.typeIndexer.referInstanceOf(inhibitorType,Modality.MUST,"element")» | 112 | neg «base.typeIndexer.referInstanceOf(inhibitorType,Modality.MUST,"element")» |
112 | «ENDFOR» | 113 | «ENDFOR» |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialTypeInterpratation.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialTypeInterpratation.java index 8e2def20..1d61421b 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialTypeInterpratation.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialTypeInterpratation.java | |||
@@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EObject; | |||
16 | * </p> | 16 | * </p> |
17 | * <ul> | 17 | * <ul> |
18 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getElements <em>Elements</em>}</li> | 18 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getElements <em>Elements</em>}</li> |
19 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getScopes <em>Scopes</em>}</li> | ||
19 | * </ul> | 20 | * </ul> |
20 | * | 21 | * |
21 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialTypeInterpratation() | 22 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialTypeInterpratation() |
@@ -39,4 +40,22 @@ public interface PartialTypeInterpratation extends EObject { | |||
39 | */ | 40 | */ |
40 | EList<DefinedElement> getElements(); | 41 | EList<DefinedElement> getElements(); |
41 | 42 | ||
43 | /** | ||
44 | * Returns the value of the '<em><b>Scopes</b></em>' reference list. | ||
45 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope}. | ||
46 | * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getTargetTypeInterpretation <em>Target Type Interpretation</em>}'. | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <p> | ||
49 | * If the meaning of the '<em>Scopes</em>' reference list isn't clear, | ||
50 | * there really should be more of a description here... | ||
51 | * </p> | ||
52 | * <!-- end-user-doc --> | ||
53 | * @return the value of the '<em>Scopes</em>' reference list. | ||
54 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialTypeInterpratation_Scopes() | ||
55 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getTargetTypeInterpretation | ||
56 | * @model opposite="targetTypeInterpretation" | ||
57 | * @generated | ||
58 | */ | ||
59 | EList<Scope> getScopes(); | ||
60 | |||
42 | } // PartialTypeInterpratation | 61 | } // PartialTypeInterpratation |
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 ba04bca8..4f34b9b7 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 | |||
@@ -342,13 +342,22 @@ public interface PartialinterpretationPackage extends EPackage { | |||
342 | int PARTIAL_TYPE_INTERPRATATION__ELEMENTS = 0; | 342 | int PARTIAL_TYPE_INTERPRATATION__ELEMENTS = 0; |
343 | 343 | ||
344 | /** | 344 | /** |
345 | * The feature id for the '<em><b>Scopes</b></em>' reference list. | ||
346 | * <!-- begin-user-doc --> | ||
347 | * <!-- end-user-doc --> | ||
348 | * @generated | ||
349 | * @ordered | ||
350 | */ | ||
351 | int PARTIAL_TYPE_INTERPRATATION__SCOPES = 1; | ||
352 | |||
353 | /** | ||
345 | * The number of structural features of the '<em>Partial Type Interpratation</em>' class. | 354 | * The number of structural features of the '<em>Partial Type Interpratation</em>' class. |
346 | * <!-- begin-user-doc --> | 355 | * <!-- begin-user-doc --> |
347 | * <!-- end-user-doc --> | 356 | * <!-- end-user-doc --> |
348 | * @generated | 357 | * @generated |
349 | * @ordered | 358 | * @ordered |
350 | */ | 359 | */ |
351 | int PARTIAL_TYPE_INTERPRATATION_FEATURE_COUNT = 1; | 360 | int PARTIAL_TYPE_INTERPRATATION_FEATURE_COUNT = 2; |
352 | 361 | ||
353 | /** | 362 | /** |
354 | * The number of operations of the '<em>Partial Type Interpratation</em>' class. | 363 | * The number of operations of the '<em>Partial Type Interpratation</em>' class. |
@@ -941,6 +950,15 @@ public interface PartialinterpretationPackage extends EPackage { | |||
941 | int PARTIAL_PRIMITIVE_INTERPRETATION__ELEMENTS = PARTIAL_TYPE_INTERPRATATION__ELEMENTS; | 950 | int PARTIAL_PRIMITIVE_INTERPRETATION__ELEMENTS = PARTIAL_TYPE_INTERPRATATION__ELEMENTS; |
942 | 951 | ||
943 | /** | 952 | /** |
953 | * The feature id for the '<em><b>Scopes</b></em>' reference list. | ||
954 | * <!-- begin-user-doc --> | ||
955 | * <!-- end-user-doc --> | ||
956 | * @generated | ||
957 | * @ordered | ||
958 | */ | ||
959 | int PARTIAL_PRIMITIVE_INTERPRETATION__SCOPES = PARTIAL_TYPE_INTERPRATATION__SCOPES; | ||
960 | |||
961 | /** | ||
944 | * The number of structural features of the '<em>Partial Primitive Interpretation</em>' class. | 962 | * The number of structural features of the '<em>Partial Primitive Interpretation</em>' class. |
945 | * <!-- begin-user-doc --> | 963 | * <!-- begin-user-doc --> |
946 | * <!-- end-user-doc --> | 964 | * <!-- end-user-doc --> |
@@ -978,6 +996,15 @@ public interface PartialinterpretationPackage extends EPackage { | |||
978 | int PARTIAL_BOOLEAN_INTERPRETATION__ELEMENTS = PARTIAL_PRIMITIVE_INTERPRETATION__ELEMENTS; | 996 | int PARTIAL_BOOLEAN_INTERPRETATION__ELEMENTS = PARTIAL_PRIMITIVE_INTERPRETATION__ELEMENTS; |
979 | 997 | ||
980 | /** | 998 | /** |
999 | * The feature id for the '<em><b>Scopes</b></em>' reference list. | ||
1000 | * <!-- begin-user-doc --> | ||
1001 | * <!-- end-user-doc --> | ||
1002 | * @generated | ||
1003 | * @ordered | ||
1004 | */ | ||
1005 | int PARTIAL_BOOLEAN_INTERPRETATION__SCOPES = PARTIAL_PRIMITIVE_INTERPRETATION__SCOPES; | ||
1006 | |||
1007 | /** | ||
981 | * The number of structural features of the '<em>Partial Boolean Interpretation</em>' class. | 1008 | * The number of structural features of the '<em>Partial Boolean Interpretation</em>' class. |
982 | * <!-- begin-user-doc --> | 1009 | * <!-- begin-user-doc --> |
983 | * <!-- end-user-doc --> | 1010 | * <!-- end-user-doc --> |
@@ -1015,6 +1042,15 @@ public interface PartialinterpretationPackage extends EPackage { | |||
1015 | int PARTIAL_INTEGER_INTERPRETATION__ELEMENTS = PARTIAL_PRIMITIVE_INTERPRETATION__ELEMENTS; | 1042 | int PARTIAL_INTEGER_INTERPRETATION__ELEMENTS = PARTIAL_PRIMITIVE_INTERPRETATION__ELEMENTS; |
1016 | 1043 | ||
1017 | /** | 1044 | /** |
1045 | * The feature id for the '<em><b>Scopes</b></em>' reference list. | ||
1046 | * <!-- begin-user-doc --> | ||
1047 | * <!-- end-user-doc --> | ||
1048 | * @generated | ||
1049 | * @ordered | ||
1050 | */ | ||
1051 | int PARTIAL_INTEGER_INTERPRETATION__SCOPES = PARTIAL_PRIMITIVE_INTERPRETATION__SCOPES; | ||
1052 | |||
1053 | /** | ||
1018 | * The number of structural features of the '<em>Partial Integer Interpretation</em>' class. | 1054 | * The number of structural features of the '<em>Partial Integer Interpretation</em>' class. |
1019 | * <!-- begin-user-doc --> | 1055 | * <!-- begin-user-doc --> |
1020 | * <!-- end-user-doc --> | 1056 | * <!-- end-user-doc --> |
@@ -1052,6 +1088,15 @@ public interface PartialinterpretationPackage extends EPackage { | |||
1052 | int PARTIAL_REAL_INTERPRETATION__ELEMENTS = PARTIAL_PRIMITIVE_INTERPRETATION__ELEMENTS; | 1088 | int PARTIAL_REAL_INTERPRETATION__ELEMENTS = PARTIAL_PRIMITIVE_INTERPRETATION__ELEMENTS; |
1053 | 1089 | ||
1054 | /** | 1090 | /** |
1091 | * The feature id for the '<em><b>Scopes</b></em>' reference list. | ||
1092 | * <!-- begin-user-doc --> | ||
1093 | * <!-- end-user-doc --> | ||
1094 | * @generated | ||
1095 | * @ordered | ||
1096 | */ | ||
1097 | int PARTIAL_REAL_INTERPRETATION__SCOPES = PARTIAL_PRIMITIVE_INTERPRETATION__SCOPES; | ||
1098 | |||
1099 | /** | ||
1055 | * The number of structural features of the '<em>Partial Real Interpretation</em>' class. | 1100 | * The number of structural features of the '<em>Partial Real Interpretation</em>' class. |
1056 | * <!-- begin-user-doc --> | 1101 | * <!-- begin-user-doc --> |
1057 | * <!-- end-user-doc --> | 1102 | * <!-- end-user-doc --> |
@@ -1089,6 +1134,15 @@ public interface PartialinterpretationPackage extends EPackage { | |||
1089 | int PARTIAL_STRING_INTERPRETATION__ELEMENTS = PARTIAL_PRIMITIVE_INTERPRETATION__ELEMENTS; | 1134 | int PARTIAL_STRING_INTERPRETATION__ELEMENTS = PARTIAL_PRIMITIVE_INTERPRETATION__ELEMENTS; |
1090 | 1135 | ||
1091 | /** | 1136 | /** |
1137 | * The feature id for the '<em><b>Scopes</b></em>' reference list. | ||
1138 | * <!-- begin-user-doc --> | ||
1139 | * <!-- end-user-doc --> | ||
1140 | * @generated | ||
1141 | * @ordered | ||
1142 | */ | ||
1143 | int PARTIAL_STRING_INTERPRETATION__SCOPES = PARTIAL_PRIMITIVE_INTERPRETATION__SCOPES; | ||
1144 | |||
1145 | /** | ||
1092 | * The number of structural features of the '<em>Partial String Interpretation</em>' class. | 1146 | * The number of structural features of the '<em>Partial String Interpretation</em>' class. |
1093 | * <!-- begin-user-doc --> | 1147 | * <!-- begin-user-doc --> |
1094 | * <!-- end-user-doc --> | 1148 | * <!-- end-user-doc --> |
@@ -1127,6 +1181,15 @@ public interface PartialinterpretationPackage extends EPackage { | |||
1127 | int PARTIAL_COMPLEX_TYPE_INTERPRETATION__ELEMENTS = PARTIAL_TYPE_INTERPRATATION__ELEMENTS; | 1181 | int PARTIAL_COMPLEX_TYPE_INTERPRETATION__ELEMENTS = PARTIAL_TYPE_INTERPRATATION__ELEMENTS; |
1128 | 1182 | ||
1129 | /** | 1183 | /** |
1184 | * The feature id for the '<em><b>Scopes</b></em>' reference list. | ||
1185 | * <!-- begin-user-doc --> | ||
1186 | * <!-- end-user-doc --> | ||
1187 | * @generated | ||
1188 | * @ordered | ||
1189 | */ | ||
1190 | int PARTIAL_COMPLEX_TYPE_INTERPRETATION__SCOPES = PARTIAL_TYPE_INTERPRATATION__SCOPES; | ||
1191 | |||
1192 | /** | ||
1130 | * The feature id for the '<em><b>Supertype Interpretation</b></em>' reference list. | 1193 | * The feature id for the '<em><b>Supertype Interpretation</b></em>' reference list. |
1131 | * <!-- begin-user-doc --> | 1194 | * <!-- begin-user-doc --> |
1132 | * <!-- end-user-doc --> | 1195 | * <!-- end-user-doc --> |
@@ -1412,6 +1475,17 @@ public interface PartialinterpretationPackage extends EPackage { | |||
1412 | EReference getPartialTypeInterpratation_Elements(); | 1475 | EReference getPartialTypeInterpratation_Elements(); |
1413 | 1476 | ||
1414 | /** | 1477 | /** |
1478 | * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getScopes <em>Scopes</em>}'. | ||
1479 | * <!-- begin-user-doc --> | ||
1480 | * <!-- end-user-doc --> | ||
1481 | * @return the meta object for the reference list '<em>Scopes</em>'. | ||
1482 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getScopes() | ||
1483 | * @see #getPartialTypeInterpratation() | ||
1484 | * @generated | ||
1485 | */ | ||
1486 | EReference getPartialTypeInterpratation_Scopes(); | ||
1487 | |||
1488 | /** | ||
1415 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink <em>Relation Link</em>}'. | 1489 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink <em>Relation Link</em>}'. |
1416 | * <!-- begin-user-doc --> | 1490 | * <!-- begin-user-doc --> |
1417 | * <!-- end-user-doc --> | 1491 | * <!-- end-user-doc --> |
@@ -1975,6 +2049,14 @@ public interface PartialinterpretationPackage extends EPackage { | |||
1975 | EReference PARTIAL_TYPE_INTERPRATATION__ELEMENTS = eINSTANCE.getPartialTypeInterpratation_Elements(); | 2049 | EReference PARTIAL_TYPE_INTERPRATATION__ELEMENTS = eINSTANCE.getPartialTypeInterpratation_Elements(); |
1976 | 2050 | ||
1977 | /** | 2051 | /** |
2052 | * The meta object literal for the '<em><b>Scopes</b></em>' reference list feature. | ||
2053 | * <!-- begin-user-doc --> | ||
2054 | * <!-- end-user-doc --> | ||
2055 | * @generated | ||
2056 | */ | ||
2057 | EReference PARTIAL_TYPE_INTERPRATATION__SCOPES = eINSTANCE.getPartialTypeInterpratation_Scopes(); | ||
2058 | |||
2059 | /** | ||
1978 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.RelationLinkImpl <em>Relation Link</em>}' class. | 2060 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.RelationLinkImpl <em>Relation Link</em>}' class. |
1979 | * <!-- begin-user-doc --> | 2061 | * <!-- begin-user-doc --> |
1980 | * <!-- end-user-doc --> | 2062 | * <!-- 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 ba9435c2..155b9f00 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 | |||
@@ -79,6 +79,7 @@ public interface Scope extends EObject { | |||
79 | 79 | ||
80 | /** | 80 | /** |
81 | * Returns the value of the '<em><b>Target Type Interpretation</b></em>' reference. | 81 | * Returns the value of the '<em><b>Target Type Interpretation</b></em>' reference. |
82 | * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getScopes <em>Scopes</em>}'. | ||
82 | * <!-- begin-user-doc --> | 83 | * <!-- begin-user-doc --> |
83 | * <p> | 84 | * <p> |
84 | * If the meaning of the '<em>Target Type Interpretation</em>' reference isn't clear, | 85 | * If the meaning of the '<em>Target Type Interpretation</em>' reference isn't clear, |
@@ -88,7 +89,8 @@ public interface Scope extends EObject { | |||
88 | * @return the value of the '<em>Target Type Interpretation</em>' reference. | 89 | * @return the value of the '<em>Target Type Interpretation</em>' reference. |
89 | * @see #setTargetTypeInterpretation(PartialTypeInterpratation) | 90 | * @see #setTargetTypeInterpretation(PartialTypeInterpratation) |
90 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getScope_TargetTypeInterpretation() | 91 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getScope_TargetTypeInterpretation() |
91 | * @model required="true" | 92 | * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation#getScopes |
93 | * @model opposite="scopes" required="true" | ||
92 | * @generated | 94 | * @generated |
93 | */ | 95 | */ |
94 | PartialTypeInterpratation getTargetTypeInterpretation(); | 96 | PartialTypeInterpratation getTargetTypeInterpretation(); |
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 beb45529..da9b1472 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 | |||
@@ -6,11 +6,16 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement; | |||
6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation; | 6 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation; |
7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; | 7 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage; |
8 | 8 | ||
9 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope; | ||
9 | import java.util.Collection; | 10 | import java.util.Collection; |
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
10 | import org.eclipse.emf.common.util.EList; | 12 | import org.eclipse.emf.common.util.EList; |
11 | import org.eclipse.emf.ecore.EClass; | 13 | import org.eclipse.emf.ecore.EClass; |
14 | import org.eclipse.emf.ecore.InternalEObject; | ||
12 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; | 15 | import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; |
13 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; | 16 | import org.eclipse.emf.ecore.util.EObjectResolvingEList; |
17 | import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; | ||
18 | import org.eclipse.emf.ecore.util.InternalEList; | ||
14 | 19 | ||
15 | /** | 20 | /** |
16 | * <!-- begin-user-doc --> | 21 | * <!-- begin-user-doc --> |
@@ -21,6 +26,7 @@ import org.eclipse.emf.ecore.util.EObjectResolvingEList; | |||
21 | * </p> | 26 | * </p> |
22 | * <ul> | 27 | * <ul> |
23 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialTypeInterpratationImpl#getElements <em>Elements</em>}</li> | 28 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialTypeInterpratationImpl#getElements <em>Elements</em>}</li> |
29 | * <li>{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialTypeInterpratationImpl#getScopes <em>Scopes</em>}</li> | ||
24 | * </ul> | 30 | * </ul> |
25 | * | 31 | * |
26 | * @generated | 32 | * @generated |
@@ -37,6 +43,16 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C | |||
37 | protected EList<DefinedElement> elements; | 43 | protected EList<DefinedElement> elements; |
38 | 44 | ||
39 | /** | 45 | /** |
46 | * The cached value of the '{@link #getScopes() <em>Scopes</em>}' reference list. | ||
47 | * <!-- begin-user-doc --> | ||
48 | * <!-- end-user-doc --> | ||
49 | * @see #getScopes() | ||
50 | * @generated | ||
51 | * @ordered | ||
52 | */ | ||
53 | protected EList<Scope> scopes; | ||
54 | |||
55 | /** | ||
40 | * <!-- begin-user-doc --> | 56 | * <!-- begin-user-doc --> |
41 | * <!-- end-user-doc --> | 57 | * <!-- end-user-doc --> |
42 | * @generated | 58 | * @generated |
@@ -72,11 +88,54 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C | |||
72 | * <!-- end-user-doc --> | 88 | * <!-- end-user-doc --> |
73 | * @generated | 89 | * @generated |
74 | */ | 90 | */ |
91 | public EList<Scope> getScopes() { | ||
92 | if (scopes == null) { | ||
93 | scopes = new EObjectWithInverseResolvingEList<Scope>(Scope.class, this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION); | ||
94 | } | ||
95 | return scopes; | ||
96 | } | ||
97 | |||
98 | /** | ||
99 | * <!-- begin-user-doc --> | ||
100 | * <!-- end-user-doc --> | ||
101 | * @generated | ||
102 | */ | ||
103 | @SuppressWarnings("unchecked") | ||
104 | @Override | ||
105 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
106 | switch (featureID) { | ||
107 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: | ||
108 | return ((InternalEList<InternalEObject>)(InternalEList<?>)getScopes()).basicAdd(otherEnd, msgs); | ||
109 | } | ||
110 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
111 | } | ||
112 | |||
113 | /** | ||
114 | * <!-- begin-user-doc --> | ||
115 | * <!-- end-user-doc --> | ||
116 | * @generated | ||
117 | */ | ||
118 | @Override | ||
119 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
120 | switch (featureID) { | ||
121 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: | ||
122 | return ((InternalEList<?>)getScopes()).basicRemove(otherEnd, msgs); | ||
123 | } | ||
124 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
125 | } | ||
126 | |||
127 | /** | ||
128 | * <!-- begin-user-doc --> | ||
129 | * <!-- end-user-doc --> | ||
130 | * @generated | ||
131 | */ | ||
75 | @Override | 132 | @Override |
76 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | 133 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
77 | switch (featureID) { | 134 | switch (featureID) { |
78 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: | 135 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: |
79 | return getElements(); | 136 | return getElements(); |
137 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: | ||
138 | return getScopes(); | ||
80 | } | 139 | } |
81 | return super.eGet(featureID, resolve, coreType); | 140 | return super.eGet(featureID, resolve, coreType); |
82 | } | 141 | } |
@@ -94,6 +153,10 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C | |||
94 | getElements().clear(); | 153 | getElements().clear(); |
95 | getElements().addAll((Collection<? extends DefinedElement>)newValue); | 154 | getElements().addAll((Collection<? extends DefinedElement>)newValue); |
96 | return; | 155 | return; |
156 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: | ||
157 | getScopes().clear(); | ||
158 | getScopes().addAll((Collection<? extends Scope>)newValue); | ||
159 | return; | ||
97 | } | 160 | } |
98 | super.eSet(featureID, newValue); | 161 | super.eSet(featureID, newValue); |
99 | } | 162 | } |
@@ -109,6 +172,9 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C | |||
109 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: | 172 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: |
110 | getElements().clear(); | 173 | getElements().clear(); |
111 | return; | 174 | return; |
175 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: | ||
176 | getScopes().clear(); | ||
177 | return; | ||
112 | } | 178 | } |
113 | super.eUnset(featureID); | 179 | super.eUnset(featureID); |
114 | } | 180 | } |
@@ -123,6 +189,8 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C | |||
123 | switch (featureID) { | 189 | switch (featureID) { |
124 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: | 190 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS: |
125 | return elements != null && !elements.isEmpty(); | 191 | return elements != null && !elements.isEmpty(); |
192 | case PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES: | ||
193 | return scopes != null && !scopes.isEmpty(); | ||
126 | } | 194 | } |
127 | return super.eIsSet(featureID); | 195 | return super.eIsSet(featureID); |
128 | } | 196 | } |
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 c0515c43..a21dc306 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 | |||
@@ -476,6 +476,15 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa | |||
476 | * <!-- end-user-doc --> | 476 | * <!-- end-user-doc --> |
477 | * @generated | 477 | * @generated |
478 | */ | 478 | */ |
479 | public EReference getPartialTypeInterpratation_Scopes() { | ||
480 | return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(1); | ||
481 | } | ||
482 | |||
483 | /** | ||
484 | * <!-- begin-user-doc --> | ||
485 | * <!-- end-user-doc --> | ||
486 | * @generated | ||
487 | */ | ||
479 | public EClass getRelationLink() { | 488 | public EClass getRelationLink() { |
480 | return relationLinkEClass; | 489 | return relationLinkEClass; |
481 | } | 490 | } |
@@ -823,6 +832,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa | |||
823 | 832 | ||
824 | partialTypeInterpratationEClass = createEClass(PARTIAL_TYPE_INTERPRATATION); | 833 | partialTypeInterpratationEClass = createEClass(PARTIAL_TYPE_INTERPRATATION); |
825 | createEReference(partialTypeInterpratationEClass, PARTIAL_TYPE_INTERPRATATION__ELEMENTS); | 834 | createEReference(partialTypeInterpratationEClass, PARTIAL_TYPE_INTERPRATATION__ELEMENTS); |
835 | createEReference(partialTypeInterpratationEClass, PARTIAL_TYPE_INTERPRATATION__SCOPES); | ||
826 | 836 | ||
827 | relationLinkEClass = createEClass(RELATION_LINK); | 837 | relationLinkEClass = createEClass(RELATION_LINK); |
828 | 838 | ||
@@ -950,6 +960,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa | |||
950 | 960 | ||
951 | initEClass(partialTypeInterpratationEClass, PartialTypeInterpratation.class, "PartialTypeInterpratation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 961 | initEClass(partialTypeInterpratationEClass, PartialTypeInterpratation.class, "PartialTypeInterpratation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
952 | initEReference(getPartialTypeInterpratation_Elements(), theLogiclanguagePackage.getDefinedElement(), null, "elements", null, 0, -1, PartialTypeInterpratation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 962 | initEReference(getPartialTypeInterpratation_Elements(), theLogiclanguagePackage.getDefinedElement(), null, "elements", null, 0, -1, PartialTypeInterpratation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
963 | initEReference(getPartialTypeInterpratation_Scopes(), this.getScope(), this.getScope_TargetTypeInterpretation(), "scopes", null, 0, -1, PartialTypeInterpratation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
953 | 964 | ||
954 | initEClass(relationLinkEClass, RelationLink.class, "RelationLink", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 965 | initEClass(relationLinkEClass, RelationLink.class, "RelationLink", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
955 | 966 | ||
@@ -985,7 +996,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa | |||
985 | initEClass(scopeEClass, Scope.class, "Scope", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 996 | initEClass(scopeEClass, Scope.class, "Scope", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
986 | 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); | 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); |
987 | 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); | 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); |
988 | initEReference(getScope_TargetTypeInterpretation(), this.getPartialTypeInterpratation(), null, "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); | 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); |
989 | 1000 | ||
990 | initEClass(partialPrimitiveInterpretationEClass, PartialPrimitiveInterpretation.class, "PartialPrimitiveInterpretation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 1001 | initEClass(partialPrimitiveInterpretationEClass, PartialPrimitiveInterpretation.class, "PartialPrimitiveInterpretation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
991 | 1002 | ||
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 4699aef6..d8ade871 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 | |||
@@ -8,6 +8,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par | |||
8 | 8 | ||
9 | import org.eclipse.emf.common.notify.Notification; | 9 | import org.eclipse.emf.common.notify.Notification; |
10 | 10 | ||
11 | import org.eclipse.emf.common.notify.NotificationChain; | ||
11 | import org.eclipse.emf.ecore.EClass; | 12 | import org.eclipse.emf.ecore.EClass; |
12 | import org.eclipse.emf.ecore.InternalEObject; | 13 | import org.eclipse.emf.ecore.InternalEObject; |
13 | 14 | ||
@@ -172,11 +173,63 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { | |||
172 | * <!-- end-user-doc --> | 173 | * <!-- end-user-doc --> |
173 | * @generated | 174 | * @generated |
174 | */ | 175 | */ |
175 | public void setTargetTypeInterpretation(PartialTypeInterpratation newTargetTypeInterpretation) { | 176 | public NotificationChain basicSetTargetTypeInterpretation(PartialTypeInterpratation newTargetTypeInterpretation, NotificationChain msgs) { |
176 | PartialTypeInterpratation oldTargetTypeInterpretation = targetTypeInterpretation; | 177 | PartialTypeInterpratation oldTargetTypeInterpretation = targetTypeInterpretation; |
177 | targetTypeInterpretation = newTargetTypeInterpretation; | 178 | targetTypeInterpretation = newTargetTypeInterpretation; |
178 | if (eNotificationRequired()) | 179 | if (eNotificationRequired()) { |
179 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION, oldTargetTypeInterpretation, targetTypeInterpretation)); | 180 | ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION, oldTargetTypeInterpretation, newTargetTypeInterpretation); |
181 | if (msgs == null) msgs = notification; else msgs.add(notification); | ||
182 | } | ||
183 | return msgs; | ||
184 | } | ||
185 | |||
186 | /** | ||
187 | * <!-- begin-user-doc --> | ||
188 | * <!-- end-user-doc --> | ||
189 | * @generated | ||
190 | */ | ||
191 | public void setTargetTypeInterpretation(PartialTypeInterpratation newTargetTypeInterpretation) { | ||
192 | if (newTargetTypeInterpretation != targetTypeInterpretation) { | ||
193 | NotificationChain msgs = null; | ||
194 | if (targetTypeInterpretation != null) | ||
195 | msgs = ((InternalEObject)targetTypeInterpretation).eInverseRemove(this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialTypeInterpratation.class, msgs); | ||
196 | if (newTargetTypeInterpretation != null) | ||
197 | msgs = ((InternalEObject)newTargetTypeInterpretation).eInverseAdd(this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialTypeInterpratation.class, msgs); | ||
198 | msgs = basicSetTargetTypeInterpretation(newTargetTypeInterpretation, msgs); | ||
199 | if (msgs != null) msgs.dispatch(); | ||
200 | } | ||
201 | else if (eNotificationRequired()) | ||
202 | eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION, newTargetTypeInterpretation, newTargetTypeInterpretation)); | ||
203 | } | ||
204 | |||
205 | /** | ||
206 | * <!-- begin-user-doc --> | ||
207 | * <!-- end-user-doc --> | ||
208 | * @generated | ||
209 | */ | ||
210 | @Override | ||
211 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
212 | switch (featureID) { | ||
213 | case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: | ||
214 | if (targetTypeInterpretation != null) | ||
215 | msgs = ((InternalEObject)targetTypeInterpretation).eInverseRemove(this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialTypeInterpratation.class, msgs); | ||
216 | return basicSetTargetTypeInterpretation((PartialTypeInterpratation)otherEnd, msgs); | ||
217 | } | ||
218 | return super.eInverseAdd(otherEnd, featureID, msgs); | ||
219 | } | ||
220 | |||
221 | /** | ||
222 | * <!-- begin-user-doc --> | ||
223 | * <!-- end-user-doc --> | ||
224 | * @generated | ||
225 | */ | ||
226 | @Override | ||
227 | public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | ||
228 | switch (featureID) { | ||
229 | case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: | ||
230 | return basicSetTargetTypeInterpretation(null, msgs); | ||
231 | } | ||
232 | return super.eInverseRemove(otherEnd, featureID, msgs); | ||
180 | } | 233 | } |
181 | 234 | ||
182 | /** | 235 | /** |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.aird b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.aird index 7fba84f6..f2a97719 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.aird +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.aird | |||
@@ -2873,22 +2873,6 @@ | |||
2873 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k3T_i2kJEei_cpJmVsHDhQ" id="(0.4624277456647399,0.0)"/> | 2873 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k3T_i2kJEei_cpJmVsHDhQ" id="(0.4624277456647399,0.0)"/> |
2874 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k3T_jGkJEei_cpJmVsHDhQ" id="(0.5,0.27941176470588236)"/> | 2874 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k3T_jGkJEei_cpJmVsHDhQ" id="(0.5,0.27941176470588236)"/> |
2875 | </edges> | 2875 | </edges> |
2876 | <edges xmi:type="notation:Edge" xmi:id="_k3T_k2kJEei_cpJmVsHDhQ" type="4001" element="_k3UAyGkJEei_cpJmVsHDhQ" source="_k3T-AGkJEei_cpJmVsHDhQ" target="_k3T9v2kJEei_cpJmVsHDhQ"> | ||
2877 | <children xmi:type="notation:Node" xmi:id="_k3T_lGkJEei_cpJmVsHDhQ" type="6001"> | ||
2878 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k3T_lWkJEei_cpJmVsHDhQ" x="-1" y="-16"/> | ||
2879 | </children> | ||
2880 | <children xmi:type="notation:Node" xmi:id="_k3T_lmkJEei_cpJmVsHDhQ" type="6002"> | ||
2881 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k3T_l2kJEei_cpJmVsHDhQ" x="-70" y="10"/> | ||
2882 | </children> | ||
2883 | <children xmi:type="notation:Node" xmi:id="_k3T_mGkJEei_cpJmVsHDhQ" type="6003"> | ||
2884 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k3T_mWkJEei_cpJmVsHDhQ" x="-222" y="10"/> | ||
2885 | </children> | ||
2886 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_k3T_mmkJEei_cpJmVsHDhQ" routing="Rectilinear"/> | ||
2887 | <styles xmi:type="notation:FontStyle" xmi:id="_k3T_m2kJEei_cpJmVsHDhQ" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> | ||
2888 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_k3T_nGkJEei_cpJmVsHDhQ" points="[0, 0, -433, 113]$[0, -138, -433, -25]$[405, -138, -28, -25]"/> | ||
2889 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k3T_nWkJEei_cpJmVsHDhQ" id="(0.43243243243243246,0.0)"/> | ||
2890 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_k3T_nmkJEei_cpJmVsHDhQ" id="(0.17261904761904762,0.9047619047619048)"/> | ||
2891 | </edges> | ||
2892 | <edges xmi:type="notation:Edge" xmi:id="_k3T_n2kJEei_cpJmVsHDhQ" type="4001" element="_k3UAzGkJEei_cpJmVsHDhQ" source="_k3T9LWkJEei_cpJmVsHDhQ" target="_k3T-AGkJEei_cpJmVsHDhQ"> | 2876 | <edges xmi:type="notation:Edge" xmi:id="_k3T_n2kJEei_cpJmVsHDhQ" type="4001" element="_k3UAzGkJEei_cpJmVsHDhQ" source="_k3T9LWkJEei_cpJmVsHDhQ" target="_k3T-AGkJEei_cpJmVsHDhQ"> |
2893 | <children xmi:type="notation:Node" xmi:id="_k3T_oGkJEei_cpJmVsHDhQ" type="6001"> | 2877 | <children xmi:type="notation:Node" xmi:id="_k3T_oGkJEei_cpJmVsHDhQ" type="6001"> |
2894 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k3T_oWkJEei_cpJmVsHDhQ" x="703" y="275"/> | 2878 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k3T_oWkJEei_cpJmVsHDhQ" x="703" y="275"/> |
@@ -3057,6 +3041,22 @@ | |||
3057 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_IYpm2mpLEeihhMJKm6QVPA" id="(0.7321428571428571,0.12698412698412698)"/> | 3041 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_IYpm2mpLEeihhMJKm6QVPA" id="(0.7321428571428571,0.12698412698412698)"/> |
3058 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_IYpm22pLEeihhMJKm6QVPA" id="(0.11917098445595854,0.4482758620689655)"/> | 3042 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_IYpm22pLEeihhMJKm6QVPA" id="(0.11917098445595854,0.4482758620689655)"/> |
3059 | </edges> | 3043 | </edges> |
3044 | <edges xmi:type="notation:Edge" xmi:id="_sgEEYHTUEeikG_d_s6jXjg" type="4001" element="_se_tYHTUEeikG_d_s6jXjg" source="_k3T9v2kJEei_cpJmVsHDhQ" target="_k3T-AGkJEei_cpJmVsHDhQ"> | ||
3045 | <children xmi:type="notation:Node" xmi:id="_sgGgoHTUEeikG_d_s6jXjg" type="6001"> | ||
3046 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sgGgoXTUEeikG_d_s6jXjg" y="10"/> | ||
3047 | </children> | ||
3048 | <children xmi:type="notation:Node" xmi:id="_sgGgonTUEeikG_d_s6jXjg" type="6002"> | ||
3049 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sgGgo3TUEeikG_d_s6jXjg" x="-7" y="10"/> | ||
3050 | </children> | ||
3051 | <children xmi:type="notation:Node" xmi:id="_sgGgpHTUEeikG_d_s6jXjg" type="6003"> | ||
3052 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_sgGgpXTUEeikG_d_s6jXjg" x="64" y="37"/> | ||
3053 | </children> | ||
3054 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_sgEEYXTUEeikG_d_s6jXjg" routing="Rectilinear"/> | ||
3055 | <styles xmi:type="notation:FontStyle" xmi:id="_sgEEYnTUEeikG_d_s6jXjg" fontName="Segoe UI" fontHeight="8"/> | ||
3056 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_sgEEY3TUEeikG_d_s6jXjg" points="[-83, -11, 393, -183]$[-476, -11, 0, -183]$[-476, 138, 0, -34]"/> | ||
3057 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_sgI84HTUEeikG_d_s6jXjg" id="(0.5,0.5)"/> | ||
3058 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_sgI84XTUEeikG_d_s6jXjg" id="(0.5,0.5)"/> | ||
3059 | </edges> | ||
3060 | </data> | 3060 | </data> |
3061 | </ownedAnnotationEntries> | 3061 | </ownedAnnotationEntries> |
3062 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_k3T_6GkJEei_cpJmVsHDhQ" name="PartialInterpretation" tooltipText="" outgoingEdges="_k3T_82kJEei_cpJmVsHDhQ _k3UAfGkJEei_cpJmVsHDhQ _k3UAhmkJEei_cpJmVsHDhQ _k3UAjmkJEei_cpJmVsHDhQ _k3UAkmkJEei_cpJmVsHDhQ _k3UAzGkJEei_cpJmVsHDhQ" width="12" height="10"> | 3062 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_k3T_6GkJEei_cpJmVsHDhQ" name="PartialInterpretation" tooltipText="" outgoingEdges="_k3T_82kJEei_cpJmVsHDhQ _k3UAfGkJEei_cpJmVsHDhQ _k3UAhmkJEei_cpJmVsHDhQ _k3UAjmkJEei_cpJmVsHDhQ _k3UAkmkJEei_cpJmVsHDhQ _k3UAzGkJEei_cpJmVsHDhQ" width="12" height="10"> |
@@ -3337,7 +3337,7 @@ | |||
3337 | </ownedStyle> | 3337 | </ownedStyle> |
3338 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 3338 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
3339 | </ownedDiagramElements> | 3339 | </ownedDiagramElements> |
3340 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_k3UAgGkJEei_cpJmVsHDhQ" name="PartialTypeInterpratation" tooltipText="" outgoingEdges="_k3UAimkJEei_cpJmVsHDhQ" incomingEdges="_k3UAhmkJEei_cpJmVsHDhQ _k3UAyGkJEei_cpJmVsHDhQ _k3UA0mkJEei_cpJmVsHDhQ _fHbWwGpJEeihhMJKm6QVPA" width="12" height="10"> | 3340 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_k3UAgGkJEei_cpJmVsHDhQ" name="PartialTypeInterpratation" tooltipText="" outgoingEdges="_k3UAimkJEei_cpJmVsHDhQ _se_tYHTUEeikG_d_s6jXjg" incomingEdges="_k3UAhmkJEei_cpJmVsHDhQ _k3UA0mkJEei_cpJmVsHDhQ _fHbWwGpJEeihhMJKm6QVPA" width="12" height="10"> |
3341 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialTypeInterpratation"/> | 3341 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialTypeInterpratation"/> |
3342 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialTypeInterpratation"/> | 3342 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//PartialTypeInterpratation"/> |
3343 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 3343 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -3584,7 +3584,7 @@ | |||
3584 | </ownedStyle> | 3584 | </ownedStyle> |
3585 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 3585 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
3586 | </ownedDiagramElements> | 3586 | </ownedDiagramElements> |
3587 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_k3UAwmkJEei_cpJmVsHDhQ" name="Scope" tooltipText="" outgoingEdges="_k3UAyGkJEei_cpJmVsHDhQ" incomingEdges="_k3UAzGkJEei_cpJmVsHDhQ" width="12" height="10"> | 3587 | <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_k3UAwmkJEei_cpJmVsHDhQ" name="Scope" tooltipText="" incomingEdges="_k3UAzGkJEei_cpJmVsHDhQ _se_tYHTUEeikG_d_s6jXjg" width="12" height="10"> |
3588 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//Scope"/> | 3588 | <target xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//Scope"/> |
3589 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//Scope"/> | 3589 | <semanticElements xmi:type="ecore:EClass" href="PartialInterpretation.ecore#//Scope"/> |
3590 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 3590 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
@@ -3612,20 +3612,6 @@ | |||
3612 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | 3612 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> |
3613 | </ownedElements> | 3613 | </ownedElements> |
3614 | </ownedDiagramElements> | 3614 | </ownedDiagramElements> |
3615 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_k3UAyGkJEei_cpJmVsHDhQ" name="[1..1] targetTypeInterpretation" sourceNode="_k3UAwmkJEei_cpJmVsHDhQ" targetNode="_k3UAgGkJEei_cpJmVsHDhQ"> | ||
3616 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//Scope/targetTypeInterpretation"/> | ||
3617 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//Scope/targetTypeInterpretation"/> | ||
3618 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_k3UAyWkJEei_cpJmVsHDhQ" description="_k3T9I2kJEei_cpJmVsHDhQ" routingStyle="manhattan" strokeColor="0,0,0"> | ||
3619 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" xmi:id="_k3UAymkJEei_cpJmVsHDhQ" showIcon="false"> | ||
3620 | <customFeatures>labelSize</customFeatures> | ||
3621 | <labelFormat>bold</labelFormat> | ||
3622 | </centerLabelStyle> | ||
3623 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_k3UAy2kJEei_cpJmVsHDhQ" showIcon="false" labelColor="39,76,114"> | ||
3624 | <customFeatures>labelSize</customFeatures> | ||
3625 | </endLabelStyle> | ||
3626 | </ownedStyle> | ||
3627 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | ||
3628 | </ownedDiagramElements> | ||
3629 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_k3UAzGkJEei_cpJmVsHDhQ" name="[0..*] scopes" sourceNode="_k3T_6GkJEei_cpJmVsHDhQ" targetNode="_k3UAwmkJEei_cpJmVsHDhQ"> | 3615 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_k3UAzGkJEei_cpJmVsHDhQ" name="[0..*] scopes" sourceNode="_k3T_6GkJEei_cpJmVsHDhQ" targetNode="_k3UAwmkJEei_cpJmVsHDhQ"> |
3630 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/scopes"/> | 3616 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/scopes"/> |
3631 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/scopes"/> | 3617 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialInterpretation/scopes"/> |
@@ -3778,6 +3764,17 @@ | |||
3778 | </ownedStyle> | 3764 | </ownedStyle> |
3779 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 3765 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
3780 | </ownedDiagramElements> | 3766 | </ownedDiagramElements> |
3767 | <ownedDiagramElements xmi:type="diagram:DEdge" xmi:id="_se_tYHTUEeikG_d_s6jXjg" sourceNode="_k3UAgGkJEei_cpJmVsHDhQ" targetNode="_k3UAwmkJEei_cpJmVsHDhQ" beginLabel="[1..1] targetTypeInterpretation" endLabel="[0..*] scopes"> | ||
3768 | <target xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/scopes"/> | ||
3769 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//PartialTypeInterpratation/scopes"/> | ||
3770 | <semanticElements xmi:type="ecore:EReference" href="PartialInterpretation.ecore#//Scope/targetTypeInterpretation"/> | ||
3771 | <ownedStyle xmi:type="diagram:EdgeStyle" xmi:id="_se_tYXTUEeikG_d_s6jXjg" sourceArrow="InputArrow" routingStyle="manhattan" strokeColor="0,0,0"> | ||
3772 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']/@style"/> | ||
3773 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" xmi:id="_se_tYnTUEeikG_d_s6jXjg" showIcon="false"/> | ||
3774 | <endLabelStyle xmi:type="diagram:EndLabelStyle" xmi:id="_se_tY3TUEeikG_d_s6jXjg" showIcon="false"/> | ||
3775 | </ownedStyle> | ||
3776 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='Bi-directional%20EC_EReference%20']"/> | ||
3777 | </ownedDiagramElements> | ||
3781 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> | 3778 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> |
3782 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_k3UA7mkJEei_cpJmVsHDhQ"/> | 3779 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_k3UA7mkJEei_cpJmVsHDhQ"/> |
3783 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> | 3780 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> |
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore index afee2d42..acf82a3f 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 | |||
@@ -47,6 +47,8 @@ | |||
47 | <eClassifiers xsi:type="ecore:EClass" name="PartialTypeInterpratation" abstract="true"> | 47 | <eClassifiers xsi:type="ecore:EClass" name="PartialTypeInterpratation" abstract="true"> |
48 | <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1" | 48 | <eStructuralFeatures xsi:type="ecore:EReference" name="elements" upperBound="-1" |
49 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> | 49 | eType="ecore:EClass ../../hu.bme.mit.inf.dslreasoner.logic.model/model/logiclanguage.ecore#//DefinedElement"/> |
50 | <eStructuralFeatures xsi:type="ecore:EReference" name="scopes" upperBound="-1" | ||
51 | eType="#//Scope" eOpposite="#//Scope/targetTypeInterpretation"/> | ||
50 | </eClassifiers> | 52 | </eClassifiers> |
51 | <eClassifiers xsi:type="ecore:EClass" name="RelationLink" abstract="true"/> | 53 | <eClassifiers xsi:type="ecore:EClass" name="RelationLink" abstract="true"/> |
52 | <eClassifiers xsi:type="ecore:EClass" name="UnaryElementRelationLink" eSuperTypes="#//RelationLink"> | 54 | <eClassifiers xsi:type="ecore:EClass" name="UnaryElementRelationLink" eSuperTypes="#//RelationLink"> |
@@ -89,7 +91,7 @@ | |||
89 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxNewElements" lowerBound="1" | 91 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="maxNewElements" lowerBound="1" |
90 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/> | 92 | eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/> |
91 | <eStructuralFeatures xsi:type="ecore:EReference" name="targetTypeInterpretation" | 93 | <eStructuralFeatures xsi:type="ecore:EReference" name="targetTypeInterpretation" |
92 | lowerBound="1" eType="#//PartialTypeInterpratation"/> | 94 | lowerBound="1" eType="#//PartialTypeInterpratation" eOpposite="#//PartialTypeInterpratation/scopes"/> |
93 | </eClassifiers> | 95 | </eClassifiers> |
94 | <eClassifiers xsi:type="ecore:EClass" name="PartialPrimitiveInterpretation" abstract="true" | 96 | <eClassifiers xsi:type="ecore:EClass" name="PartialPrimitiveInterpretation" abstract="true" |
95 | eSuperTypes="#//PartialTypeInterpratation"/> | 97 | eSuperTypes="#//PartialTypeInterpratation"/> |
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 45379e36..378adf65 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 | |||
@@ -1,5 +1,6 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner | 1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner |
2 | 2 | ||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel | ||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner | 4 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner |
4 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasonerException | 5 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasonerException |
5 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration | 6 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration |
@@ -29,7 +30,6 @@ import org.eclipse.viatra.dse.api.DesignSpaceExplorer | |||
29 | import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel | 30 | import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel |
30 | import org.eclipse.viatra.dse.solutionstore.SolutionStore | 31 | import org.eclipse.viatra.dse.solutionstore.SolutionStore |
31 | import org.eclipse.viatra.dse.statecode.IStateCoderFactory | 32 | import org.eclipse.viatra.dse.statecode.IStateCoderFactory |
32 | import javax.security.auth.login.Configuration.Parameters | ||
33 | 33 | ||
34 | class ViatraReasoner extends LogicReasoner{ | 34 | class ViatraReasoner extends LogicReasoner{ |
35 | val PartialInterpretationInitialiser initialiser = new PartialInterpretationInitialiser() | 35 | val PartialInterpretationInitialiser initialiser = new PartialInterpretationInitialiser() |
@@ -56,6 +56,9 @@ class ViatraReasoner extends LogicReasoner{ | |||
56 | val transformationStartTime = System.nanoTime | 56 | val transformationStartTime = System.nanoTime |
57 | 57 | ||
58 | val emptySolution = initialiser.initialisePartialInterpretation(problem,viatraConfig.typeScopes).output | 58 | val emptySolution = initialiser.initialisePartialInterpretation(problem,viatraConfig.typeScopes).output |
59 | if(viatraConfig.documentationLevel == DocumentationLevel::FULL && workspace !== null) { | ||
60 | workspace.writeModel(emptySolution,"init.partialmodel") | ||
61 | } | ||
59 | emptySolution.problemConainer = problem | 62 | emptySolution.problemConainer = problem |
60 | 63 | ||
61 | val method = modelGenerationMethodProvider.createModelGenerationMethod( | 64 | val method = modelGenerationMethodProvider.createModelGenerationMethod( |
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 7862262b..effc37f8 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 | |||
@@ -32,6 +32,7 @@ import org.eclipse.viatra.query.runtime.api.IQuerySpecification; | |||
32 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | 32 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; |
33 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; | 33 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; |
34 | 34 | ||
35 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel; | ||
35 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; | 36 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; |
36 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; | 37 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; |
37 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.InconsistencyResult; | 38 | import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.InconsistencyResult; |
@@ -113,12 +114,12 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { | |||
113 | 114 | ||
114 | ViatraQueryEngine engine = context.getQueryEngine(); | 115 | ViatraQueryEngine engine = context.getQueryEngine(); |
115 | // // TODO: visualisation | 116 | // // TODO: visualisation |
116 | // matchers = new LinkedList<ViatraQueryMatcher<? extends IPatternMatch>>(); | 117 | matchers = new LinkedList<ViatraQueryMatcher<? extends IPatternMatch>>(); |
117 | // for(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> p : this.method.getAllPatterns()) { | 118 | for(IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> p : this.method.getAllPatterns()) { |
118 | // System.out.println(p.getSimpleName()); | 119 | //System.out.println(p.getSimpleName()); |
119 | // ViatraQueryMatcher<? extends IPatternMatch> matcher = p.getMatcher(engine); | 120 | ViatraQueryMatcher<? extends IPatternMatch> matcher = p.getMatcher(engine); |
120 | // matchers.add(matcher); | 121 | matchers.add(matcher); |
121 | // } | 122 | } |
122 | 123 | ||
123 | this.solutionStoreWithCopy = new SolutionStoreWithCopy(); | 124 | this.solutionStoreWithCopy = new SolutionStoreWithCopy(); |
124 | this.solutionStoreWithDiversityDescriptor = new SolutionStoreWithDiversityDescriptor(configuration.diversityRequirement); | 125 | this.solutionStoreWithDiversityDescriptor = new SolutionStoreWithDiversityDescriptor(configuration.diversityRequirement); |
@@ -152,7 +153,18 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { | |||
152 | final Object[] firstTrajectory = context.getTrajectory().toArray(new Object[0]); | 153 | final Object[] firstTrajectory = context.getTrajectory().toArray(new Object[0]); |
153 | TrajectoryWithFitness currentTrajectoryWithFittness = new TrajectoryWithFitness(firstTrajectory, firstFittness); | 154 | TrajectoryWithFitness currentTrajectoryWithFittness = new TrajectoryWithFitness(firstTrajectory, firstFittness); |
154 | trajectoiresToExplore.add(currentTrajectoryWithFittness); | 155 | trajectoiresToExplore.add(currentTrajectoryWithFittness); |
155 | 156 | ||
157 | //if(configuration) | ||
158 | visualiseCurrentState(); | ||
159 | // for(ViatraQueryMatcher<? extends IPatternMatch> matcher : matchers) { | ||
160 | // System.out.println(matcher.getPatternName()); | ||
161 | // System.out.println("---------"); | ||
162 | // for(IPatternMatch m : matcher.getAllMatches()) { | ||
163 | // System.out.println(m); | ||
164 | // } | ||
165 | // System.out.println("---------"); | ||
166 | // } | ||
167 | |||
156 | mainLoop: while (!isInterrupted && !configuration.progressMonitor.isCancelled()) { | 168 | mainLoop: while (!isInterrupted && !configuration.progressMonitor.isCancelled()) { |
157 | 169 | ||
158 | if (currentTrajectoryWithFittness == null) { | 170 | if (currentTrajectoryWithFittness == null) { |
@@ -189,7 +201,12 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { | |||
189 | 201 | ||
190 | visualiseCurrentState(); | 202 | visualiseCurrentState(); |
191 | // for(ViatraQueryMatcher<? extends IPatternMatch> matcher : matchers) { | 203 | // for(ViatraQueryMatcher<? extends IPatternMatch> matcher : matchers) { |
192 | // System.out.println(matcher.getPatternName() + " - " + matcher.getAllValues("element")); | 204 | // System.out.println(matcher.getPatternName()); |
205 | // System.out.println("---------"); | ||
206 | // for(IPatternMatch m : matcher.getAllMatches()) { | ||
207 | // System.out.println(m); | ||
208 | // } | ||
209 | // System.out.println("---------"); | ||
193 | // } | 210 | // } |
194 | 211 | ||
195 | boolean consistencyCheckResult = checkConsistency(currentTrajectoryWithFittness); | 212 | boolean consistencyCheckResult = checkConsistency(currentTrajectoryWithFittness); |
@@ -295,7 +312,7 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { | |||
295 | 312 | ||
296 | public void visualiseCurrentState() { | 313 | public void visualiseCurrentState() { |
297 | PartialInterpretationVisualiser partialInterpretatioVisualiser = configuration.debugCongiguration.partialInterpretatioVisualiser; | 314 | PartialInterpretationVisualiser partialInterpretatioVisualiser = configuration.debugCongiguration.partialInterpretatioVisualiser; |
298 | if(partialInterpretatioVisualiser != null) { | 315 | if(partialInterpretatioVisualiser != null && this.configuration.documentationLevel == DocumentationLevel.FULL && workspace != null) { |
299 | PartialInterpretation p = (PartialInterpretation) (context.getModel()); | 316 | PartialInterpretation p = (PartialInterpretation) (context.getModel()); |
300 | int id = ++numberOfPrintedModel; | 317 | int id = ++numberOfPrintedModel; |
301 | if (id % configuration.debugCongiguration.partalInterpretationVisualisationFrequency == 0) { | 318 | if (id % configuration.debugCongiguration.partalInterpretationVisualisationFrequency == 0) { |