3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 03:15:50 +00:00

update managed APIs for lambda-based array models #2400

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-07-13 16:20:36 -04:00
parent 659be6940b
commit 2d4e9a0f67
3 changed files with 6 additions and 10 deletions

View file

@ -50,12 +50,9 @@ public class Model extends Z3Object {
public Expr getConstInterp(FuncDecl f)
{
getContext().checkContextMatch(f);
if (f.getArity() != 0
|| Native.getSortKind(getContext().nCtx(),
Native.getRange(getContext().nCtx(), f.getNativeObject())) == Z3_sort_kind.Z3_ARRAY_SORT
.toInt())
if (f.getArity() != 0)
throw new Z3Exception(
"Non-zero arity functions and arrays have FunctionInterpretations as a model. Use getFuncInterp.");
"Non-zero arity functions have FunctionInterpretations as a model. Use getFuncInterp.");
long n = Native.modelGetConstInterp(getContext().nCtx(), getNativeObject(),
f.getNativeObject());