diff options
author | 2018-03-05 17:59:26 -0500 | |
---|---|---|
committer | 2018-03-05 17:59:26 -0500 | |
commit | 86dbfdb49e051121022d06ddd7249485f13f567a (patch) | |
tree | 33f5153a66fd270c9a0f2a6ea8b7774cf59b6feb /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns | |
parent | Default visualisation set to .svg (diff) | |
download | VIATRA-Generator-86dbfdb49e051121022d06ddd7249485f13f567a.tar.gz VIATRA-Generator-86dbfdb49e051121022d06ddd7249485f13f567a.tar.zst VIATRA-Generator-86dbfdb49e051121022d06ddd7249485f13f567a.zip |
Fixed nasty bug with creating root element
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns')
2 files changed, 3 insertions, 3 deletions
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 1081fafc..c9e183ab 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 | |||
@@ -91,7 +91,7 @@ class GenericTypeRefinementGenerator extends TypeRefinementGenerator { | |||
91 | { | 91 | { |
92 | find interpretation(problem,interpretation); | 92 | find interpretation(problem,interpretation); |
93 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | 93 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); |
94 | PartialTypeInterpratation.interpretationOf.name(type,"«type.name»"); | 94 | PartialTypeInterpratation.interpretationOf.name(typeInterpretation,"«type.name»"); |
95 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"newObject")» | 95 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"newObject")» |
96 | find mayExist(problem, interpretation, newObject); | 96 | find mayExist(problem, interpretation, newObject); |
97 | neg find mustExist(problem, interpretation, newObject); | 97 | neg find mustExist(problem, interpretation, newObject); |
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 81f2f7db..8a6efeeb 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 | |||
@@ -16,8 +16,8 @@ class TypeRefinementWithPreliminaryTypeAnalysis extends TypeRefinementGenerator{ | |||
16 | override requiresTypeAnalysis() { true } | 16 | override requiresTypeAnalysis() { true } |
17 | 17 | ||
18 | override generateRefineObjectQueries(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { | 18 | override generateRefineObjectQueries(LogicProblem p, PartialInterpretation emptySolution, TypeAnalysisResult typeAnalysisResult) { |
19 | val possibleNewDynamicType = typeAnalysisResult.possibleNewDynamicTypes | ||
20 | val containment = p.containmentHierarchies.head | 19 | val containment = p.containmentHierarchies.head |
20 | val possibleNewDynamicType = typeAnalysisResult.possibleNewDynamicTypes | ||
21 | val inverseRelations = new HashMap | 21 | val inverseRelations = new HashMap |
22 | p.annotations.filter(InverseRelationAssertion).forEach[ | 22 | p.annotations.filter(InverseRelationAssertion).forEach[ |
23 | inverseRelations.put(it.inverseA,it.inverseB) | 23 | inverseRelations.put(it.inverseA,it.inverseB) |
@@ -78,7 +78,7 @@ class TypeRefinementWithPreliminaryTypeAnalysis extends TypeRefinementGenerator{ | |||
78 | find interpretation(problem,interpretation); | 78 | find interpretation(problem,interpretation); |
79 | neg find hasElementInContainment(problem,interpretation); | 79 | neg find hasElementInContainment(problem,interpretation); |
80 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); | 80 | PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); |
81 | PartialTypeInterpratation.interpretationOf.name(type,"«type.name»"); | 81 | PartialTypeInterpratation.interpretationOf.name(typeInterpretation,"«type.name»"); |
82 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"newObject")» | 82 | «base.typeIndexer.referInstanceOf(type,Modality.MAY,"newObject")» |
83 | find mayExist(problem, interpretation, newObject); | 83 | find mayExist(problem, interpretation, newObject); |
84 | neg find mustExist(problem, interpretation, newObject); | 84 | neg find mustExist(problem, interpretation, newObject); |