diff options
author | 2018-05-08 17:03:07 +0200 | |
---|---|---|
committer | 2018-05-08 17:03:07 +0200 | |
commit | 4585a4d344da5498200548e7add61e5cccd44924 (patch) | |
tree | 3a030bea39db36db43d97b62124f6c2a7db111a7 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src | |
parent | Updated and fixed dependencies: (diff) | |
download | VIATRA-Generator-4585a4d344da5498200548e7add61e5cccd44924.tar.gz VIATRA-Generator-4585a4d344da5498200548e7add61e5cccd44924.tar.zst VIATRA-Generator-4585a4d344da5498200548e7add61e5cccd44924.zip |
Refactored to the milestone version of Viatra 2.0
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src')
1 files changed, 6 insertions, 6 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend index 9ddee6a7..45fd2c6d 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/PartialInterpretationInitialiser.xtend | |||
@@ -1,15 +1,19 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage | 1 | package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage |
2 | 2 | ||
3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput | 3 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput |
4 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes | ||
4 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration | 5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ConstantDeclaration |
5 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration | 6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.FunctionDeclaration |
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral | ||
6 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory | 8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguageFactory |
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral | ||
7 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration | 10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration |
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringLiteral | ||
8 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type | 12 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type |
9 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration | 13 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration |
10 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition | 14 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition |
11 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem | 15 | import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem |
12 | import hu.bme.mit.inf.dslreasoner.logic.model.patterns.SupertypeStarMatcher | 16 | import hu.bme.mit.inf.dslreasoner.logic.model.patterns.SupertypeStar |
13 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation | 17 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation |
14 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation | 18 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialFunctionInterpretation |
15 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation | 19 | import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation |
@@ -23,10 +27,6 @@ import org.eclipse.viatra.query.runtime.emf.EMFScope | |||
23 | import org.eclipse.xtend.lib.annotations.Data | 27 | import org.eclipse.xtend.lib.annotations.Data |
24 | 28 | ||
25 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | 29 | import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* |
26 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes | ||
27 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral | ||
28 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral | ||
29 | import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringLiteral | ||
30 | 30 | ||
31 | @Data class Problem2PartialInterpretationTrace { | 31 | @Data class Problem2PartialInterpretationTrace { |
32 | Map<TypeDeclaration, PartialTypeInterpratation> type2Interpretation = new HashMap | 32 | Map<TypeDeclaration, PartialTypeInterpratation> type2Interpretation = new HashMap |
@@ -112,7 +112,7 @@ class PartialInterpretationInitialiser { | |||
112 | * Initialize type with existing elements | 112 | * Initialize type with existing elements |
113 | */ | 113 | */ |
114 | def private initialisePartialTypeInterpretation(TypeDeclaration t, ViatraQueryEngine engine, Problem2PartialInterpretationTrace trace) { | 114 | def private initialisePartialTypeInterpretation(TypeDeclaration t, ViatraQueryEngine engine, Problem2PartialInterpretationTrace trace) { |
115 | val supertypeMatcher = SupertypeStarMatcher.on(engine) | 115 | val supertypeMatcher = SupertypeStar.Matcher.on(engine) |
116 | val res = createPartialTypeInterpratation => [ | 116 | val res = createPartialTypeInterpratation => [ |
117 | it.interpretationOf = t | 117 | it.interpretationOf = t |
118 | it.elements += supertypeMatcher.getAllValuesOfsubtype(t) | 118 | it.elements += supertypeMatcher.getAllValuesOfsubtype(t) |