3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-22 22:03:39 +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:
Christoph M. Wintersteiger 2013-01-17 19:31:02 +00:00
parent 3abf397560
commit 4b18c8f9c4
63 changed files with 2939 additions and 2985 deletions

View file

@ -16,36 +16,36 @@ public class RatNum extends RealExpr
/**
* The numerator of a rational numeral.
**/
public IntNum Numerator() throws Z3Exception
public IntNum getNumerator() throws Z3Exception
{
return new IntNum(Context(), Native.getNumerator(Context().nCtx(),
NativeObject()));
return new IntNum(getContext(), Native.getNumerator(getContext().nCtx(),
getNativeObject()));
}
/**
* The denominator of a rational numeral.
**/
public IntNum Denominator() throws Z3Exception
public IntNum getDenominator() throws Z3Exception
{
return new IntNum(Context(), Native.getDenominator(Context().nCtx(),
NativeObject()));
return new IntNum(getContext(), Native.getDenominator(getContext().nCtx(),
getNativeObject()));
}
/**
* Converts the numerator of the rational to a BigInteger
**/
public BigInteger BigIntNumerator() throws Z3Exception
public BigInteger getBigIntNumerator() throws Z3Exception
{
IntNum n = Numerator();
IntNum n = getNumerator();
return new BigInteger(n.toString());
}
/**
* Converts the denominator of the rational to a BigInteger
**/
public BigInteger BigIntDenominator() throws Z3Exception
public BigInteger getBigIntDenominator() throws Z3Exception
{
IntNum n = Denominator();
IntNum n = getDenominator();
return new BigInteger(n.toString());
}
@ -53,9 +53,9 @@ public class RatNum extends RealExpr
* Returns a string representation in decimal notation. <remarks>The result
* has at most <paramref name="precision"/> decimal places.</remarks>
**/
public String ToDecimalString(int precision) throws Z3Exception
public String toDecimalString(int precision) throws Z3Exception
{
return Native.getNumeralDecimalString(Context().nCtx(), NativeObject(),
return Native.getNumeralDecimalString(getContext().nCtx(), getNativeObject(),
precision);
}
@ -66,7 +66,7 @@ public class RatNum extends RealExpr
{
try
{
return Native.getNumeralString(Context().nCtx(), NativeObject());
return Native.getNumeralString(getContext().nCtx(), getNativeObject());
} catch (Z3Exception e)
{
return "Z3Exception: " + e.getMessage();