Skip to content
Snippets Groups Projects
Commit 3d469259 authored by Etienne Kneuss's avatar Etienne Kneuss
Browse files

Prevent IntegerEquation from generating empty sub-problems

parent 0dbec698
No related branches found
No related tags found
No related merge requests found
......@@ -58,9 +58,6 @@ class FileInterface(reporter: Reporter) {
// Get base indentation of last line:
val lineChars = before.substring(before.lastIndexOf('\n')+1).toList
println(lineChars)
println(lineChars.takeWhile(_ == ' '))
val indent = lineChars.takeWhile(_ == ' ').size
val p = new ScalaPrinter(PrinterOptions())
......
......@@ -110,7 +110,13 @@ case object IntegerEquation extends Rule("Integer Equation") {
None
}
List(RuleInstantiation.immediateDecomp(problem, this, List(newProblem), onSuccess, this.name))
if (subproblemxs.isEmpty) {
// we directly solve
List(RuleInstantiation.immediateSuccess(problem, this, onSuccess(List(Solution(And(eqPre, problem.pc), Set(), Tuple(Seq())))).get))
} else {
List(RuleInstantiation.immediateDecomp(problem, this, List(newProblem), onSuccess, this.name))
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment