diff options
author | 2020-03-31 10:13:34 -0400 | |
---|---|---|
committer | 2020-03-31 10:13:34 -0400 | |
commit | 40303748df2676f23b9617335a401678bdf21ed7 (patch) | |
tree | 997117aa6dcf9143a6c9d637b3cfd37782ae9115 /Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner | |
parent | fixing index out ot bound exceptions for state coders (diff) | |
download | VIATRA-Generator-40303748df2676f23b9617335a401678bdf21ed7.tar.gz VIATRA-Generator-40303748df2676f23b9617335a401678bdf21ed7.tar.zst VIATRA-Generator-40303748df2676f23b9617335a401678bdf21ed7.zip |
Added call to form numeric problem templates
Diffstat (limited to 'Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner')
-rw-r--r-- | Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/ExpressionEvaluation2Logic.xtend | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/ExpressionEvaluation2Logic.xtend b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/ExpressionEvaluation2Logic.xtend index f474ded4..a1e18250 100644 --- a/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/ExpressionEvaluation2Logic.xtend +++ b/Framework/hu.bme.mit.inf.dslreasoner.viatra2logic/src/hu/bme/mit/inf/dslreasoner/viatra2logic/ExpressionEvaluation2Logic.xtend | |||
@@ -16,12 +16,17 @@ import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* | |||
16 | 16 | ||
17 | class ExpressionEvaluation2Logic { | 17 | class ExpressionEvaluation2Logic { |
18 | val extension LogicProblemBuilder builder = new LogicProblemBuilder | 18 | val extension LogicProblemBuilder builder = new LogicProblemBuilder |
19 | val NumericProblemSolver numericSolver = new NumericProblemSolver | ||
19 | 20 | ||
20 | def Term transformCheck(XExpression expression, Map<PVariable, Variable> variable2Variable) { | 21 | def Term transformCheck(XExpression expression, Map<PVariable, Variable> variable2Variable) { |
21 | return expression.transform(variable2Variable) | 22 | return expression.transform(variable2Variable) |
22 | } | 23 | } |
24 | |||
23 | def Term transformEval(PVariable target, XExpression expression, Map<PVariable, Variable> variable2Variable) { | 25 | def Term transformEval(PVariable target, XExpression expression, Map<PVariable, Variable> variable2Variable) { |
24 | return target.lookup(variable2Variable) == expression.transform(variable2Variable) | 26 | val test = expression.transform(variable2Variable) |
27 | numericSolver.formNumericProblemTemplate(expression) | ||
28 | |||
29 | return test | ||
25 | } | 30 | } |
26 | 31 | ||
27 | static val N_Base = "org.eclipse.xtext.xbase.lib." | 32 | static val N_Base = "org.eclipse.xtext.xbase.lib." |