3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-26 10:05:38 +00:00

Add missing Java API method for as-array

This commit is contained in:
Ruijie Fang 2026-02-24 13:55:39 -06:00
parent 4f4e657449
commit 6b79297252

View file

@ -1999,6 +1999,19 @@ public class Context implements AutoCloseable {
Native.mkArrayDefault(nCtx(), array.getNativeObject()));
}
/** * Create an as-array expression from a function declaration.
* @param f the function declaration to lift into an array.
* Must have exactly one domain sort.
* @see #mkTermArray(Expr)
* @see #mkMap(FuncDecl, Expr[])
**/
public final <D extends Sort, R extends Sort> ArrayExpr<D, R> mkAsArray(FuncDecl<R> f)
{
checkContextMatch(f);
return (ArrayExpr<D, R>) Expr.create(this, Native.mkAsArray(nCtx(), f.getNativeObject()));
}
/**
* Create Extentionality index. Two arrays are equal if and only if they are equal on the index returned by MkArrayExt.
**/