mirror of
https://github.com/Z3Prover/z3
synced 2025-08-11 13:40:52 +00:00
Java API: slight overhaul in preparation for the FP additions
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
8e7278f02c
commit
376614a782
38 changed files with 1289 additions and 889 deletions
|
@ -22,11 +22,11 @@ import java.lang.String;
|
|||
|
||||
import com.microsoft.z3.enumerations.Z3_lbool;
|
||||
|
||||
/** <summary>
|
||||
/**
|
||||
* The InterpolationContext is suitable for generation of interpolants.
|
||||
* </summary>
|
||||
* <remarks>For more information on interpolation please refer
|
||||
* too the C/C++ API, which is well documented.</remarks>
|
||||
*
|
||||
* Remarks: For more information on interpolation please refer
|
||||
* too the C/C++ API, which is well documented.
|
||||
**/
|
||||
public class InterpolationContext extends Context
|
||||
{
|
||||
|
@ -42,7 +42,9 @@ public class InterpolationContext extends Context
|
|||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* <remarks><seealso cref="Context.Context(Dictionary<string, string>)"/></remarks>
|
||||
*
|
||||
* Remarks:
|
||||
* @see Context#Context
|
||||
**/
|
||||
public InterpolationContext(Map<String, String> settings) throws Z3Exception
|
||||
{
|
||||
|
@ -56,7 +58,7 @@ public class InterpolationContext extends Context
|
|||
|
||||
/**
|
||||
* Create an expression that marks a formula position for interpolation.
|
||||
* @throws Z3Exception
|
||||
* @throws Z3Exception
|
||||
**/
|
||||
public BoolExpr MkInterpolant(BoolExpr a) throws Z3Exception
|
||||
{
|
||||
|
@ -66,9 +68,9 @@ public class InterpolationContext extends Context
|
|||
|
||||
/**
|
||||
* Computes an interpolant.
|
||||
* <remarks>For more information on interpolation please refer
|
||||
* Remarks: For more information on interpolation please refer
|
||||
* too the function Z3_get_interpolant in the C/C++ API, which is
|
||||
* well documented.</remarks>
|
||||
* well documented.
|
||||
* @throws Z3Exception
|
||||
**/
|
||||
Expr[] GetInterpolant(Expr pf, Expr pat, Params p) throws Z3Exception
|
||||
|
@ -87,9 +89,9 @@ public class InterpolationContext extends Context
|
|||
|
||||
/**
|
||||
* Computes an interpolant.
|
||||
* <remarks>For more information on interpolation please refer
|
||||
* Remarks: For more information on interpolation please refer
|
||||
* too the function Z3_compute_interpolant in the C/C++ API, which is
|
||||
* well documented.</remarks>
|
||||
* well documented.
|
||||
* @throws Z3Exception
|
||||
**/
|
||||
Z3_lbool ComputeInterpolant(Expr pat, Params p, ASTVector interp, Model model) throws Z3Exception
|
||||
|
@ -105,23 +107,23 @@ public class InterpolationContext extends Context
|
|||
return Z3_lbool.fromInt(r);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Return a string summarizing cumulative time used for interpolation.
|
||||
/// </summary>
|
||||
/// <remarks>For more information on interpolation please refer
|
||||
///
|
||||
/// Remarks: For more information on interpolation please refer
|
||||
/// too the function Z3_interpolation_profile in the C/C++ API, which is
|
||||
/// well documented.</remarks>
|
||||
/// well documented.
|
||||
public String InterpolationProfile() throws Z3Exception
|
||||
{
|
||||
return Native.interpolationProfile(nCtx());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Checks the correctness of an interpolant.
|
||||
/// </summary>
|
||||
/// <remarks>For more information on interpolation please refer
|
||||
///
|
||||
/// Remarks: For more information on interpolation please refer
|
||||
/// too the function Z3_check_interpolant in the C/C++ API, which is
|
||||
/// well documented.</remarks>
|
||||
/// well documented.
|
||||
public int CheckInterpolant(Expr[] cnsts, int[] parents, Expr[] interps, String error, Expr[] theory) throws Z3Exception
|
||||
{
|
||||
Native.StringPtr n_err_str = new Native.StringPtr();
|
||||
|
@ -137,12 +139,12 @@ public class InterpolationContext extends Context
|
|||
return r;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Reads an interpolation problem from a file.
|
||||
/// </summary>
|
||||
/// <remarks>For more information on interpolation please refer
|
||||
///
|
||||
/// Remarks: For more information on interpolation please refer
|
||||
/// too the function Z3_read_interpolation_problem in the C/C++ API, which is
|
||||
/// well documented.</remarks>
|
||||
/// well documented.
|
||||
public int ReadInterpolationProblem(String filename, Expr[] cnsts, int[] parents, String error, Expr[] theory) throws Z3Exception
|
||||
{
|
||||
Native.IntPtr n_num = new Native.IntPtr();
|
||||
|
@ -168,12 +170,12 @@ public class InterpolationContext extends Context
|
|||
return r;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Writes an interpolation problem to a file.
|
||||
/// </summary>
|
||||
/// <remarks>For more information on interpolation please refer
|
||||
///
|
||||
/// Remarks: For more information on interpolation please refer
|
||||
/// too the function Z3_write_interpolation_problem in the C/C++ API, which is
|
||||
/// well documented.</remarks>
|
||||
/// well documented.
|
||||
public void WriteInterpolationProblem(String filename, Expr[] cnsts, int[] parents, String error, Expr[] theory) throws Z3Exception
|
||||
{
|
||||
Native.writeInterpolationProblem(nCtx(), cnsts.length, Expr.arrayToNative(cnsts), parents, filename, theory.length, Expr.arrayToNative(theory));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue