diff options
author | 2018-09-19 14:22:01 +0200 | |
---|---|---|
committer | 2018-09-19 14:22:01 +0200 | |
commit | 8872950a961a07525a871ea5459f67ae138546a1 (patch) | |
tree | bbb3d8480fac8b1b241cf812b0a5bf48a5e90e69 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend | |
parent | Merge branch 'master' into hypergraphs (diff) | |
download | VIATRA-Generator-8872950a961a07525a871ea5459f67ae138546a1.tar.gz VIATRA-Generator-8872950a961a07525a871ea5459f67ae138546a1.tar.zst VIATRA-Generator-8872950a961a07525a871ea5459f67ae138546a1.zip |
Extend hypergraph shaping functionality
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend')
1 files changed, 19 insertions, 2 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend index 8aaaacb5..1a276090 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretation2logic/InstanceModel2PartialInterpretation.xtend | |||
@@ -40,7 +40,16 @@ class InstanceModel2PartialInterpretation { | |||
40 | return transform(metamodelTranslationResult,objects,withID) | 40 | return transform(metamodelTranslationResult,objects,withID) |
41 | } | 41 | } |
42 | 42 | ||
43 | public def transform( | 43 | public def transformWithTrace( |
44 | TracedOutput<LogicProblem, Ecore2Logic_Trace> metamodelTranslationResult, | ||
45 | Resource resource, | ||
46 | boolean withID) | ||
47 | { | ||
48 | val objects = resource.allContents.toList | ||
49 | return transformWithTrace(metamodelTranslationResult,objects,withID) | ||
50 | } | ||
51 | |||
52 | public def transformWithTrace( | ||
44 | TracedOutput<LogicProblem, Ecore2Logic_Trace> metamodelTranslationResult, | 53 | TracedOutput<LogicProblem, Ecore2Logic_Trace> metamodelTranslationResult, |
45 | List<EObject> objects, | 54 | List<EObject> objects, |
46 | boolean withID) | 55 | boolean withID) |
@@ -130,7 +139,15 @@ class InstanceModel2PartialInterpretation { | |||
130 | } | 139 | } |
131 | } | 140 | } |
132 | 141 | ||
133 | return partialInterpretation | 142 | return new TracedOutput(partialInterpretation,object2DefinedElement) |
143 | } | ||
144 | |||
145 | public def transform( | ||
146 | TracedOutput<LogicProblem, Ecore2Logic_Trace> metamodelTranslationResult, | ||
147 | List<EObject> objects, | ||
148 | boolean withID) | ||
149 | { | ||
150 | return transformWithTrace(metamodelTranslationResult,objects,withID).output | ||
134 | } | 151 | } |
135 | 152 | ||
136 | private def createTypeScopesFromKnownAttributeValues(List<EObject> objects, Set<EAttribute> attributesUsed) { | 153 | private def createTypeScopesFromKnownAttributeValues(List<EObject> objects, Set<EAttribute> attributesUsed) { |