diff options
author | 2020-05-12 02:18:02 +0200 | |
---|---|---|
committer | 2020-05-12 02:18:02 +0200 | |
commit | cc3c5ecce23e77c960801c9ac6d80aad1deadaec (patch) | |
tree | 95bc8627fe5b9bcb044913eee3ae277392165ab9 /Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit | |
parent | Merge branch 'master' of https://github.com/viatra/VIATRA-Generator (diff) | |
download | VIATRA-Generator-cc3c5ecce23e77c960801c9ac6d80aad1deadaec.tar.gz VIATRA-Generator-cc3c5ecce23e77c960801c9ac6d80aad1deadaec.tar.zst VIATRA-Generator-cc3c5ecce23e77c960801c9ac6d80aad1deadaec.zip |
variable indexing bugs in referred patterns in UP
Diffstat (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit')
-rw-r--r-- | Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnitPropagationPreconditionGenerator.xtend | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnitPropagationPreconditionGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnitPropagationPreconditionGenerator.xtend index 91a7a2c2..400f47bc 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnitPropagationPreconditionGenerator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnitPropagationPreconditionGenerator.xtend | |||
@@ -211,7 +211,7 @@ class UnitPropagationPreconditionGenerator { | |||
211 | // Propagation for constraint referred indirectly from this pattern through «referredName» | 211 | // Propagation for constraint referred indirectly from this pattern through «referredName» |
212 | find «referredName»(problem, interpretation, | 212 | find «referredName»(problem, interpretation, |
213 | «FOR index : 0..<referredPQuery.parameters.size SEPARATOR ", "»«positive.getVariableInTuple(index).canonizeName»«ENDFOR», | 213 | «FOR index : 0..<referredPQuery.parameters.size SEPARATOR ", "»«positive.getVariableInTuple(index).canonizeName»«ENDFOR», |
214 | «FOR index : 0..c.arity SEPARATOR ", "»«canonizeName(index,pm)»«ENDFOR»); | 214 | «FOR index : 1..c.arity SEPARATOR ", "»«canonizeName(index,pm)»«ENDFOR»); |
215 | ''' | 215 | ''' |
216 | } | 216 | } |
217 | // Otherwise, if the referred pattern is not satisfiable, this pattern is not satisfiable either | 217 | // Otherwise, if the referred pattern is not satisfiable, this pattern is not satisfiable either |
@@ -234,7 +234,7 @@ class UnitPropagationPreconditionGenerator { | |||
234 | // Propagation for constraint referred indirectly from this pattern through «referredName» | 234 | // Propagation for constraint referred indirectly from this pattern through «referredName» |
235 | find «referredName»(problem, interpretation, | 235 | find «referredName»(problem, interpretation, |
236 | «FOR index : 0..<referredPQuery.parameters.size SEPARATOR ", "»«(negative.actualParametersTuple.get(index) as PVariable).canonizeName»«ENDFOR», | 236 | «FOR index : 0..<referredPQuery.parameters.size SEPARATOR ", "»«(negative.actualParametersTuple.get(index) as PVariable).canonizeName»«ENDFOR», |
237 | «FOR index : 0..c.arity SEPARATOR ", "»«canonizeName(index,pm)»«ENDFOR»); | 237 | «FOR index : 1..c.arity SEPARATOR ", "»«canonizeName(index,pm)»«ENDFOR»); |
238 | ''' | 238 | ''' |
239 | } else { | 239 | } else { |
240 | generatedBodies += ''' | 240 | generatedBodies += ''' |