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

Implement solver support for FiniteArray

parent fef81288
No related branches found
No related tags found
No related merge requests found
......@@ -522,6 +522,14 @@ trait AbstractZ3Solver extends solvers.IncrementalSolverBuilder {
val res = getLength(ar)
res
}
case arr @ FiniteArray(exprs) => {
val ArrayType(innerType) = arr.getType
val arrayType = arr.getType
val a: Expr = ArrayFill(IntLiteral(exprs.length), simplestValue(innerType)).setType(arrayType)
val u = exprs.zipWithIndex.foldLeft(a)((array, expI) => ArrayUpdated(array, IntLiteral(expI._2), expI._1).setType(arrayType))
rec(u)
}
case Distinct(exs) => z3.mkDistinct(exs.map(rec(_)): _*)
case _ => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment