diff options
author | 2021-01-14 13:11:21 -0500 | |
---|---|---|
committer | 2021-01-14 13:11:21 -0500 | |
commit | be2fd000db012b3738211ebee8db36001235c918 (patch) | |
tree | b642948cc40fa1576bbf4eeedcd00bf086e0e8b8 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend | |
parent | forgot to commit some changes to Application (diff) | |
download | VIATRA-Generator-be2fd000db012b3738211ebee8db36001235c918.tar.gz VIATRA-Generator-be2fd000db012b3738211ebee8db36001235c918.tar.zst VIATRA-Generator-be2fd000db012b3738211ebee8db36001235c918.zip |
complete change of real representation BigDecimal->Double
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend')
-rw-r--r-- | Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend index b48d0831..4484052d 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend | |||
@@ -36,7 +36,7 @@ class PartialModelAsLogicInterpretation implements LogicModelInterpretation{ | |||
36 | val Map<DefinedElement,DefinedElement> elementBackwardTrace | 36 | val Map<DefinedElement,DefinedElement> elementBackwardTrace |
37 | val Map<Boolean, BooleanElement> booleanForwardTrace | 37 | val Map<Boolean, BooleanElement> booleanForwardTrace |
38 | val Map<Integer, IntegerElement> integerForwardTrace | 38 | val Map<Integer, IntegerElement> integerForwardTrace |
39 | val Map<BigDecimal, RealElement> realForwardTrace | 39 | val Map<Double, RealElement> realForwardTrace |
40 | val Map<String, StringElement> stringForwardTrace | 40 | val Map<String, StringElement> stringForwardTrace |
41 | 41 | ||
42 | new(PartialInterpretation partialInterpretation, Map<EObject, EObject> forwardMap) { | 42 | new(PartialInterpretation partialInterpretation, Map<EObject, EObject> forwardMap) { |
@@ -51,7 +51,9 @@ class PartialModelAsLogicInterpretation implements LogicModelInterpretation{ | |||
51 | integerForwardTrace = initialisePrimitiveElementTrace( | 51 | integerForwardTrace = initialisePrimitiveElementTrace( |
52 | 0,[it+1],[it],partialInterpretation.newElements.filter(IntegerElement),[it.value]) | 52 | 0,[it+1],[it],partialInterpretation.newElements.filter(IntegerElement),[it.value]) |
53 | realForwardTrace = initialisePrimitiveElementTrace( | 53 | realForwardTrace = initialisePrimitiveElementTrace( |
54 | BigDecimal::ZERO,[it.add(BigDecimal.ONE)],[it],partialInterpretation.newElements.filter(RealElement),[it.value]) | 54 | 0.0,[it+1.0],[it],partialInterpretation.newElements.filter(RealElement),[it.value]) |
55 | // realForwardTrace = initialisePrimitiveElementTrace( | ||
56 | // BigDecimal::ZERO,[it.add(BigDecimal.ONE)],[it],partialInterpretation.newElements.filter(RealElement),[it.value]) | ||
55 | stringForwardTrace = initialisePrimitiveElementTrace( | 57 | stringForwardTrace = initialisePrimitiveElementTrace( |
56 | 0,[it+1],['''String«it»'''],partialInterpretation.newElements.filter(StringElement),[it.value]) | 58 | 0,[it+1],['''String«it»'''],partialInterpretation.newElements.filter(StringElement),[it.value]) |
57 | } | 59 | } |
@@ -116,7 +118,7 @@ class PartialModelAsLogicInterpretation implements LogicModelInterpretation{ | |||
116 | def dispatch elementLookupForward(Integer e) { | 118 | def dispatch elementLookupForward(Integer e) { |
117 | this.integerForwardTrace.get(e) | 119 | this.integerForwardTrace.get(e) |
118 | } | 120 | } |
119 | def dispatch elementLookupForward(BigDecimal e) { | 121 | def dispatch elementLookupForward(Double e) { |
120 | this.realForwardTrace.get(e) | 122 | this.realForwardTrace.get(e) |
121 | } | 123 | } |
122 | def dispatch elementLookupForward(String e) { | 124 | def dispatch elementLookupForward(String e) { |