3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 11:25:51 +00:00

Updates for the .NET, Java, and ML APIs for recently changed fixedpoint and interpolation functionality.

Fixes #103
This commit is contained in:
Christoph M. Wintersteiger 2015-05-23 16:53:47 +01:00
parent e33ff42766
commit d8f6d84217
12 changed files with 529 additions and 438 deletions

View file

@ -295,10 +295,8 @@ public class Fixedpoint extends Z3Object
**/
public BoolExpr[] getRules()
{
ASTVector v = new ASTVector(getContext(), Native.fixedpointGetRules(
getContext().nCtx(), getNativeObject()));
return v.ToBoolArray();
ASTVector v = new ASTVector(getContext(), Native.fixedpointGetRules(getContext().nCtx(), getNativeObject()));
return (BoolExpr[]) v.ToExprArray();
}
/**
@ -308,10 +306,8 @@ public class Fixedpoint extends Z3Object
**/
public BoolExpr[] getAssertions()
{
ASTVector v = new ASTVector(getContext(), Native.fixedpointGetAssertions(
getContext().nCtx(), getNativeObject()));
return v.ToBoolArray();
ASTVector v = new ASTVector(getContext(), Native.fixedpointGetAssertions(getContext().nCtx(), getNativeObject()));
return (BoolExpr[]) v.ToExprArray();
}
/**
@ -319,12 +315,34 @@ public class Fixedpoint extends Z3Object
*
* @throws Z3Exception
**/
public Statistics getStatistics() throws Z3Exception
public Statistics getStatistics()
{
return new Statistics(getContext(), Native.fixedpointGetStatistics(
getContext().nCtx(), getNativeObject()));
}
/**
* Parse an SMT-LIB2 file with fixedpoint rules.
* Add the rules to the current fixedpoint context.
* Return the set of queries in the file.
**/
public BoolExpr[] ParseFile(String file)
{
ASTVector av = new ASTVector(getContext(), Native.fixedpointFromFile(getContext().nCtx(), getNativeObject(), file));
return (BoolExpr[])av.ToExprArray();
}
/**
* Parse an SMT-LIB2 string with fixedpoint rules.
* Add the rules to the current fixedpoint context.
* Return the set of queries in the file.
**/
public BoolExpr[] ParseString(String s)
{
ASTVector av = new ASTVector(getContext(), Native.fixedpointFromString(getContext().nCtx(), getNativeObject(), s));
return (BoolExpr[])av.ToExprArray();
}
Fixedpoint(Context ctx, long obj) throws Z3Exception
{