diff options
Diffstat (limited to 'Tests/hu.bme.mit.inf.dslreasoner.run/src/hu')
2 files changed, 12 insertions, 5 deletions
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend index e07da778..43d145d3 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend | |||
@@ -74,8 +74,8 @@ class FAMLoader extends MetamodelLoader{ | |||
74 | val patterns = i.specifications.toList | 74 | val patterns = i.specifications.toList |
75 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet | 75 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet |
76 | val derivedFeatures = new LinkedHashMap | 76 | val derivedFeatures = new LinkedHashMap |
77 | derivedFeatures.put(i.type.internalQueryRepresentation,metamodel.attributes.filter[it.name == "type"].head) | 77 | derivedFeatures.put(i.type,metamodel.attributes.filter[it.name == "type"].head) |
78 | derivedFeatures.put(i.model.internalQueryRepresentation,metamodel.references.filter[it.name == "model"].head) | 78 | derivedFeatures.put(i.model,metamodel.references.filter[it.name == "model"].head) |
79 | val res = new ViatraQuerySetDescriptor( | 79 | val res = new ViatraQuerySetDescriptor( |
80 | patterns, | 80 | patterns, |
81 | wfPatterns, | 81 | wfPatterns, |
@@ -196,7 +196,7 @@ class FileSystemLoader extends MetamodelLoader{ | |||
196 | val patterns = patternGroup.specifications.toList | 196 | val patterns = patternGroup.specifications.toList |
197 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet | 197 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet |
198 | val derivedFeatures = new HashMap | 198 | val derivedFeatures = new HashMap |
199 | derivedFeatures.put(patternGroup.live.internalQueryRepresentation,metamodel.references.filter[it.name == "live"].head) | 199 | derivedFeatures.put(patternGroup.live,metamodel.references.filter[it.name == "live"].head) |
200 | return new ViatraQuerySetDescriptor( | 200 | return new ViatraQuerySetDescriptor( |
201 | patterns, | 201 | patterns, |
202 | wfPatterns, | 202 | wfPatterns, |
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend index d0f88b65..863a91c8 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SimpleRun.xtend | |||
@@ -34,6 +34,8 @@ import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore | |||
34 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner | 34 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner |
35 | import java.util.LinkedList | 35 | import java.util.LinkedList |
36 | import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualisation | 36 | import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualisation |
37 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicStructureBuilder | ||
38 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicProblemBuilder | ||
37 | 39 | ||
38 | class SimpleRun { | 40 | class SimpleRun { |
39 | 41 | ||
@@ -93,6 +95,11 @@ class SimpleRun { | |||
93 | val interpretations = reasoner.getInterpretations(solution as ModelResult) | 95 | val interpretations = reasoner.getInterpretations(solution as ModelResult) |
94 | val models = new LinkedList | 96 | val models = new LinkedList |
95 | for(interpretation : interpretations) { | 97 | for(interpretation : interpretations) { |
98 | val extension b = new LogicStructureBuilder | ||
99 | val extension a = new LogicProblemBuilder | ||
100 | |||
101 | |||
102 | |||
96 | val instanceModel = logic2Ecore.transformInterpretation(interpretation,modelGenerationProblem.trace) | 103 | val instanceModel = logic2Ecore.transformInterpretation(interpretation,modelGenerationProblem.trace) |
97 | models+=instanceModel | 104 | models+=instanceModel |
98 | } | 105 | } |
@@ -115,8 +122,8 @@ class SimpleRun { | |||
115 | val patterns = i.specifications.toList | 122 | val patterns = i.specifications.toList |
116 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet | 123 | val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet |
117 | val derivedFeatures = new LinkedHashMap | 124 | val derivedFeatures = new LinkedHashMap |
118 | derivedFeatures.put(i.type.internalQueryRepresentation,metamodel.attributes.filter[it.name == "type"].head) | 125 | derivedFeatures.put(i.type,metamodel.attributes.filter[it.name == "type"].head) |
119 | derivedFeatures.put(i.model.internalQueryRepresentation,metamodel.references.filter[it.name == "model"].head) | 126 | derivedFeatures.put(i.model,metamodel.references.filter[it.name == "model"].head) |
120 | val res = new ViatraQuerySetDescriptor( | 127 | val res = new ViatraQuerySetDescriptor( |
121 | patterns, | 128 | patterns, |
122 | wfPatterns, | 129 | wfPatterns, |