See {@link #getUpperAsVector()} for triple semantics. */ - public ArithExpr[] getLowerAsVector() + public Expr[] getLowerAsVector() { return opt.GetLowerAsVector(handle); } @@ -128,7 +128,7 @@ public class Optimize extends Z3Object { /** * Retrieve the value of an objective. **/ - public ArithExpr getValue() + public Expr getValue() { return getLower(); } @@ -214,7 +214,7 @@ public class Optimize extends Z3Object { * Return a handle to the objective. The handle is used as * to retrieve the values of objectives after calling Check. **/ - public Handle MkMaximize(ArithExpr e) + public Handle MkMaximize(Expr e) { return new Handle(this, Native.optimizeMaximize(getContext().nCtx(), getNativeObject(), e.getNativeObject())); } @@ -223,7 +223,7 @@ public class Optimize extends Z3Object { * Declare an arithmetical minimization objective. * Similar to MkMaximize. **/ - public Handle MkMinimize(ArithExpr e) + public Handle MkMinimize(Expr e) { return new Handle(this, Native.optimizeMinimize(getContext().nCtx(), getNativeObject(), e.getNativeObject())); } @@ -231,17 +231,17 @@ public class Optimize extends Z3Object { /** * Retrieve a lower bound for the objective handle. **/ - private ArithExpr GetLower(int index) + private Expr GetLower(int index) { - return (ArithExpr)Expr.create(getContext(), Native.optimizeGetLower(getContext().nCtx(), getNativeObject(), index)); + return Expr.create(getContext(), Native.optimizeGetLower(getContext().nCtx(), getNativeObject(), index)); } /** * Retrieve an upper bound for the objective handle. **/ - private ArithExpr GetUpper(int index) + private Expr GetUpper(int index) { - return (ArithExpr)Expr.create(getContext(), Native.optimizeGetUpper(getContext().nCtx(), getNativeObject(), index)); + return Expr.create(getContext(), Native.optimizeGetUpper(getContext().nCtx(), getNativeObject(), index)); } /** @@ -249,7 +249,7 @@ public class Optimize extends Z3Object { * *
See {@link Handle#getUpperAsVector}. */ - private ArithExpr[] GetUpperAsVector(int index) { + private Expr[] GetUpperAsVector(int index) { return unpackObjectiveValueVector( Native.optimizeGetUpperAsVector( getContext().nCtx(), getNativeObject(), index @@ -262,7 +262,7 @@ public class Optimize extends Z3Object { * *
See {@link Handle#getLowerAsVector}. */ - private ArithExpr[] GetLowerAsVector(int index) { + private Expr[] GetLowerAsVector(int index) { return unpackObjectiveValueVector( Native.optimizeGetLowerAsVector( getContext().nCtx(), getNativeObject(), index @@ -270,12 +270,12 @@ public class Optimize extends Z3Object { ); } - private ArithExpr[] unpackObjectiveValueVector(long nativeVec) { + private Expr[] unpackObjectiveValueVector(long nativeVec) { ASTVector vec = new ASTVector( getContext(), nativeVec ); - return new ArithExpr[] { - (ArithExpr) vec.get(0), (ArithExpr) vec.get(1), (ArithExpr) vec.get(2) + return new Expr[] { + (Expr) vec.get(0), (Expr) vec.get(1), (Expr) vec.get(2) }; }