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

Fix error preventing postConditions from being z3ified in FairZ3Solver

parent ba41c6b2
Branches
Tags
No related merge requests found
...@@ -393,7 +393,7 @@ trait AbstractZ3Solver extends solvers.IncrementalSolverBuilder { ...@@ -393,7 +393,7 @@ trait AbstractZ3Solver extends solvers.IncrementalSolverBuilder {
// scala.sys.error("Error in formula being translated to Z3: identifier " + id + " seems to have escaped its let-definition") // scala.sys.error("Error in formula being translated to Z3: identifier " + id + " seems to have escaped its let-definition")
// } // }
assert(!this.isInstanceOf[FairZ3Solver], "This should not happen using FairZ3Solver") assert(!this.isInstanceOf[FairZ3Solver], "Trying to convert unknown variable '"+id+"' while using FairZ3")
val newAST = z3.mkFreshConst(id.uniqueName/*name*/, typeToSort(v.getType)) val newAST = z3.mkFreshConst(id.uniqueName/*name*/, typeToSort(v.getType))
z3Vars = z3Vars + (id -> newAST) z3Vars = z3Vars + (id -> newAST)
......
...@@ -205,7 +205,7 @@ object FunctionTemplate { ...@@ -205,7 +205,7 @@ object FunctionTemplate {
} }
val finalPred2 : Expr = rec(activatingBool, true, postHolds) val finalPred2 : Expr = rec(activatingBool, true, postHolds)
storeGuarded(activatingBool, true, postHolds) storeGuarded(activatingBool, true, finalPred2)
} }
new FunctionTemplate(solver, funDef, activatingBool, Set(condVars.toSeq : _*), Set(exprVars.toSeq : _*), Map(guardedExprs.toSeq : _*)) new FunctionTemplate(solver, funDef, activatingBool, Set(condVars.toSeq : _*), Set(exprVars.toSeq : _*), Map(guardedExprs.toSeq : _*))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment