mirror of
https://github.com/Z3Prover/z3
synced 2025-04-30 04:15:51 +00:00
Java API: syntactic adjustments, getters, setters,
... convenience parameters, etc. Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
3abf397560
commit
4b18c8f9c4
63 changed files with 2939 additions and 2985 deletions
|
@ -22,10 +22,10 @@ public class IntNum extends IntExpr
|
|||
/**
|
||||
* Retrieve the int value.
|
||||
**/
|
||||
public int Int() throws Z3Exception
|
||||
public int getInt() throws Z3Exception
|
||||
{
|
||||
Native.IntPtr res = new Native.IntPtr();
|
||||
if (Native.getNumeralInt(Context().nCtx(), NativeObject(), res) ^ true)
|
||||
if (Native.getNumeralInt(getContext().nCtx(), getNativeObject(), res) ^ true)
|
||||
throw new Z3Exception("Numeral is not an int");
|
||||
return res.value;
|
||||
}
|
||||
|
@ -33,10 +33,10 @@ public class IntNum extends IntExpr
|
|||
/**
|
||||
* Retrieve the 64-bit int value.
|
||||
**/
|
||||
public long Int64() throws Z3Exception
|
||||
public long getInt64() throws Z3Exception
|
||||
{
|
||||
Native.LongPtr res = new Native.LongPtr();
|
||||
if (Native.getNumeralInt64(Context().nCtx(), NativeObject(), res) ^ true)
|
||||
if (Native.getNumeralInt64(getContext().nCtx(), getNativeObject(), res) ^ true)
|
||||
throw new Z3Exception("Numeral is not an int64");
|
||||
return res.value;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ public class IntNum extends IntExpr
|
|||
/**
|
||||
* Retrieve the BigInteger value.
|
||||
**/
|
||||
public BigInteger BigInteger() throws Z3Exception
|
||||
public BigInteger getBigInteger() throws Z3Exception
|
||||
{
|
||||
return new BigInteger(this.toString());
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class IntNum extends IntExpr
|
|||
{
|
||||
try
|
||||
{
|
||||
return Native.getNumeralString(Context().nCtx(), NativeObject());
|
||||
return Native.getNumeralString(getContext().nCtx(), getNativeObject());
|
||||
} catch (Z3Exception e)
|
||||
{
|
||||
return "Z3Exception: " + e.getMessage();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue