Skip to content

Commit

Permalink
Merge branch 'main' into igor/z3-thread-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
konnov authored Oct 4, 2024
2 parents fb11296 + 9e9d099 commit be05b3a
Showing 1 changed file with 3 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -776,27 +776,18 @@ class Z3SolverContext(val config: SolverConfig) extends SolverContext with LazyL
} else {
val (es, ns) = (args.map(toExpr)).unzip
val distinct = z3context.mkDistinct(es: _*)
(distinct.asInstanceOf[ExprSort],
ns.foldLeft(1L) {
_ + _
})
(distinct.asInstanceOf[ExprSort], ns.sum + 1)
}

case OperEx(TlaBoolOper.and, args @ _*) =>
val (es, ns) = (args.map(toExpr)).unzip
val and = z3context.mkAnd(es.map(_.asInstanceOf[BoolExpr]): _*)
(and.asInstanceOf[ExprSort],
ns.foldLeft(1L) {
_ + _
})
(and.asInstanceOf[ExprSort], ns.sum + 1)

case OperEx(TlaBoolOper.or, args @ _*) =>
val (es, ns) = (args.map(toExpr)).unzip
val or = z3context.mkOr(es.map(_.asInstanceOf[BoolExpr]): _*)
(or.asInstanceOf[ExprSort],
ns.foldLeft(1L) {
_ + _
})
(or.asInstanceOf[ExprSort], ns.sum + 1)

case OperEx(TlaBoolOper.implies, lhs, rhs) =>
val (lhsZ3, ln) = toExpr(lhs)
Expand Down

0 comments on commit be05b3a

Please sign in to comment.