Skip to content

Commit

Permalink
Fixed total model extraction in QuantificationManager
Browse files Browse the repository at this point in the history
  • Loading branch information
samarion committed Apr 28, 2016
1 parent c64c7a8 commit 05ed414
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1199,8 +1199,12 @@ class QuantificationManager[T](encoder: TemplateEncoder[T]) extends LambdaManage
}
}.toMap

if (conditionals.isEmpty) {
value
if (conditionals.isEmpty) f match {
case FiniteLambda(mapping, dflt, tpe) =>
Lambda(params.map(ValDef(_)), mapping.foldRight(dflt) { case ((es, v), elze) =>
IfExpr(andJoin((params zip es).map(p => Equals(p._1.toVariable, p._2))), v, elze)
})
case _ => f
} else {
val ((_, dflt)) +: rest = conditionals.toSeq.sortBy { case (conds, _) =>
(conds.flatMap(variablesOf).toSet.size, conds.size)
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/leon/solvers/z3/AbstractZ3Solver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ trait AbstractZ3Solver extends Solver {
)

// @nv: This MUST take place AFTER Z3Context was created!!
// Well... actually maybe not, but let's just leave it here to be sure
toggleWarningMessages(true)

protected var solver : Z3Solver = null
Expand Down

0 comments on commit 05ed414

Please sign in to comment.