aboutsummaryrefslogtreecommitdiffstats
path: root/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend
diff options
context:
space:
mode:
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend')
-rw-r--r--Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend20
1 files changed, 12 insertions, 8 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend
index a5739edf..bf593add 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend
@@ -13,6 +13,8 @@ import java.util.Map
13import java.util.Set 13import java.util.Set
14 14
15import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* 15import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.*
16import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation
17import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation
16 18
17abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresentation,NodeRepresentation> { 19abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresentation,NodeRepresentation> {
18 private val boolean deepRepresentation 20 private val boolean deepRepresentation
@@ -33,6 +35,7 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresenta
33 * @param model The model to be represented. 35 * @param model The model to be represented.
34 * @param range The range of the neighbourhood. 36 * @param range The range of the neighbourhood.
35 * @param parallels The maximal number of parallel references to be differentiated. 37 * @param parallels The maximal number of parallel references to be differentiated.
38 * @param maxNumber The maximal number of elements in a equivalence class that chan be differentiated.
36 */ 39 */
37 def public createRepresentation(PartialInterpretation model, int range, int parallels, int maxNumber) { 40 def public createRepresentation(PartialInterpretation model, int range, int parallels, int maxNumber) {
38 return createRepresentation(model,range,parallels,maxNumber,null,null) 41 return createRepresentation(model,range,parallels,maxNumber,null,null)
@@ -187,10 +190,7 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresenta
187 return 190 return
188 model.problem.elements + 191 model.problem.elements +
189 model.newElements + 192 model.newElements +
190 model.booleanelements+ 193 model.openWorldElements
191 model.integerelements+
192 model.stringelement+
193 model.realelements
194 } 194 }
195 195
196 def private fillTypes(PartialInterpretation model, Map<DefinedElement, Set<String>> node2Type, Set<TypeDeclaration> relevantTypes) { 196 def private fillTypes(PartialInterpretation model, Map<DefinedElement, Set<String>> node2Type, Set<TypeDeclaration> relevantTypes) {
@@ -202,10 +202,14 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation<ModelRepresenta
202// // Dont need 202// // Dont need
203// } 203// }
204 for(typeInterpretation : model.partialtypeinterpratation) { 204 for(typeInterpretation : model.partialtypeinterpratation) {
205 val type = typeInterpretation.interpretationOf 205 if(typeInterpretation instanceof PartialPrimitiveInterpretation) {
206 if(type.isRelevant(relevantTypes)) { 206
207 for(element : typeInterpretation.elements) { 207 } else if(typeInterpretation instanceof PartialComplexTypeInterpretation) {
208 element.lookup(node2Type).add(type.name) 208 val type = typeInterpretation.interpretationOf
209 if(type.isRelevant(relevantTypes)) {
210 for(element : typeInterpretation.elements) {
211 element.lookup(node2Type).add(type.name)
212 }
209 } 213 }
210 } 214 }
211 } 215 }