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

Fix obvious OptimisticGround bug

parent de24011e
Branches
Tags
No related merge requests found
...@@ -30,14 +30,15 @@ case object OptimisticGround extends Rule("Optimistic Ground") { ...@@ -30,14 +30,15 @@ case object OptimisticGround extends Rule("Optimistic Ground") {
while (result.isEmpty && i < maxTries && continue) { while (result.isEmpty && i < maxTries && continue) {
val phi = andJoin(p.pc +: p.phi +: predicates) val phi = andJoin(p.pc +: p.phi +: predicates)
val notPhi = andJoin(p.pc +: not(p.phi) +: predicates)
//println("SOLVING " + phi + " ...") //println("SOLVING " + phi + " ...")
solver.solveSAT(phi) match { solver.solveSAT(phi) match {
case (Some(true), satModel) => case (Some(true), satModel) =>
val newPhi = valuateWithModelIn(phi, xss, satModel) val newNotPhi = valuateWithModelIn(notPhi, xss, satModel)
//println("REFUTING " + Not(newPhi) + "...") //println("REFUTING " + Not(newNotPhi) + "...")
solver.solveSAT(Not(newPhi)) match { solver.solveSAT(newNotPhi) match {
case (Some(true), invalidModel) => case (Some(true), invalidModel) =>
// Found as such as the xs break, refine predicates // Found as such as the xs break, refine predicates
predicates = valuateWithModelIn(phi, ass, invalidModel) +: predicates predicates = valuateWithModelIn(phi, ass, invalidModel) +: predicates
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment