Skip to content
Snippets Groups Projects
Commit a016c08f authored by Mikaël Mayer's avatar Mikaël Mayer
Browse files

Fixed the UnrollingSolver.scala evaluation.

parent 7b47a7f4
No related branches found
No related tags found
No related merge requests found
...@@ -210,7 +210,11 @@ trait AbstractUnrollingSolver[T] ...@@ -210,7 +210,11 @@ trait AbstractUnrollingSolver[T]
private def validateModel(model: Model, assumptions: Seq[Expr], silenceErrors: Boolean): Boolean = { private def validateModel(model: Model, assumptions: Seq[Expr], silenceErrors: Boolean): Boolean = {
val expr = andJoin(assumptions ++ constraints) val expr = andJoin(assumptions ++ constraints)
evaluator.eval(expr, model) match { val newExpr = model.toSeq.foldLeft(expr){
case (e, (k, v)) => let(k, v, e)
}
evaluator.eval(newExpr) match {
case EvaluationResults.Successful(BooleanLiteral(true)) => case EvaluationResults.Successful(BooleanLiteral(true)) =>
reporter.debug("- Model validated.") reporter.debug("- Model validated.")
true true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment