3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 12:08:18 +00:00

Turned Z3Exception into a RuntimeException such that throws declarations are not needed anymore. Thanks to codeplex user steimann for this suggestion.

This commit is contained in:
Christoph M. Wintersteiger 2015-04-08 13:16:32 +01:00
parent 2f4c923216
commit b7bb53406f
62 changed files with 834 additions and 834 deletions

View file

@ -54,7 +54,7 @@ public class AST extends Z3Object
* positive if after else zero. * positive if after else zero.
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public int compareTo(Object other) throws Z3Exception public int compareTo(Object other)
{ {
if (other == null) if (other == null)
return 1; return 1;
@ -95,7 +95,7 @@ public class AST extends Z3Object
* A unique identifier for the AST (unique among all ASTs). * A unique identifier for the AST (unique among all ASTs).
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public int getId() throws Z3Exception public int getId()
{ {
return Native.getAstId(getContext().nCtx(), getNativeObject()); return Native.getAstId(getContext().nCtx(), getNativeObject());
} }
@ -107,7 +107,7 @@ public class AST extends Z3Object
* @return A copy of the AST which is associated with {@code ctx} * @return A copy of the AST which is associated with {@code ctx}
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public AST translate(Context ctx) throws Z3Exception public AST translate(Context ctx)
{ {
if (getContext() == ctx) if (getContext() == ctx)
@ -121,7 +121,7 @@ public class AST extends Z3Object
* The kind of the AST. * The kind of the AST.
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public Z3_ast_kind getASTKind() throws Z3Exception public Z3_ast_kind getASTKind()
{ {
return Z3_ast_kind.fromInt(Native.getAstKind(getContext().nCtx(), return Z3_ast_kind.fromInt(Native.getAstKind(getContext().nCtx(),
getNativeObject())); getNativeObject()));
@ -132,7 +132,7 @@ public class AST extends Z3Object
* @throws Z3Exception on error * @throws Z3Exception on error
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public boolean isExpr() throws Z3Exception public boolean isExpr()
{ {
switch (getASTKind()) switch (getASTKind())
{ {
@ -151,7 +151,7 @@ public class AST extends Z3Object
* @return a boolean * @return a boolean
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public boolean isApp() throws Z3Exception public boolean isApp()
{ {
return this.getASTKind() == Z3_ast_kind.Z3_APP_AST; return this.getASTKind() == Z3_ast_kind.Z3_APP_AST;
} }
@ -161,7 +161,7 @@ public class AST extends Z3Object
* @return a boolean * @return a boolean
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public boolean isVar() throws Z3Exception public boolean isVar()
{ {
return this.getASTKind() == Z3_ast_kind.Z3_VAR_AST; return this.getASTKind() == Z3_ast_kind.Z3_VAR_AST;
} }
@ -171,7 +171,7 @@ public class AST extends Z3Object
* @return a boolean * @return a boolean
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public boolean isQuantifier() throws Z3Exception public boolean isQuantifier()
{ {
return this.getASTKind() == Z3_ast_kind.Z3_QUANTIFIER_AST; return this.getASTKind() == Z3_ast_kind.Z3_QUANTIFIER_AST;
} }
@ -179,7 +179,7 @@ public class AST extends Z3Object
/** /**
* Indicates whether the AST is a Sort * Indicates whether the AST is a Sort
**/ **/
public boolean isSort() throws Z3Exception public boolean isSort()
{ {
return this.getASTKind() == Z3_ast_kind.Z3_SORT_AST; return this.getASTKind() == Z3_ast_kind.Z3_SORT_AST;
} }
@ -187,7 +187,7 @@ public class AST extends Z3Object
/** /**
* Indicates whether the AST is a FunctionDeclaration * Indicates whether the AST is a FunctionDeclaration
**/ **/
public boolean isFuncDecl() throws Z3Exception public boolean isFuncDecl()
{ {
return this.getASTKind() == Z3_ast_kind.Z3_FUNC_DECL_AST; return this.getASTKind() == Z3_ast_kind.Z3_FUNC_DECL_AST;
} }
@ -209,7 +209,7 @@ public class AST extends Z3Object
/** /**
* A string representation of the AST in s-expression notation. * A string representation of the AST in s-expression notation.
**/ **/
public String getSExpr() throws Z3Exception public String getSExpr()
{ {
return Native.astToString(getContext().nCtx(), getNativeObject()); return Native.astToString(getContext().nCtx(), getNativeObject());
} }
@ -219,12 +219,12 @@ public class AST extends Z3Object
super(ctx); super(ctx);
} }
AST(Context ctx, long obj) throws Z3Exception AST(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
// Console.WriteLine("AST IncRef()"); // Console.WriteLine("AST IncRef()");
if (getContext() == null || o == 0) if (getContext() == null || o == 0)
@ -233,7 +233,7 @@ public class AST extends Z3Object
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
// Console.WriteLine("AST DecRef()"); // Console.WriteLine("AST DecRef()");
if (getContext() == null || o == 0) if (getContext() == null || o == 0)
@ -242,7 +242,7 @@ public class AST extends Z3Object
super.decRef(o); super.decRef(o);
} }
static AST create(Context ctx, long obj) throws Z3Exception static AST create(Context ctx, long obj)
{ {
switch (Z3_ast_kind.fromInt(Native.getAstKind(ctx.nCtx(), obj))) switch (Z3_ast_kind.fromInt(Native.getAstKind(ctx.nCtx(), obj)))
{ {

View file

@ -29,7 +29,7 @@ class ASTMap extends Z3Object
* @return True if {@code k} is a key in the map, false * @return True if {@code k} is a key in the map, false
* otherwise. * otherwise.
**/ **/
public boolean contains(AST k) throws Z3Exception public boolean contains(AST k)
{ {
return Native.astMapContains(getContext().nCtx(), getNativeObject(), return Native.astMapContains(getContext().nCtx(), getNativeObject(),
@ -44,7 +44,7 @@ class ASTMap extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public AST find(AST k) throws Z3Exception public AST find(AST k)
{ {
return new AST(getContext(), Native.astMapFind(getContext().nCtx(), return new AST(getContext(), Native.astMapFind(getContext().nCtx(),
getNativeObject(), k.getNativeObject())); getNativeObject(), k.getNativeObject()));
@ -55,7 +55,7 @@ class ASTMap extends Z3Object
* @param k The key AST * @param k The key AST
* @param v The value AST * @param v The value AST
**/ **/
public void insert(AST k, AST v) throws Z3Exception public void insert(AST k, AST v)
{ {
Native.astMapInsert(getContext().nCtx(), getNativeObject(), k.getNativeObject(), Native.astMapInsert(getContext().nCtx(), getNativeObject(), k.getNativeObject(),
@ -66,7 +66,7 @@ class ASTMap extends Z3Object
* Erases the key {@code k} from the map. * Erases the key {@code k} from the map.
* @param k An AST * @param k An AST
**/ **/
public void erase(AST k) throws Z3Exception public void erase(AST k)
{ {
Native.astMapErase(getContext().nCtx(), getNativeObject(), k.getNativeObject()); Native.astMapErase(getContext().nCtx(), getNativeObject(), k.getNativeObject());
} }
@ -74,7 +74,7 @@ class ASTMap extends Z3Object
/** /**
* Removes all keys from the map. * Removes all keys from the map.
**/ **/
public void reset() throws Z3Exception public void reset()
{ {
Native.astMapReset(getContext().nCtx(), getNativeObject()); Native.astMapReset(getContext().nCtx(), getNativeObject());
} }
@ -82,7 +82,7 @@ class ASTMap extends Z3Object
/** /**
* The size of the map * The size of the map
**/ **/
public int size() throws Z3Exception public int size()
{ {
return Native.astMapSize(getContext().nCtx(), getNativeObject()); return Native.astMapSize(getContext().nCtx(), getNativeObject());
} }
@ -92,7 +92,7 @@ class ASTMap extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public ASTVector getKeys() throws Z3Exception public ASTVector getKeys()
{ {
return new ASTVector(getContext(), Native.astMapKeys(getContext().nCtx(), return new ASTVector(getContext(), Native.astMapKeys(getContext().nCtx(),
getNativeObject())); getNativeObject()));
@ -112,23 +112,23 @@ class ASTMap extends Z3Object
} }
} }
ASTMap(Context ctx, long obj) throws Z3Exception ASTMap(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
ASTMap(Context ctx) throws Z3Exception ASTMap(Context ctx)
{ {
super(ctx, Native.mkAstMap(ctx.nCtx())); super(ctx, Native.mkAstMap(ctx.nCtx()));
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getASTMapDRQ().incAndClear(getContext(), o); getContext().getASTMapDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getASTMapDRQ().add(o); getContext().getASTMapDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -25,7 +25,7 @@ public class ASTVector extends Z3Object
/** /**
* The size of the vector * The size of the vector
**/ **/
public int size() throws Z3Exception public int size()
{ {
return Native.astVectorSize(getContext().nCtx(), getNativeObject()); return Native.astVectorSize(getContext().nCtx(), getNativeObject());
} }
@ -39,13 +39,13 @@ public class ASTVector extends Z3Object
* @return An AST * @return An AST
* @throws Z3Exception * @throws Z3Exception
**/ **/
public AST get(int i) throws Z3Exception public AST get(int i)
{ {
return new AST(getContext(), Native.astVectorGet(getContext().nCtx(), return new AST(getContext(), Native.astVectorGet(getContext().nCtx(),
getNativeObject(), i)); getNativeObject(), i));
} }
public void set(int i, AST value) throws Z3Exception public void set(int i, AST value)
{ {
Native.astVectorSet(getContext().nCtx(), getNativeObject(), i, Native.astVectorSet(getContext().nCtx(), getNativeObject(), i,
@ -56,7 +56,7 @@ public class ASTVector extends Z3Object
* Resize the vector to {@code newSize}. * Resize the vector to {@code newSize}.
* @param newSize The new size of the vector. * @param newSize The new size of the vector.
**/ **/
public void resize(int newSize) throws Z3Exception public void resize(int newSize)
{ {
Native.astVectorResize(getContext().nCtx(), getNativeObject(), newSize); Native.astVectorResize(getContext().nCtx(), getNativeObject(), newSize);
} }
@ -66,7 +66,7 @@ public class ASTVector extends Z3Object
* increased by 1. * increased by 1.
* @param a An AST * @param a An AST
**/ **/
public void push(AST a) throws Z3Exception public void push(AST a)
{ {
Native.astVectorPush(getContext().nCtx(), getNativeObject(), a.getNativeObject()); Native.astVectorPush(getContext().nCtx(), getNativeObject(), a.getNativeObject());
} }
@ -78,7 +78,7 @@ public class ASTVector extends Z3Object
* @return A new ASTVector * @return A new ASTVector
* @throws Z3Exception * @throws Z3Exception
**/ **/
public ASTVector translate(Context ctx) throws Z3Exception public ASTVector translate(Context ctx)
{ {
return new ASTVector(getContext(), Native.astVectorTranslate(getContext() return new ASTVector(getContext(), Native.astVectorTranslate(getContext()
.nCtx(), getNativeObject(), ctx.nCtx())); .nCtx(), getNativeObject(), ctx.nCtx()));
@ -98,23 +98,23 @@ public class ASTVector extends Z3Object
} }
} }
ASTVector(Context ctx, long obj) throws Z3Exception ASTVector(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
ASTVector(Context ctx) throws Z3Exception ASTVector(Context ctx)
{ {
super(ctx, Native.mkAstVector(ctx.nCtx())); super(ctx, Native.mkAstVector(ctx.nCtx()));
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getASTVectorDRQ().incAndClear(getContext(), o); getContext().getASTVectorDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getASTVectorDRQ().add(o); getContext().getASTVectorDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -32,7 +32,7 @@ public class AlgebraicNum extends ArithExpr
* @return A numeral Expr of sort Real * @return A numeral Expr of sort Real
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public RatNum toUpper(int precision) throws Z3Exception public RatNum toUpper(int precision)
{ {
return new RatNum(getContext(), Native.getAlgebraicNumberUpper(getContext() return new RatNum(getContext(), Native.getAlgebraicNumberUpper(getContext()
@ -49,7 +49,7 @@ public class AlgebraicNum extends ArithExpr
* @return A numeral Expr of sort Real * @return A numeral Expr of sort Real
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public RatNum toLower(int precision) throws Z3Exception public RatNum toLower(int precision)
{ {
return new RatNum(getContext(), Native.getAlgebraicNumberLower(getContext() return new RatNum(getContext(), Native.getAlgebraicNumberLower(getContext()
@ -63,14 +63,14 @@ public class AlgebraicNum extends ArithExpr
* @return String * @return String
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public String toDecimal(int precision) throws Z3Exception public String toDecimal(int precision)
{ {
return Native.getNumeralDecimalString(getContext().nCtx(), getNativeObject(), return Native.getNumeralDecimalString(getContext().nCtx(), getNativeObject(),
precision); precision);
} }
AlgebraicNum(Context ctx, long obj) throws Z3Exception AlgebraicNum(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);

View file

@ -26,7 +26,7 @@ public class ApplyResult extends Z3Object
/** /**
* The number of Subgoals. * The number of Subgoals.
**/ **/
public int getNumSubgoals() throws Z3Exception public int getNumSubgoals()
{ {
return Native.applyResultGetNumSubgoals(getContext().nCtx(), return Native.applyResultGetNumSubgoals(getContext().nCtx(),
getNativeObject()); getNativeObject());
@ -37,7 +37,7 @@ public class ApplyResult extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Goal[] getSubgoals() throws Z3Exception public Goal[] getSubgoals()
{ {
int n = getNumSubgoals(); int n = getNumSubgoals();
Goal[] res = new Goal[n]; Goal[] res = new Goal[n];
@ -54,7 +54,7 @@ public class ApplyResult extends Z3Object
* @return A model for {@code g} * @return A model for {@code g}
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Model convertModel(int i, Model m) throws Z3Exception public Model convertModel(int i, Model m)
{ {
return new Model(getContext(), return new Model(getContext(),
Native.applyResultConvertModel(getContext().nCtx(), getNativeObject(), i, m.getNativeObject())); Native.applyResultConvertModel(getContext().nCtx(), getNativeObject(), i, m.getNativeObject()));
@ -74,18 +74,18 @@ public class ApplyResult extends Z3Object
} }
} }
ApplyResult(Context ctx, long obj) throws Z3Exception ApplyResult(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getApplyResultDRQ().incAndClear(getContext(), o); getContext().getApplyResultDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getApplyResultDRQ().add(o); getContext().getApplyResultDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -25,7 +25,7 @@ public class ArithExpr extends Expr
/** /**
* Constructor for ArithExpr * Constructor for ArithExpr
**/ **/
ArithExpr(Context ctx, long obj) throws Z3Exception ArithExpr(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -22,7 +22,7 @@ package com.microsoft.z3;
**/ **/
public class ArithSort extends Sort public class ArithSort extends Sort
{ {
ArithSort(Context ctx, long obj) throws Z3Exception ArithSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -26,7 +26,7 @@ public class ArrayExpr extends Expr
/** /**
* Constructor for ArrayExpr * Constructor for ArrayExpr
**/ **/
ArrayExpr(Context ctx, long obj) throws Z3Exception ArrayExpr(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -28,7 +28,7 @@ public class ArraySort extends Sort
* @throws Z3Exception on error * @throws Z3Exception on error
* @return a sort * @return a sort
**/ **/
public Sort getDomain() throws Z3Exception public Sort getDomain()
{ {
return Sort.create(getContext(), return Sort.create(getContext(),
Native.getArraySortDomain(getContext().nCtx(), getNativeObject())); Native.getArraySortDomain(getContext().nCtx(), getNativeObject()));
@ -40,18 +40,18 @@ public class ArraySort extends Sort
* @throws Z3Exception on error * @throws Z3Exception on error
* @return a sort * @return a sort
**/ **/
public Sort getRange() throws Z3Exception public Sort getRange()
{ {
return Sort.create(getContext(), return Sort.create(getContext(),
Native.getArraySortRange(getContext().nCtx(), getNativeObject())); Native.getArraySortRange(getContext().nCtx(), getNativeObject()));
} }
ArraySort(Context ctx, long obj) throws Z3Exception ArraySort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
ArraySort(Context ctx, Sort domain, Sort range) throws Z3Exception ArraySort(Context ctx, Sort domain, Sort range)
{ {
super(ctx, Native.mkArraySort(ctx.nCtx(), domain.getNativeObject(), super(ctx, Native.mkArraySort(ctx.nCtx(), domain.getNativeObject(),
range.getNativeObject())); range.getNativeObject()));

View file

@ -29,7 +29,7 @@ public class BitVecExpr extends Expr
* @throws Z3Exception on error * @throws Z3Exception on error
* @return an int * @return an int
**/ **/
public int getSortSize() throws Z3Exception public int getSortSize()
{ {
return ((BitVecSort) getSort()).getSize(); return ((BitVecSort) getSort()).getSize();
} }
@ -37,7 +37,7 @@ public class BitVecExpr extends Expr
/** /**
* Constructor for BitVecExpr * Constructor for BitVecExpr
**/ **/
BitVecExpr(Context ctx, long obj) throws Z3Exception BitVecExpr(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -29,7 +29,7 @@ public class BitVecNum extends BitVecExpr
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public int getInt() throws Z3Exception public int getInt()
{ {
Native.IntPtr res = new Native.IntPtr(); Native.IntPtr res = new Native.IntPtr();
if (Native.getNumeralInt(getContext().nCtx(), getNativeObject(), res) ^ true) if (Native.getNumeralInt(getContext().nCtx(), getNativeObject(), res) ^ true)
@ -42,7 +42,7 @@ public class BitVecNum extends BitVecExpr
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public long getLong() throws Z3Exception public long getLong()
{ {
Native.LongPtr res = new Native.LongPtr(); Native.LongPtr res = new Native.LongPtr();
if (Native.getNumeralInt64(getContext().nCtx(), getNativeObject(), res) ^ true) if (Native.getNumeralInt64(getContext().nCtx(), getNativeObject(), res) ^ true)
@ -72,7 +72,7 @@ public class BitVecNum extends BitVecExpr
} }
} }
BitVecNum(Context ctx, long obj) throws Z3Exception BitVecNum(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -27,12 +27,12 @@ public class BitVecSort extends Sort
* @throws Z3Exception on error * @throws Z3Exception on error
* @return an int * @return an int
**/ **/
public int getSize() throws Z3Exception public int getSize()
{ {
return Native.getBvSortSize(getContext().nCtx(), getNativeObject()); return Native.getBvSortSize(getContext().nCtx(), getNativeObject());
} }
BitVecSort(Context ctx, long obj) throws Z3Exception BitVecSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -35,7 +35,7 @@ public class BoolExpr extends Expr
* @throws Z3Exception * @throws Z3Exception
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
BoolExpr(Context ctx, long obj) throws Z3Exception BoolExpr(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -22,6 +22,6 @@ package com.microsoft.z3;
**/ **/
public class BoolSort extends Sort public class BoolSort extends Sort
{ {
BoolSort(Context ctx, long obj) throws Z3Exception { super(ctx, obj); { }} BoolSort(Context ctx, long obj) { super(ctx, obj); { }}
BoolSort(Context ctx) throws Z3Exception { super(ctx, Native.mkBoolSort(ctx.nCtx())); { }} BoolSort(Context ctx) { super(ctx, Native.mkBoolSort(ctx.nCtx())); { }}
}; };

View file

@ -28,7 +28,7 @@ public class Constructor extends Z3Object
* @throws Z3Exception on error * @throws Z3Exception on error
* @return an int * @return an int
**/ **/
public int getNumFields() throws Z3Exception public int getNumFields()
{ {
return n; return n;
} }
@ -38,7 +38,7 @@ public class Constructor extends Z3Object
* @throws Z3Exception * @throws Z3Exception
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public FuncDecl ConstructorDecl() throws Z3Exception public FuncDecl ConstructorDecl()
{ {
Native.LongPtr constructor = new Native.LongPtr(); Native.LongPtr constructor = new Native.LongPtr();
Native.LongPtr tester = new Native.LongPtr(); Native.LongPtr tester = new Native.LongPtr();
@ -52,7 +52,7 @@ public class Constructor extends Z3Object
* @throws Z3Exception * @throws Z3Exception
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public FuncDecl getTesterDecl() throws Z3Exception public FuncDecl getTesterDecl()
{ {
Native.LongPtr constructor = new Native.LongPtr(); Native.LongPtr constructor = new Native.LongPtr();
Native.LongPtr tester = new Native.LongPtr(); Native.LongPtr tester = new Native.LongPtr();
@ -66,7 +66,7 @@ public class Constructor extends Z3Object
* @throws Z3Exception * @throws Z3Exception
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public FuncDecl[] getAccessorDecls() throws Z3Exception public FuncDecl[] getAccessorDecls()
{ {
Native.LongPtr constructor = new Native.LongPtr(); Native.LongPtr constructor = new Native.LongPtr();
Native.LongPtr tester = new Native.LongPtr(); Native.LongPtr tester = new Native.LongPtr();
@ -82,7 +82,7 @@ public class Constructor extends Z3Object
* Destructor. * Destructor.
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
protected void finalize() throws Z3Exception protected void finalize()
{ {
Native.delConstructor(getContext().nCtx(), getNativeObject()); Native.delConstructor(getContext().nCtx(), getNativeObject());
} }
@ -91,7 +91,7 @@ public class Constructor extends Z3Object
Constructor(Context ctx, Symbol name, Symbol recognizer, Constructor(Context ctx, Symbol name, Symbol recognizer,
Symbol[] fieldNames, Sort[] sorts, int[] sortRefs) Symbol[] fieldNames, Sort[] sorts, int[] sortRefs)
throws Z3Exception
{ {
super(ctx); super(ctx);

View file

@ -26,17 +26,17 @@ public class ConstructorList extends Z3Object
* Destructor. * Destructor.
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
protected void finalize() throws Z3Exception protected void finalize()
{ {
Native.delConstructorList(getContext().nCtx(), getNativeObject()); Native.delConstructorList(getContext().nCtx(), getNativeObject());
} }
ConstructorList(Context ctx, long obj) throws Z3Exception ConstructorList(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
ConstructorList(Context ctx, Constructor[] constructors) throws Z3Exception ConstructorList(Context ctx, Constructor[] constructors)
{ {
super(ctx); super(ctx);

File diff suppressed because it is too large Load diff

View file

@ -25,7 +25,7 @@ public class DatatypeExpr extends Expr
/** /**
* Constructor for DatatypeExpr * Constructor for DatatypeExpr
**/ **/
DatatypeExpr(Context ctx, long obj) throws Z3Exception DatatypeExpr(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -27,7 +27,7 @@ public class DatatypeSort extends Sort
* @throws Z3Exception on error * @throws Z3Exception on error
* @return an int * @return an int
**/ **/
public int getNumConstructors() throws Z3Exception public int getNumConstructors()
{ {
return Native.getDatatypeSortNumConstructors(getContext().nCtx(), return Native.getDatatypeSortNumConstructors(getContext().nCtx(),
getNativeObject()); getNativeObject());
@ -39,7 +39,7 @@ public class DatatypeSort extends Sort
* @throws Z3Exception * @throws Z3Exception
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public FuncDecl[] getConstructors() throws Z3Exception public FuncDecl[] getConstructors()
{ {
int n = getNumConstructors(); int n = getNumConstructors();
FuncDecl[] res = new FuncDecl[n]; FuncDecl[] res = new FuncDecl[n];
@ -55,7 +55,7 @@ public class DatatypeSort extends Sort
* @throws Z3Exception * @throws Z3Exception
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public FuncDecl[] getRecognizers() throws Z3Exception public FuncDecl[] getRecognizers()
{ {
int n = getNumConstructors(); int n = getNumConstructors();
FuncDecl[] res = new FuncDecl[n]; FuncDecl[] res = new FuncDecl[n];
@ -71,7 +71,7 @@ public class DatatypeSort extends Sort
* @throws Z3Exception * @throws Z3Exception
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public FuncDecl[][] getAccessors() throws Z3Exception public FuncDecl[][] getAccessors()
{ {
int n = getNumConstructors(); int n = getNumConstructors();
@ -92,13 +92,13 @@ public class DatatypeSort extends Sort
return res; return res;
} }
DatatypeSort(Context ctx, long obj) throws Z3Exception DatatypeSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
DatatypeSort(Context ctx, Symbol name, Constructor[] constructors) DatatypeSort(Context ctx, Symbol name, Constructor[] constructors)
throws Z3Exception
{ {
super(ctx, Native.mkDatatype(ctx.nCtx(), name.getNativeObject(), super(ctx, Native.mkDatatype(ctx.nCtx(), name.getNativeObject(),
(int) constructors.length, arrayToNative(constructors))); (int) constructors.length, arrayToNative(constructors)));

View file

@ -26,7 +26,7 @@ public class EnumSort extends Sort
* The function declarations of the constants in the enumeration. * The function declarations of the constants in the enumeration.
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public FuncDecl[] getConstDecls() throws Z3Exception public FuncDecl[] getConstDecls()
{ {
int n = Native.getDatatypeSortNumConstructors(getContext().nCtx(), getNativeObject()); int n = Native.getDatatypeSortNumConstructors(getContext().nCtx(), getNativeObject());
FuncDecl[] t = new FuncDecl[n]; FuncDecl[] t = new FuncDecl[n];
@ -39,7 +39,7 @@ public class EnumSort extends Sort
* Retrieves the inx'th constant declaration in the enumeration. * Retrieves the inx'th constant declaration in the enumeration.
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public FuncDecl getConstDecl(int inx) throws Z3Exception public FuncDecl getConstDecl(int inx)
{ {
return new FuncDecl(getContext(), Native.getDatatypeSortConstructor(getContext().nCtx(), getNativeObject(), inx)); return new FuncDecl(getContext(), Native.getDatatypeSortConstructor(getContext().nCtx(), getNativeObject(), inx));
} }
@ -49,7 +49,7 @@ public class EnumSort extends Sort
* @throws Z3Exception on error * @throws Z3Exception on error
* @return an Expr[] * @return an Expr[]
**/ **/
public Expr[] getConsts() throws Z3Exception public Expr[] getConsts()
{ {
FuncDecl[] cds = getConstDecls(); FuncDecl[] cds = getConstDecls();
Expr[] t = new Expr[cds.length]; Expr[] t = new Expr[cds.length];
@ -63,7 +63,7 @@ public class EnumSort extends Sort
* @throws Z3Exception on error * @throws Z3Exception on error
* @return an Expr * @return an Expr
**/ **/
public Expr getConst(int inx) throws Z3Exception public Expr getConst(int inx)
{ {
return getContext().mkApp(getConstDecl(inx)); return getContext().mkApp(getConstDecl(inx));
} }
@ -72,7 +72,7 @@ public class EnumSort extends Sort
* The test predicates for the constants in the enumeration. * The test predicates for the constants in the enumeration.
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public FuncDecl[] getTesterDecls() throws Z3Exception public FuncDecl[] getTesterDecls()
{ {
int n = Native.getDatatypeSortNumConstructors(getContext().nCtx(), getNativeObject()); int n = Native.getDatatypeSortNumConstructors(getContext().nCtx(), getNativeObject());
FuncDecl[] t = new FuncDecl[n]; FuncDecl[] t = new FuncDecl[n];
@ -85,12 +85,12 @@ public class EnumSort extends Sort
* Retrieves the inx'th tester/recognizer declaration in the enumeration. * Retrieves the inx'th tester/recognizer declaration in the enumeration.
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public FuncDecl getTesterDecl(int inx) throws Z3Exception public FuncDecl getTesterDecl(int inx)
{ {
return new FuncDecl(getContext(), Native.getDatatypeSortRecognizer(getContext().nCtx(), getNativeObject(), inx)); return new FuncDecl(getContext(), Native.getDatatypeSortRecognizer(getContext().nCtx(), getNativeObject(), inx));
} }
EnumSort(Context ctx, Symbol name, Symbol[] enumNames) throws Z3Exception EnumSort(Context ctx, Symbol name, Symbol[] enumNames)
{ {
super(ctx, 0); super(ctx, 0);

File diff suppressed because it is too large Load diff

View file

@ -25,15 +25,15 @@ public class FPExpr extends Expr
* The number of exponent bits. * The number of exponent bits.
* @throws Z3Exception * @throws Z3Exception
*/ */
public int getEBits() throws Z3Exception { return ((FPSort)getSort()).getEBits(); } public int getEBits() { return ((FPSort)getSort()).getEBits(); }
/** /**
* The number of significand bits. * The number of significand bits.
* @throws Z3Exception * @throws Z3Exception
*/ */
public int getSBits() throws Z3Exception { return ((FPSort)getSort()).getSBits(); } public int getSBits() { return ((FPSort)getSort()).getSBits(); }
public FPExpr(Context ctx, long obj) throws Z3Exception public FPExpr(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -26,7 +26,7 @@ public class FPNum extends FPExpr
* Remarks: returns true if the numeral is negative * Remarks: returns true if the numeral is negative
* @throws Z3Exception * @throws Z3Exception
*/ */
public boolean getSign() throws Z3Exception { public boolean getSign() {
Native.IntPtr res = new Native.IntPtr(); Native.IntPtr res = new Native.IntPtr();
if (Native.fpaGetNumeralSign(getContext().nCtx(), getNativeObject(), res) ^ true) if (Native.fpaGetNumeralSign(getContext().nCtx(), getNativeObject(), res) ^ true)
throw new Z3Exception("Sign is not a Boolean value"); throw new Z3Exception("Sign is not a Boolean value");
@ -39,7 +39,7 @@ public class FPNum extends FPExpr
* enough to represent the real significand precisely. * enough to represent the real significand precisely.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public String getSignificand() throws Z3Exception { public String getSignificand() {
return Native.fpaGetNumeralSignificandString(getContext().nCtx(), getNativeObject()); return Native.fpaGetNumeralSignificandString(getContext().nCtx(), getNativeObject());
} }
@ -47,7 +47,7 @@ public class FPNum extends FPExpr
* Return the exponent value of a floating-point numeral as a string * Return the exponent value of a floating-point numeral as a string
* @throws Z3Exception * @throws Z3Exception
*/ */
public String getExponent() throws Z3Exception { public String getExponent() {
return Native.fpaGetNumeralExponentString(getContext().nCtx(), getNativeObject()); return Native.fpaGetNumeralExponentString(getContext().nCtx(), getNativeObject());
} }
@ -55,14 +55,14 @@ public class FPNum extends FPExpr
* Return the exponent value of a floating-point numeral as a signed 64-bit integer * Return the exponent value of a floating-point numeral as a signed 64-bit integer
* @throws Z3Exception * @throws Z3Exception
*/ */
public long getExponentInt64() throws Z3Exception { public long getExponentInt64() {
Native.LongPtr res = new Native.LongPtr(); Native.LongPtr res = new Native.LongPtr();
if (Native.fpaGetNumeralExponentInt64(getContext().nCtx(), getNativeObject(), res) ^ true) if (Native.fpaGetNumeralExponentInt64(getContext().nCtx(), getNativeObject(), res) ^ true)
throw new Z3Exception("Exponent is not a 64 bit integer"); throw new Z3Exception("Exponent is not a 64 bit integer");
return res.value; return res.value;
} }
public FPNum(Context ctx, long obj) throws Z3Exception public FPNum(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -21,7 +21,7 @@ package com.microsoft.z3;
*/ */
public class FPRMExpr extends Expr public class FPRMExpr extends Expr
{ {
public FPRMExpr(Context ctx, long obj) throws Z3Exception public FPRMExpr(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -27,63 +27,63 @@ public class FPRMNum extends FPRMExpr {
* Indicates whether the term is the floating-point rounding numeral roundNearestTiesToEven * Indicates whether the term is the floating-point rounding numeral roundNearestTiesToEven
* @throws Z3Exception * @throws Z3Exception
* **/ * **/
public boolean isRoundNearestTiesToEven() throws Z3Exception { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_EVEN; } public boolean isRoundNearestTiesToEven() { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_EVEN; }
/** /**
* Indicates whether the term is the floating-point rounding numeral roundNearestTiesToEven * Indicates whether the term is the floating-point rounding numeral roundNearestTiesToEven
* @throws Z3Exception * @throws Z3Exception
*/ */
public boolean isRNE() throws Z3Exception { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_EVEN; } public boolean isRNE() { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_EVEN; }
/** /**
* Indicates whether the term is the floating-point rounding numeral roundNearestTiesToAway * Indicates whether the term is the floating-point rounding numeral roundNearestTiesToAway
* @throws Z3Exception * @throws Z3Exception
*/ */
public boolean isRoundNearestTiesToAway() throws Z3Exception { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_AWAY; } public boolean isRoundNearestTiesToAway() { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_AWAY; }
/** /**
* Indicates whether the term is the floating-point rounding numeral roundNearestTiesToAway * Indicates whether the term is the floating-point rounding numeral roundNearestTiesToAway
* @throws Z3Exception * @throws Z3Exception
*/ */
public boolean isRNA() throws Z3Exception { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_AWAY; } public boolean isRNA() { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_NEAREST_TIES_TO_AWAY; }
/** /**
* Indicates whether the term is the floating-point rounding numeral roundTowardPositive * Indicates whether the term is the floating-point rounding numeral roundTowardPositive
* @throws Z3Exception * @throws Z3Exception
*/ */
public boolean isRoundTowardPositive() throws Z3Exception { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_POSITIVE; } public boolean isRoundTowardPositive() { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_POSITIVE; }
/** /**
* Indicates whether the term is the floating-point rounding numeral roundTowardPositive * Indicates whether the term is the floating-point rounding numeral roundTowardPositive
* @throws Z3Exception * @throws Z3Exception
*/ */
public boolean isRTP() throws Z3Exception { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_POSITIVE; } public boolean isRTP() { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_POSITIVE; }
/** /**
* Indicates whether the term is the floating-point rounding numeral roundTowardNegative * Indicates whether the term is the floating-point rounding numeral roundTowardNegative
* @throws Z3Exception * @throws Z3Exception
*/ */
public boolean isRoundTowardNegative() throws Z3Exception { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_NEGATIVE; } public boolean isRoundTowardNegative() { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_NEGATIVE; }
/** /**
* Indicates whether the term is the floating-point rounding numeral roundTowardNegative * Indicates whether the term is the floating-point rounding numeral roundTowardNegative
* @throws Z3Exception * @throws Z3Exception
*/ */
public boolean isRTN() throws Z3Exception { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_NEGATIVE; } public boolean isRTN() { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_NEGATIVE; }
/** /**
* Indicates whether the term is the floating-point rounding numeral roundTowardZero * Indicates whether the term is the floating-point rounding numeral roundTowardZero
* @throws Z3Exception * @throws Z3Exception
*/ */
public boolean isRoundTowardZero() throws Z3Exception { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_ZERO; } public boolean isRoundTowardZero() { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_ZERO; }
/** /**
* Indicates whether the term is the floating-point rounding numeral roundTowardZero * Indicates whether the term is the floating-point rounding numeral roundTowardZero
* @throws Z3Exception * @throws Z3Exception
*/ */
public boolean isRTZ() throws Z3Exception { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_ZERO; } public boolean isRTZ() { return isApp() && getFuncDecl().getDeclKind() == Z3_decl_kind.Z3_OP_FPA_RM_TOWARD_ZERO; }
public FPRMNum(Context ctx, long obj) throws Z3Exception { public FPRMNum(Context ctx, long obj) {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -22,12 +22,12 @@ package com.microsoft.z3;
public class FPRMSort extends Sort public class FPRMSort extends Sort
{ {
public FPRMSort(Context ctx) throws Z3Exception public FPRMSort(Context ctx)
{ {
super(ctx, Native.mkFpaRoundingModeSort(ctx.nCtx())); super(ctx, Native.mkFpaRoundingModeSort(ctx.nCtx()));
} }
public FPRMSort(Context ctx, long obj) throws Z3Exception public FPRMSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -22,12 +22,12 @@ package com.microsoft.z3;
public class FPSort extends Sort public class FPSort extends Sort
{ {
public FPSort(Context ctx, long obj) throws Z3Exception public FPSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
public FPSort(Context ctx, int ebits, int sbits) throws Z3Exception public FPSort(Context ctx, int ebits, int sbits)
{ {
super(ctx, Native.mkFpaSort(ctx.nCtx(), ebits, sbits)); super(ctx, Native.mkFpaSort(ctx.nCtx(), ebits, sbits));
} }
@ -35,14 +35,14 @@ public class FPSort extends Sort
/** /**
* The number of exponent bits. * The number of exponent bits.
*/ */
public int getEBits() throws Z3Exception { public int getEBits() {
return Native.fpaGetEbits(getContext().nCtx(), getNativeObject()); return Native.fpaGetEbits(getContext().nCtx(), getNativeObject());
} }
/** /**
* The number of significand bits. * The number of significand bits.
*/ */
public int getSBits() throws Z3Exception { public int getSBits() {
return Native.fpaGetEbits(getContext().nCtx(), getNativeObject()); return Native.fpaGetEbits(getContext().nCtx(), getNativeObject());
} }

View file

@ -26,19 +26,19 @@ public class FiniteDomainSort extends Sort
* The size of the finite domain sort. * The size of the finite domain sort.
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public long getSize() throws Z3Exception public long getSize()
{ {
Native.LongPtr res = new Native.LongPtr(); Native.LongPtr res = new Native.LongPtr();
Native.getFiniteDomainSortSize(getContext().nCtx(), getNativeObject(), res); Native.getFiniteDomainSortSize(getContext().nCtx(), getNativeObject(), res);
return res.value; return res.value;
} }
FiniteDomainSort(Context ctx, long obj) throws Z3Exception FiniteDomainSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
FiniteDomainSort(Context ctx, Symbol name, long size) throws Z3Exception FiniteDomainSort(Context ctx, Symbol name, long size)
{ {
super(ctx, Native.mkFiniteDomainSort(ctx.nCtx(), name.getNativeObject(), super(ctx, Native.mkFiniteDomainSort(ctx.nCtx(), name.getNativeObject(),
size)); size));

View file

@ -28,7 +28,7 @@ public class Fixedpoint extends Z3Object
/** /**
* A string that describes all available fixedpoint solver parameters. * A string that describes all available fixedpoint solver parameters.
**/ **/
public String getHelp() throws Z3Exception public String getHelp()
{ {
return Native.fixedpointGetHelp(getContext().nCtx(), getNativeObject()); return Native.fixedpointGetHelp(getContext().nCtx(), getNativeObject());
} }
@ -38,7 +38,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public void setParameters(Params value) throws Z3Exception public void setParameters(Params value)
{ {
getContext().checkContextMatch(value); getContext().checkContextMatch(value);
@ -51,7 +51,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public ParamDescrs getParameterDescriptions() throws Z3Exception public ParamDescrs getParameterDescriptions()
{ {
return new ParamDescrs(getContext(), Native.fixedpointGetParamDescrs( return new ParamDescrs(getContext(), Native.fixedpointGetParamDescrs(
getContext().nCtx(), getNativeObject())); getContext().nCtx(), getNativeObject()));
@ -62,7 +62,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public void add(BoolExpr ... constraints) throws Z3Exception public void add(BoolExpr ... constraints)
{ {
getContext().checkContextMatch(constraints); getContext().checkContextMatch(constraints);
for (BoolExpr a : constraints) for (BoolExpr a : constraints)
@ -77,7 +77,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public void registerRelation(FuncDecl f) throws Z3Exception public void registerRelation(FuncDecl f)
{ {
getContext().checkContextMatch(f); getContext().checkContextMatch(f);
@ -90,7 +90,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public void addRule(BoolExpr rule, Symbol name) throws Z3Exception public void addRule(BoolExpr rule, Symbol name)
{ {
getContext().checkContextMatch(rule); getContext().checkContextMatch(rule);
@ -103,7 +103,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public void addFact(FuncDecl pred, int ... args) throws Z3Exception public void addFact(FuncDecl pred, int ... args)
{ {
getContext().checkContextMatch(pred); getContext().checkContextMatch(pred);
Native.fixedpointAddFact(getContext().nCtx(), getNativeObject(), Native.fixedpointAddFact(getContext().nCtx(), getNativeObject(),
@ -119,7 +119,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Status query(BoolExpr query) throws Z3Exception public Status query(BoolExpr query)
{ {
getContext().checkContextMatch(query); getContext().checkContextMatch(query);
@ -144,7 +144,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Status query(FuncDecl[] relations) throws Z3Exception public Status query(FuncDecl[] relations)
{ {
getContext().checkContextMatch(relations); getContext().checkContextMatch(relations);
@ -166,7 +166,7 @@ public class Fixedpoint extends Z3Object
* Creates a backtracking point. * Creates a backtracking point.
* @see pop * @see pop
**/ **/
public void push() throws Z3Exception public void push()
{ {
Native.fixedpointPush(getContext().nCtx(), getNativeObject()); Native.fixedpointPush(getContext().nCtx(), getNativeObject());
} }
@ -178,7 +178,7 @@ public class Fixedpoint extends Z3Object
* *
* @see push * @see push
**/ **/
public void pop() throws Z3Exception public void pop()
{ {
Native.fixedpointPop(getContext().nCtx(), getNativeObject()); Native.fixedpointPop(getContext().nCtx(), getNativeObject());
} }
@ -188,7 +188,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public void updateRule(BoolExpr rule, Symbol name) throws Z3Exception public void updateRule(BoolExpr rule, Symbol name)
{ {
getContext().checkContextMatch(rule); getContext().checkContextMatch(rule);
@ -202,7 +202,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr getAnswer() throws Z3Exception public Expr getAnswer()
{ {
long ans = Native.fixedpointGetAnswer(getContext().nCtx(), getNativeObject()); long ans = Native.fixedpointGetAnswer(getContext().nCtx(), getNativeObject());
return (ans == 0) ? null : Expr.create(getContext(), ans); return (ans == 0) ? null : Expr.create(getContext(), ans);
@ -211,7 +211,7 @@ public class Fixedpoint extends Z3Object
/** /**
* Retrieve explanation why fixedpoint engine returned status Unknown. * Retrieve explanation why fixedpoint engine returned status Unknown.
**/ **/
public String getReasonUnknown() throws Z3Exception public String getReasonUnknown()
{ {
return Native.fixedpointGetReasonUnknown(getContext().nCtx(), return Native.fixedpointGetReasonUnknown(getContext().nCtx(),
@ -221,7 +221,7 @@ public class Fixedpoint extends Z3Object
/** /**
* Retrieve the number of levels explored for a given predicate. * Retrieve the number of levels explored for a given predicate.
**/ **/
public int getNumLevels(FuncDecl predicate) throws Z3Exception public int getNumLevels(FuncDecl predicate)
{ {
return Native.fixedpointGetNumLevels(getContext().nCtx(), getNativeObject(), return Native.fixedpointGetNumLevels(getContext().nCtx(), getNativeObject(),
predicate.getNativeObject()); predicate.getNativeObject());
@ -232,7 +232,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr getCoverDelta(int level, FuncDecl predicate) throws Z3Exception public Expr getCoverDelta(int level, FuncDecl predicate)
{ {
long res = Native.fixedpointGetCoverDelta(getContext().nCtx(), long res = Native.fixedpointGetCoverDelta(getContext().nCtx(),
getNativeObject(), level, predicate.getNativeObject()); getNativeObject(), level, predicate.getNativeObject());
@ -244,7 +244,7 @@ public class Fixedpoint extends Z3Object
* at <tt>level</tt>. * at <tt>level</tt>.
**/ **/
public void addCover(int level, FuncDecl predicate, Expr property) public void addCover(int level, FuncDecl predicate, Expr property)
throws Z3Exception
{ {
Native.fixedpointAddCover(getContext().nCtx(), getNativeObject(), level, Native.fixedpointAddCover(getContext().nCtx(), getNativeObject(), level,
predicate.getNativeObject(), property.getNativeObject()); predicate.getNativeObject(), property.getNativeObject());
@ -269,7 +269,7 @@ public class Fixedpoint extends Z3Object
* Instrument the Datalog engine on which table representation to use for * Instrument the Datalog engine on which table representation to use for
* recursive predicate. * recursive predicate.
**/ **/
public void setPredicateRepresentation(FuncDecl f, Symbol[] kinds) throws Z3Exception public void setPredicateRepresentation(FuncDecl f, Symbol[] kinds)
{ {
Native.fixedpointSetPredicateRepresentation(getContext().nCtx(), Native.fixedpointSetPredicateRepresentation(getContext().nCtx(),
@ -281,7 +281,7 @@ public class Fixedpoint extends Z3Object
/** /**
* Convert benchmark given as set of axioms, rules and queries to a string. * Convert benchmark given as set of axioms, rules and queries to a string.
**/ **/
public String toString(BoolExpr[] queries) throws Z3Exception public String toString(BoolExpr[] queries)
{ {
return Native.fixedpointToString(getContext().nCtx(), getNativeObject(), return Native.fixedpointToString(getContext().nCtx(), getNativeObject(),
@ -293,7 +293,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public BoolExpr[] getRules() throws Z3Exception public BoolExpr[] getRules()
{ {
ASTVector v = new ASTVector(getContext(), Native.fixedpointGetRules( ASTVector v = new ASTVector(getContext(), Native.fixedpointGetRules(
@ -310,7 +310,7 @@ public class Fixedpoint extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public BoolExpr[] getAssertions() throws Z3Exception public BoolExpr[] getAssertions()
{ {
ASTVector v = new ASTVector(getContext(), Native.fixedpointGetAssertions( ASTVector v = new ASTVector(getContext(), Native.fixedpointGetAssertions(
@ -322,23 +322,23 @@ public class Fixedpoint extends Z3Object
return res; return res;
} }
Fixedpoint(Context ctx, long obj) throws Z3Exception Fixedpoint(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
Fixedpoint(Context ctx) throws Z3Exception Fixedpoint(Context ctx)
{ {
super(ctx, Native.mkFixedpoint(ctx.nCtx())); super(ctx, Native.mkFixedpoint(ctx.nCtx()));
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getFixedpointDRQ().incAndClear(getContext(), o); getContext().getFixedpointDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getFixedpointDRQ().add(o); getContext().getFixedpointDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -78,7 +78,7 @@ public class FuncDecl extends AST
/** /**
* Returns a unique identifier for the function declaration. * Returns a unique identifier for the function declaration.
**/ **/
public int getId() throws Z3Exception public int getId()
{ {
return Native.getFuncDeclId(getContext().nCtx(), getNativeObject()); return Native.getFuncDeclId(getContext().nCtx(), getNativeObject());
} }
@ -86,7 +86,7 @@ public class FuncDecl extends AST
/** /**
* The arity of the function declaration * The arity of the function declaration
**/ **/
public int getArity() throws Z3Exception public int getArity()
{ {
return Native.getArity(getContext().nCtx(), getNativeObject()); return Native.getArity(getContext().nCtx(), getNativeObject());
} }
@ -95,7 +95,7 @@ public class FuncDecl extends AST
* The size of the domain of the function declaration * The size of the domain of the function declaration
* @see getArity * @see getArity
**/ **/
public int getDomainSize() throws Z3Exception public int getDomainSize()
{ {
return Native.getDomainSize(getContext().nCtx(), getNativeObject()); return Native.getDomainSize(getContext().nCtx(), getNativeObject());
} }
@ -103,7 +103,7 @@ public class FuncDecl extends AST
/** /**
* The domain of the function declaration * The domain of the function declaration
**/ **/
public Sort[] getDomain() throws Z3Exception public Sort[] getDomain()
{ {
int n = getDomainSize(); int n = getDomainSize();
@ -118,7 +118,7 @@ public class FuncDecl extends AST
/** /**
* The range of the function declaration * The range of the function declaration
**/ **/
public Sort getRange() throws Z3Exception public Sort getRange()
{ {
return Sort.create(getContext(), return Sort.create(getContext(),
@ -128,7 +128,7 @@ public class FuncDecl extends AST
/** /**
* The kind of the function declaration. * The kind of the function declaration.
**/ **/
public Z3_decl_kind getDeclKind() throws Z3Exception public Z3_decl_kind getDeclKind()
{ {
return Z3_decl_kind.fromInt(Native.getDeclKind(getContext().nCtx(), return Z3_decl_kind.fromInt(Native.getDeclKind(getContext().nCtx(),
getNativeObject())); getNativeObject()));
@ -137,7 +137,7 @@ public class FuncDecl extends AST
/** /**
* The name of the function declaration * The name of the function declaration
**/ **/
public Symbol getName() throws Z3Exception public Symbol getName()
{ {
return Symbol.create(getContext(), return Symbol.create(getContext(),
@ -147,7 +147,7 @@ public class FuncDecl extends AST
/** /**
* The number of parameters of the function declaration * The number of parameters of the function declaration
**/ **/
public int getNumParameters() throws Z3Exception public int getNumParameters()
{ {
return Native.getDeclNumParameters(getContext().nCtx(), getNativeObject()); return Native.getDeclNumParameters(getContext().nCtx(), getNativeObject());
} }
@ -155,7 +155,7 @@ public class FuncDecl extends AST
/** /**
* The parameters of the function declaration * The parameters of the function declaration
**/ **/
public Parameter[] getParameters() throws Z3Exception public Parameter[] getParameters()
{ {
int num = getNumParameters(); int num = getNumParameters();
@ -223,7 +223,7 @@ public class FuncDecl extends AST
/** /**
* The int value of the parameter. * The int value of the parameter.
**/ **/
public int getInt() throws Z3Exception public int getInt()
{ {
if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_INT) if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_INT)
throw new Z3Exception("parameter is not an int"); throw new Z3Exception("parameter is not an int");
@ -233,7 +233,7 @@ public class FuncDecl extends AST
/** /**
* The double value of the parameter. * The double value of the parameter.
**/ **/
public double getDouble() throws Z3Exception public double getDouble()
{ {
if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_DOUBLE) if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_DOUBLE)
throw new Z3Exception("parameter is not a double "); throw new Z3Exception("parameter is not a double ");
@ -243,7 +243,7 @@ public class FuncDecl extends AST
/** /**
* The Symbol value of the parameter. * The Symbol value of the parameter.
**/ **/
public Symbol getSymbol() throws Z3Exception public Symbol getSymbol()
{ {
if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_SYMBOL) if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_SYMBOL)
throw new Z3Exception("parameter is not a Symbol"); throw new Z3Exception("parameter is not a Symbol");
@ -253,7 +253,7 @@ public class FuncDecl extends AST
/** /**
* The Sort value of the parameter. * The Sort value of the parameter.
**/ **/
public Sort getSort() throws Z3Exception public Sort getSort()
{ {
if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_SORT) if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_SORT)
throw new Z3Exception("parameter is not a Sort"); throw new Z3Exception("parameter is not a Sort");
@ -263,7 +263,7 @@ public class FuncDecl extends AST
/** /**
* The AST value of the parameter. * The AST value of the parameter.
**/ **/
public AST getAST() throws Z3Exception public AST getAST()
{ {
if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_AST) if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_AST)
throw new Z3Exception("parameter is not an AST"); throw new Z3Exception("parameter is not an AST");
@ -273,7 +273,7 @@ public class FuncDecl extends AST
/** /**
* The FunctionDeclaration value of the parameter. * The FunctionDeclaration value of the parameter.
**/ **/
public FuncDecl getFuncDecl() throws Z3Exception public FuncDecl getFuncDecl()
{ {
if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_FUNC_DECL) if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_FUNC_DECL)
throw new Z3Exception("parameter is not a function declaration"); throw new Z3Exception("parameter is not a function declaration");
@ -283,7 +283,7 @@ public class FuncDecl extends AST
/** /**
* The rational string value of the parameter. * The rational string value of the parameter.
**/ **/
public String getRational() throws Z3Exception public String getRational()
{ {
if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_RATIONAL) if (getParameterKind() != Z3_parameter_kind.Z3_PARAMETER_RATIONAL)
throw new Z3Exception("parameter is not a rational String"); throw new Z3Exception("parameter is not a rational String");
@ -293,7 +293,7 @@ public class FuncDecl extends AST
/** /**
* The kind of the parameter. * The kind of the parameter.
**/ **/
public Z3_parameter_kind getParameterKind() throws Z3Exception public Z3_parameter_kind getParameterKind()
{ {
return kind; return kind;
} }
@ -341,14 +341,14 @@ public class FuncDecl extends AST
} }
} }
FuncDecl(Context ctx, long obj) throws Z3Exception FuncDecl(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
FuncDecl(Context ctx, Symbol name, Sort[] domain, Sort range) FuncDecl(Context ctx, Symbol name, Sort[] domain, Sort range)
throws Z3Exception
{ {
super(ctx, Native.mkFuncDecl(ctx.nCtx(), name.getNativeObject(), super(ctx, Native.mkFuncDecl(ctx.nCtx(), name.getNativeObject(),
AST.arrayLength(domain), AST.arrayToNative(domain), AST.arrayLength(domain), AST.arrayToNative(domain),
@ -357,7 +357,7 @@ public class FuncDecl extends AST
} }
FuncDecl(Context ctx, String prefix, Sort[] domain, Sort range) FuncDecl(Context ctx, String prefix, Sort[] domain, Sort range)
throws Z3Exception
{ {
super(ctx, Native.mkFreshFuncDecl(ctx.nCtx(), prefix, super(ctx, Native.mkFreshFuncDecl(ctx.nCtx(), prefix,
AST.arrayLength(domain), AST.arrayToNative(domain), AST.arrayLength(domain), AST.arrayToNative(domain),
@ -365,7 +365,7 @@ public class FuncDecl extends AST
} }
void checkNativeObject(long obj) throws Z3Exception void checkNativeObject(long obj)
{ {
if (Native.getAstKind(getContext().nCtx(), obj) != Z3_ast_kind.Z3_FUNC_DECL_AST if (Native.getAstKind(getContext().nCtx(), obj) != Z3_ast_kind.Z3_FUNC_DECL_AST
.toInt()) .toInt())
@ -380,7 +380,7 @@ public class FuncDecl extends AST
* *
* @return * @return
**/ **/
public Expr apply(Expr ... args) throws Z3Exception public Expr apply(Expr ... args)
{ {
getContext().checkContextMatch(args); getContext().checkContextMatch(args);
return Expr.create(getContext(), this, args); return Expr.create(getContext(), this, args);

View file

@ -36,7 +36,7 @@ public class FuncInterp extends Z3Object
* @throws Z3Exception * @throws Z3Exception
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public Expr getValue() throws Z3Exception public Expr getValue()
{ {
return Expr.create(getContext(), return Expr.create(getContext(),
Native.funcEntryGetValue(getContext().nCtx(), getNativeObject())); Native.funcEntryGetValue(getContext().nCtx(), getNativeObject()));
@ -46,7 +46,7 @@ public class FuncInterp extends Z3Object
* The number of arguments of the entry. * The number of arguments of the entry.
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public int getNumArgs() throws Z3Exception public int getNumArgs()
{ {
return Native.funcEntryGetNumArgs(getContext().nCtx(), getNativeObject()); return Native.funcEntryGetNumArgs(getContext().nCtx(), getNativeObject());
} }
@ -57,7 +57,7 @@ public class FuncInterp extends Z3Object
* @throws Z3Exception * @throws Z3Exception
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public Expr[] getArgs() throws Z3Exception public Expr[] getArgs()
{ {
int n = getNumArgs(); int n = getNumArgs();
Expr[] res = new Expr[n]; Expr[] res = new Expr[n];
@ -86,18 +86,18 @@ public class FuncInterp extends Z3Object
} }
} }
Entry(Context ctx, long obj) throws Z3Exception Entry(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getFuncEntryDRQ().incAndClear(getContext(), o); getContext().getFuncEntryDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getFuncEntryDRQ().add(o); getContext().getFuncEntryDRQ().add(o);
super.decRef(o); super.decRef(o);
@ -109,7 +109,7 @@ public class FuncInterp extends Z3Object
* @throws Z3Exception on error * @throws Z3Exception on error
* @return an int * @return an int
**/ **/
public int getNumEntries() throws Z3Exception public int getNumEntries()
{ {
return Native.funcInterpGetNumEntries(getContext().nCtx(), getNativeObject()); return Native.funcInterpGetNumEntries(getContext().nCtx(), getNativeObject());
} }
@ -120,7 +120,7 @@ public class FuncInterp extends Z3Object
* @throws Z3Exception * @throws Z3Exception
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
public Entry[] getEntries() throws Z3Exception public Entry[] getEntries()
{ {
int n = getNumEntries(); int n = getNumEntries();
Entry[] res = new Entry[n]; Entry[] res = new Entry[n];
@ -137,7 +137,7 @@ public class FuncInterp extends Z3Object
* @throws Z3Exception on error * @throws Z3Exception on error
* @return an Expr * @return an Expr
**/ **/
public Expr getElse() throws Z3Exception public Expr getElse()
{ {
return Expr.create(getContext(), return Expr.create(getContext(),
Native.funcInterpGetElse(getContext().nCtx(), getNativeObject())); Native.funcInterpGetElse(getContext().nCtx(), getNativeObject()));
@ -148,7 +148,7 @@ public class FuncInterp extends Z3Object
* @throws Z3Exception on error * @throws Z3Exception on error
* @return an int * @return an int
**/ **/
public int getArity() throws Z3Exception public int getArity()
{ {
return Native.funcInterpGetArity(getContext().nCtx(), getNativeObject()); return Native.funcInterpGetArity(getContext().nCtx(), getNativeObject());
} }
@ -187,18 +187,18 @@ public class FuncInterp extends Z3Object
} }
} }
FuncInterp(Context ctx, long obj) throws Z3Exception FuncInterp(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getFuncInterpDRQ().incAndClear(getContext(), o); getContext().getFuncInterpDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getFuncInterpDRQ().add(o); getContext().getFuncInterpDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -81,7 +81,7 @@ public final class Global
* globally. * globally.
**/ **/
public static void ToggleWarningMessages(boolean enabled) public static void ToggleWarningMessages(boolean enabled)
throws Z3Exception
{ {
Native.toggleWarningMessages((enabled) ? true : false); Native.toggleWarningMessages((enabled) ? true : false);
} }

View file

@ -33,7 +33,7 @@ public class Goal extends Z3Object
* applied when the objective is to find a proof for a given goal. * applied when the objective is to find a proof for a given goal.
* *
**/ **/
public Z3_goal_prec getPrecision() throws Z3Exception public Z3_goal_prec getPrecision()
{ {
return Z3_goal_prec.fromInt(Native.goalPrecision(getContext().nCtx(), return Z3_goal_prec.fromInt(Native.goalPrecision(getContext().nCtx(),
getNativeObject())); getNativeObject()));
@ -42,7 +42,7 @@ public class Goal extends Z3Object
/** /**
* Indicates whether the goal is precise. * Indicates whether the goal is precise.
**/ **/
public boolean isPrecise() throws Z3Exception public boolean isPrecise()
{ {
return getPrecision() == Z3_goal_prec.Z3_GOAL_PRECISE; return getPrecision() == Z3_goal_prec.Z3_GOAL_PRECISE;
} }
@ -50,7 +50,7 @@ public class Goal extends Z3Object
/** /**
* Indicates whether the goal is an under-approximation. * Indicates whether the goal is an under-approximation.
**/ **/
public boolean isUnderApproximation() throws Z3Exception public boolean isUnderApproximation()
{ {
return getPrecision() == Z3_goal_prec.Z3_GOAL_UNDER; return getPrecision() == Z3_goal_prec.Z3_GOAL_UNDER;
} }
@ -58,7 +58,7 @@ public class Goal extends Z3Object
/** /**
* Indicates whether the goal is an over-approximation. * Indicates whether the goal is an over-approximation.
**/ **/
public boolean isOverApproximation() throws Z3Exception public boolean isOverApproximation()
{ {
return getPrecision() == Z3_goal_prec.Z3_GOAL_OVER; return getPrecision() == Z3_goal_prec.Z3_GOAL_OVER;
} }
@ -67,7 +67,7 @@ public class Goal extends Z3Object
* Indicates whether the goal is garbage (i.e., the product of over- and * Indicates whether the goal is garbage (i.e., the product of over- and
* under-approximations). * under-approximations).
**/ **/
public boolean isGarbage() throws Z3Exception public boolean isGarbage()
{ {
return getPrecision() == Z3_goal_prec.Z3_GOAL_UNDER_OVER; return getPrecision() == Z3_goal_prec.Z3_GOAL_UNDER_OVER;
} }
@ -77,7 +77,7 @@ public class Goal extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public void add(BoolExpr ... constraints) throws Z3Exception public void add(BoolExpr ... constraints)
{ {
getContext().checkContextMatch(constraints); getContext().checkContextMatch(constraints);
for (BoolExpr c : constraints) for (BoolExpr c : constraints)
@ -90,7 +90,7 @@ public class Goal extends Z3Object
/** /**
* Indicates whether the goal contains `false'. * Indicates whether the goal contains `false'.
**/ **/
public boolean inconsistent() throws Z3Exception public boolean inconsistent()
{ {
return Native.goalInconsistent(getContext().nCtx(), getNativeObject()); return Native.goalInconsistent(getContext().nCtx(), getNativeObject());
} }
@ -100,7 +100,7 @@ public class Goal extends Z3Object
* Remarks: This tracks how many transformations * Remarks: This tracks how many transformations
* were applied to it. * were applied to it.
**/ **/
public int getDepth() throws Z3Exception public int getDepth()
{ {
return Native.goalDepth(getContext().nCtx(), getNativeObject()); return Native.goalDepth(getContext().nCtx(), getNativeObject());
} }
@ -108,7 +108,7 @@ public class Goal extends Z3Object
/** /**
* Erases all formulas from the given goal. * Erases all formulas from the given goal.
**/ **/
public void reset() throws Z3Exception public void reset()
{ {
Native.goalReset(getContext().nCtx(), getNativeObject()); Native.goalReset(getContext().nCtx(), getNativeObject());
} }
@ -116,7 +116,7 @@ public class Goal extends Z3Object
/** /**
* The number of formulas in the goal. * The number of formulas in the goal.
**/ **/
public int size() throws Z3Exception public int size()
{ {
return Native.goalSize(getContext().nCtx(), getNativeObject()); return Native.goalSize(getContext().nCtx(), getNativeObject());
} }
@ -126,7 +126,7 @@ public class Goal extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public BoolExpr[] getFormulas() throws Z3Exception public BoolExpr[] getFormulas()
{ {
int n = size(); int n = size();
BoolExpr[] res = new BoolExpr[n]; BoolExpr[] res = new BoolExpr[n];
@ -139,7 +139,7 @@ public class Goal extends Z3Object
/** /**
* The number of formulas, subformulas and terms in the goal. * The number of formulas, subformulas and terms in the goal.
**/ **/
public int getNumExprs() throws Z3Exception public int getNumExprs()
{ {
return Native.goalNumExprs(getContext().nCtx(), getNativeObject()); return Native.goalNumExprs(getContext().nCtx(), getNativeObject());
} }
@ -148,7 +148,7 @@ public class Goal extends Z3Object
* Indicates whether the goal is empty, and it is precise or the product of * Indicates whether the goal is empty, and it is precise or the product of
* an under approximation. * an under approximation.
**/ **/
public boolean isDecidedSat() throws Z3Exception public boolean isDecidedSat()
{ {
return Native.goalIsDecidedSat(getContext().nCtx(), getNativeObject()); return Native.goalIsDecidedSat(getContext().nCtx(), getNativeObject());
} }
@ -157,7 +157,7 @@ public class Goal extends Z3Object
* Indicates whether the goal contains `false', and it is precise or the * Indicates whether the goal contains `false', and it is precise or the
* product of an over approximation. * product of an over approximation.
**/ **/
public boolean isDecidedUnsat() throws Z3Exception public boolean isDecidedUnsat()
{ {
return Native return Native
.goalIsDecidedUnsat(getContext().nCtx(), getNativeObject()); .goalIsDecidedUnsat(getContext().nCtx(), getNativeObject());
@ -168,7 +168,7 @@ public class Goal extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Goal translate(Context ctx) throws Z3Exception public Goal translate(Context ctx)
{ {
return new Goal(ctx, Native.goalTranslate(getContext().nCtx(), return new Goal(ctx, Native.goalTranslate(getContext().nCtx(),
getNativeObject(), ctx.nCtx())); getNativeObject(), ctx.nCtx()));
@ -179,7 +179,7 @@ public class Goal extends Z3Object
* Remarks: Essentially invokes the `simplify' tactic * Remarks: Essentially invokes the `simplify' tactic
* on the goal. * on the goal.
**/ **/
public Goal simplify() throws Z3Exception public Goal simplify()
{ {
Tactic t = getContext().mkTactic("simplify"); Tactic t = getContext().mkTactic("simplify");
ApplyResult res = t.apply(this); ApplyResult res = t.apply(this);
@ -195,7 +195,7 @@ public class Goal extends Z3Object
* Remarks: Essentially invokes the `simplify' tactic * Remarks: Essentially invokes the `simplify' tactic
* on the goal. * on the goal.
**/ **/
public Goal simplify(Params p) throws Z3Exception public Goal simplify(Params p)
{ {
Tactic t = getContext().mkTactic("simplify"); Tactic t = getContext().mkTactic("simplify");
ApplyResult res = t.apply(this, p); ApplyResult res = t.apply(this, p);
@ -222,25 +222,25 @@ public class Goal extends Z3Object
} }
} }
Goal(Context ctx, long obj) throws Z3Exception Goal(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
Goal(Context ctx, boolean models, boolean unsatCores, boolean proofs) Goal(Context ctx, boolean models, boolean unsatCores, boolean proofs)
throws Z3Exception
{ {
super(ctx, Native.mkGoal(ctx.nCtx(), (models) ? true : false, super(ctx, Native.mkGoal(ctx.nCtx(), (models) ? true : false,
(unsatCores) ? true : false, (proofs) ? true : false)); (unsatCores) ? true : false, (proofs) ? true : false));
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getGoalDRQ().incAndClear(getContext(), o); getContext().getGoalDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getGoalDRQ().add(o); getContext().getGoalDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -21,7 +21,7 @@ package com.microsoft.z3;
public class IDisposable public class IDisposable
{ {
public void dispose() throws Z3Exception public void dispose()
{ {
} }
} }

View file

@ -26,7 +26,7 @@ public class IntExpr extends ArithExpr
* Constructor for IntExpr * Constructor for IntExpr
* @throws Z3Exception on error * @throws Z3Exception on error
**/ **/
IntExpr(Context ctx, long obj) throws Z3Exception IntExpr(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -25,7 +25,7 @@ import java.math.BigInteger;
public class IntNum extends IntExpr public class IntNum extends IntExpr
{ {
IntNum(Context ctx, long obj) throws Z3Exception IntNum(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
@ -33,7 +33,7 @@ public class IntNum extends IntExpr
/** /**
* Retrieve the int value. * Retrieve the int value.
**/ **/
public int getInt() throws Z3Exception public int getInt()
{ {
Native.IntPtr res = new Native.IntPtr(); Native.IntPtr res = new Native.IntPtr();
if (Native.getNumeralInt(getContext().nCtx(), getNativeObject(), res) ^ true) if (Native.getNumeralInt(getContext().nCtx(), getNativeObject(), res) ^ true)
@ -44,7 +44,7 @@ public class IntNum extends IntExpr
/** /**
* Retrieve the 64-bit int value. * Retrieve the 64-bit int value.
**/ **/
public long getInt64() throws Z3Exception public long getInt64()
{ {
Native.LongPtr res = new Native.LongPtr(); Native.LongPtr res = new Native.LongPtr();
if (Native.getNumeralInt64(getContext().nCtx(), getNativeObject(), res) ^ true) if (Native.getNumeralInt64(getContext().nCtx(), getNativeObject(), res) ^ true)
@ -55,7 +55,7 @@ public class IntNum extends IntExpr
/** /**
* Retrieve the BigInteger value. * Retrieve the BigInteger value.
**/ **/
public BigInteger getBigInteger() throws Z3Exception public BigInteger getBigInteger()
{ {
return new BigInteger(this.toString()); return new BigInteger(this.toString());
} }

View file

@ -22,12 +22,12 @@ package com.microsoft.z3;
**/ **/
public class IntSort extends ArithSort public class IntSort extends ArithSort
{ {
IntSort(Context ctx, long obj) throws Z3Exception IntSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
IntSort(Context ctx) throws Z3Exception IntSort(Context ctx)
{ {
super(ctx, Native.mkIntSort(ctx.nCtx())); super(ctx, Native.mkIntSort(ctx.nCtx()));
} }

View file

@ -29,24 +29,24 @@ public class IntSymbol extends Symbol
* Remarks: Throws an exception if the symbol * Remarks: Throws an exception if the symbol
* is not of int kind. * is not of int kind.
**/ **/
public int getInt() throws Z3Exception public int getInt()
{ {
if (!isIntSymbol()) if (!isIntSymbol())
throw new Z3Exception("Int requested from non-Int symbol"); throw new Z3Exception("Int requested from non-Int symbol");
return Native.getSymbolInt(getContext().nCtx(), getNativeObject()); return Native.getSymbolInt(getContext().nCtx(), getNativeObject());
} }
IntSymbol(Context ctx, long obj) throws Z3Exception IntSymbol(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
IntSymbol(Context ctx, int i) throws Z3Exception IntSymbol(Context ctx, int i)
{ {
super(ctx, Native.mkIntSymbol(ctx.nCtx(), i)); super(ctx, Native.mkIntSymbol(ctx.nCtx(), i));
} }
void checkNativeObject(long obj) throws Z3Exception void checkNativeObject(long obj)
{ {
if (Native.getSymbolKind(getContext().nCtx(), obj) != Z3_symbol_kind.Z3_INT_SYMBOL if (Native.getSymbolKind(getContext().nCtx(), obj) != Z3_symbol_kind.Z3_INT_SYMBOL
.toInt()) .toInt())

View file

@ -33,7 +33,7 @@ public class InterpolationContext extends Context
/** /**
* Constructor. * Constructor.
**/ **/
public InterpolationContext() throws Z3Exception public InterpolationContext()
{ {
m_ctx = Native.mkInterpolationContext(0); m_ctx = Native.mkInterpolationContext(0);
initContext(); initContext();
@ -46,7 +46,7 @@ public class InterpolationContext extends Context
* Remarks: * Remarks:
* @see Context#Context * @see Context#Context
**/ **/
public InterpolationContext(Map<String, String> settings) throws Z3Exception public InterpolationContext(Map<String, String> settings)
{ {
long cfg = Native.mkConfig(); long cfg = Native.mkConfig();
for (Map.Entry<String, String> kv : settings.entrySet()) for (Map.Entry<String, String> kv : settings.entrySet())
@ -60,7 +60,7 @@ public class InterpolationContext extends Context
* Create an expression that marks a formula position for interpolation. * Create an expression that marks a formula position for interpolation.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public BoolExpr MkInterpolant(BoolExpr a) throws Z3Exception public BoolExpr MkInterpolant(BoolExpr a)
{ {
checkContextMatch(a); checkContextMatch(a);
return new BoolExpr(this, Native.mkInterpolant(nCtx(), a.getNativeObject())); return new BoolExpr(this, Native.mkInterpolant(nCtx(), a.getNativeObject()));
@ -73,7 +73,7 @@ public class InterpolationContext extends Context
* well documented. * well documented.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr[] GetInterpolant(Expr pf, Expr pat, Params p) throws Z3Exception public Expr[] GetInterpolant(Expr pf, Expr pat, Params p)
{ {
checkContextMatch(pf); checkContextMatch(pf);
checkContextMatch(pat); checkContextMatch(pat);
@ -94,7 +94,7 @@ public class InterpolationContext extends Context
* well documented. * well documented.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Z3_lbool ComputeInterpolant(Expr pat, Params p, ASTVector interp, Model model) throws Z3Exception public Z3_lbool ComputeInterpolant(Expr pat, Params p, ASTVector interp, Model model)
{ {
checkContextMatch(pat); checkContextMatch(pat);
checkContextMatch(p); checkContextMatch(p);
@ -113,7 +113,7 @@ public class InterpolationContext extends Context
/// 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 /// too the function Z3_interpolation_profile in the C/C++ API, which is
/// well documented. /// well documented.
public String InterpolationProfile() throws Z3Exception public String InterpolationProfile()
{ {
return Native.interpolationProfile(nCtx()); return Native.interpolationProfile(nCtx());
} }
@ -124,7 +124,7 @@ public class InterpolationContext extends Context
/// 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 /// too the function Z3_check_interpolant in the C/C++ API, which is
/// well documented. /// well documented.
public int CheckInterpolant(Expr[] cnsts, int[] parents, Expr[] interps, String error, Expr[] theory) throws Z3Exception public int CheckInterpolant(Expr[] cnsts, int[] parents, Expr[] interps, String error, Expr[] theory)
{ {
Native.StringPtr n_err_str = new Native.StringPtr(); Native.StringPtr n_err_str = new Native.StringPtr();
int r = Native.checkInterpolant(nCtx(), int r = Native.checkInterpolant(nCtx(),
@ -145,7 +145,7 @@ public class InterpolationContext extends Context
/// 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 /// too the function Z3_read_interpolation_problem in the C/C++ API, which is
/// well documented. /// well documented.
public int ReadInterpolationProblem(String filename, Expr[] cnsts, int[] parents, String error, Expr[] theory) throws Z3Exception public int ReadInterpolationProblem(String filename, Expr[] cnsts, int[] parents, String error, Expr[] theory)
{ {
Native.IntPtr n_num = new Native.IntPtr(); Native.IntPtr n_num = new Native.IntPtr();
Native.IntPtr n_num_theory = new Native.IntPtr(); Native.IntPtr n_num_theory = new Native.IntPtr();
@ -176,7 +176,7 @@ public class InterpolationContext extends Context
/// 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 /// too the function Z3_write_interpolation_problem in the C/C++ API, which is
/// well documented. /// well documented.
public void WriteInterpolationProblem(String filename, Expr[] cnsts, int[] parents, String error, Expr[] theory) throws Z3Exception public void WriteInterpolationProblem(String filename, Expr[] cnsts, int[] parents, String error, Expr[] theory)
{ {
Native.writeInterpolationProblem(nCtx(), cnsts.length, Expr.arrayToNative(cnsts), parents, filename, theory.length, Expr.arrayToNative(theory)); Native.writeInterpolationProblem(nCtx(), cnsts.length, Expr.arrayToNative(cnsts), parents, filename, theory.length, Expr.arrayToNative(theory));
} }

View file

@ -26,7 +26,7 @@ public class ListSort extends Sort
* The declaration of the nil function of this list sort. * The declaration of the nil function of this list sort.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncDecl getNilDecl() throws Z3Exception public FuncDecl getNilDecl()
{ {
return new FuncDecl(getContext(), Native.getDatatypeSortConstructor(getContext().nCtx(), getNativeObject(), 0)); return new FuncDecl(getContext(), Native.getDatatypeSortConstructor(getContext().nCtx(), getNativeObject(), 0));
} }
@ -35,7 +35,7 @@ public class ListSort extends Sort
* The empty list. * The empty list.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr getNil() throws Z3Exception public Expr getNil()
{ {
return getContext().mkApp(getNilDecl()); return getContext().mkApp(getNilDecl());
} }
@ -44,7 +44,7 @@ public class ListSort extends Sort
* The declaration of the isNil function of this list sort. * The declaration of the isNil function of this list sort.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncDecl getIsNilDecl() throws Z3Exception public FuncDecl getIsNilDecl()
{ {
return new FuncDecl(getContext(), Native.getDatatypeSortRecognizer(getContext().nCtx(), getNativeObject(), 0)); return new FuncDecl(getContext(), Native.getDatatypeSortRecognizer(getContext().nCtx(), getNativeObject(), 0));
} }
@ -53,7 +53,7 @@ public class ListSort extends Sort
* The declaration of the cons function of this list sort. * The declaration of the cons function of this list sort.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncDecl getConsDecl() throws Z3Exception public FuncDecl getConsDecl()
{ {
return new FuncDecl(getContext(), Native.getDatatypeSortConstructor(getContext().nCtx(), getNativeObject(), 1)); return new FuncDecl(getContext(), Native.getDatatypeSortConstructor(getContext().nCtx(), getNativeObject(), 1));
} }
@ -63,7 +63,7 @@ public class ListSort extends Sort
* @throws Z3Exception * @throws Z3Exception
* *
**/ **/
public FuncDecl getIsConsDecl() throws Z3Exception public FuncDecl getIsConsDecl()
{ {
return new FuncDecl(getContext(), Native.getDatatypeSortRecognizer(getContext().nCtx(), getNativeObject(), 1)); return new FuncDecl(getContext(), Native.getDatatypeSortRecognizer(getContext().nCtx(), getNativeObject(), 1));
} }
@ -72,7 +72,7 @@ public class ListSort extends Sort
* The declaration of the head function of this list sort. * The declaration of the head function of this list sort.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncDecl getHeadDecl() throws Z3Exception public FuncDecl getHeadDecl()
{ {
return new FuncDecl(getContext(), Native.getDatatypeSortConstructorAccessor(getContext().nCtx(), getNativeObject(), 1, 0)); return new FuncDecl(getContext(), Native.getDatatypeSortConstructorAccessor(getContext().nCtx(), getNativeObject(), 1, 0));
} }
@ -81,12 +81,12 @@ public class ListSort extends Sort
* The declaration of the tail function of this list sort. * The declaration of the tail function of this list sort.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncDecl getTailDecl() throws Z3Exception public FuncDecl getTailDecl()
{ {
return new FuncDecl(getContext(), Native.getDatatypeSortConstructorAccessor(getContext().nCtx(), getNativeObject(), 1, 1)); return new FuncDecl(getContext(), Native.getDatatypeSortConstructorAccessor(getContext().nCtx(), getNativeObject(), 1, 1));
} }
ListSort(Context ctx, Symbol name, Sort elemSort) throws Z3Exception ListSort(Context ctx, Symbol name, Sort elemSort)
{ {
super(ctx, 0); super(ctx, 0);

View file

@ -53,7 +53,7 @@ public final class Log
* log. * log.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public static void append(String s) throws Z3Exception public static void append(String s)
{ {
if (!m_is_open) if (!m_is_open)
throw new Z3Exception("Log cannot be closed."); throw new Z3Exception("Log cannot be closed.");

View file

@ -33,7 +33,7 @@ public class Model extends Z3Object
* null otherwise. * null otherwise.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr getConstInterp(Expr a) throws Z3Exception public Expr getConstInterp(Expr a)
{ {
getContext().checkContextMatch(a); getContext().checkContextMatch(a);
return getConstInterp(a.getFuncDecl()); return getConstInterp(a.getFuncDecl());
@ -48,7 +48,7 @@ public class Model extends Z3Object
* null otherwise. * null otherwise.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr getConstInterp(FuncDecl f) throws Z3Exception public Expr getConstInterp(FuncDecl f)
{ {
getContext().checkContextMatch(f); getContext().checkContextMatch(f);
if (f.getArity() != 0 if (f.getArity() != 0
@ -74,7 +74,7 @@ public class Model extends Z3Object
* the model, null otherwise. * the model, null otherwise.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncInterp getFuncInterp(FuncDecl f) throws Z3Exception public FuncInterp getFuncInterp(FuncDecl f)
{ {
getContext().checkContextMatch(f); getContext().checkContextMatch(f);
@ -117,7 +117,7 @@ public class Model extends Z3Object
/** /**
* The number of constants that have an interpretation in the model. * The number of constants that have an interpretation in the model.
**/ **/
public int getNumConsts() throws Z3Exception public int getNumConsts()
{ {
return Native.modelGetNumConsts(getContext().nCtx(), getNativeObject()); return Native.modelGetNumConsts(getContext().nCtx(), getNativeObject());
} }
@ -127,7 +127,7 @@ public class Model extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncDecl[] getConstDecls() throws Z3Exception public FuncDecl[] getConstDecls()
{ {
int n = getNumConsts(); int n = getNumConsts();
FuncDecl[] res = new FuncDecl[n]; FuncDecl[] res = new FuncDecl[n];
@ -140,7 +140,7 @@ public class Model extends Z3Object
/** /**
* The number of function interpretations in the model. * The number of function interpretations in the model.
**/ **/
public int getNumFuncs() throws Z3Exception public int getNumFuncs()
{ {
return Native.modelGetNumFuncs(getContext().nCtx(), getNativeObject()); return Native.modelGetNumFuncs(getContext().nCtx(), getNativeObject());
} }
@ -150,7 +150,7 @@ public class Model extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncDecl[] getFuncDecls() throws Z3Exception public FuncDecl[] getFuncDecls()
{ {
int n = getNumFuncs(); int n = getNumFuncs();
FuncDecl[] res = new FuncDecl[n]; FuncDecl[] res = new FuncDecl[n];
@ -165,7 +165,7 @@ public class Model extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncDecl[] getDecls() throws Z3Exception public FuncDecl[] getDecls()
{ {
int nFuncs = getNumFuncs(); int nFuncs = getNumFuncs();
int nConsts = getNumConsts(); int nConsts = getNumConsts();
@ -208,7 +208,7 @@ public class Model extends Z3Object
* @return The evaluation of {@code t} in the model. * @return The evaluation of {@code t} in the model.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr eval(Expr t, boolean completion) throws Z3Exception public Expr eval(Expr t, boolean completion)
{ {
Native.LongPtr v = new Native.LongPtr(); Native.LongPtr v = new Native.LongPtr();
if (Native.modelEval(getContext().nCtx(), getNativeObject(), if (Native.modelEval(getContext().nCtx(), getNativeObject(),
@ -223,7 +223,7 @@ public class Model extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr evaluate(Expr t, boolean completion) throws Z3Exception public Expr evaluate(Expr t, boolean completion)
{ {
return eval(t, completion); return eval(t, completion);
} }
@ -232,7 +232,7 @@ public class Model extends Z3Object
* The number of uninterpreted sorts that the model has an interpretation * The number of uninterpreted sorts that the model has an interpretation
* for. * for.
**/ **/
public int getNumSorts() throws Z3Exception public int getNumSorts()
{ {
return Native.modelGetNumSorts(getContext().nCtx(), getNativeObject()); return Native.modelGetNumSorts(getContext().nCtx(), getNativeObject());
} }
@ -248,7 +248,7 @@ public class Model extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Sort[] getSorts() throws Z3Exception public Sort[] getSorts()
{ {
int n = getNumSorts(); int n = getNumSorts();
@ -268,7 +268,7 @@ public class Model extends Z3Object
* of {@code s} * of {@code s}
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr[] getSortUniverse(Sort s) throws Z3Exception public Expr[] getSortUniverse(Sort s)
{ {
ASTVector nUniv = new ASTVector(getContext(), Native.modelGetSortUniverse( ASTVector nUniv = new ASTVector(getContext(), Native.modelGetSortUniverse(
@ -296,18 +296,18 @@ public class Model extends Z3Object
} }
} }
Model(Context ctx, long obj) throws Z3Exception Model(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getModelDRQ().incAndClear(getContext(), o); getContext().getModelDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getModelDRQ().add(o); getContext().getModelDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -27,7 +27,7 @@ public class ParamDescrs extends Z3Object
/** /**
* validate a set of parameters. * validate a set of parameters.
**/ **/
public void validate(Params p) throws Z3Exception public void validate(Params p)
{ {
Native.paramsValidate(getContext().nCtx(), p.getNativeObject(), Native.paramsValidate(getContext().nCtx(), p.getNativeObject(),
@ -37,7 +37,7 @@ public class ParamDescrs extends Z3Object
/** /**
* Retrieve kind of parameter. * Retrieve kind of parameter.
**/ **/
public Z3_param_kind getKind(Symbol name) throws Z3Exception public Z3_param_kind getKind(Symbol name)
{ {
return Z3_param_kind.fromInt(Native.paramDescrsGetKind( return Z3_param_kind.fromInt(Native.paramDescrsGetKind(
@ -49,7 +49,7 @@ public class ParamDescrs extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Symbol[] getNames() throws Z3Exception public Symbol[] getNames()
{ {
int sz = Native.paramDescrsSize(getContext().nCtx(), getNativeObject()); int sz = Native.paramDescrsSize(getContext().nCtx(), getNativeObject());
Symbol[] names = new Symbol[sz]; Symbol[] names = new Symbol[sz];
@ -64,7 +64,7 @@ public class ParamDescrs extends Z3Object
/** /**
* The size of the ParamDescrs. * The size of the ParamDescrs.
**/ **/
public int size() throws Z3Exception public int size()
{ {
return Native.paramDescrsSize(getContext().nCtx(), getNativeObject()); return Native.paramDescrsSize(getContext().nCtx(), getNativeObject());
} }
@ -83,18 +83,18 @@ public class ParamDescrs extends Z3Object
} }
} }
ParamDescrs(Context ctx, long obj) throws Z3Exception ParamDescrs(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getParamDescrsDRQ().incAndClear(getContext(), o); getContext().getParamDescrsDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getParamDescrsDRQ().add(o); getContext().getParamDescrsDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -26,7 +26,7 @@ public class Params extends Z3Object
/** /**
* Adds a parameter setting. * Adds a parameter setting.
**/ **/
public void add(Symbol name, boolean value) throws Z3Exception public void add(Symbol name, boolean value)
{ {
Native.paramsSetBool(getContext().nCtx(), getNativeObject(), Native.paramsSetBool(getContext().nCtx(), getNativeObject(),
name.getNativeObject(), (value) ? true : false); name.getNativeObject(), (value) ? true : false);
@ -35,7 +35,7 @@ public class Params extends Z3Object
/** /**
* Adds a parameter setting. * Adds a parameter setting.
**/ **/
public void add(Symbol name, double value) throws Z3Exception public void add(Symbol name, double value)
{ {
Native.paramsSetDouble(getContext().nCtx(), getNativeObject(), Native.paramsSetDouble(getContext().nCtx(), getNativeObject(),
name.getNativeObject(), value); name.getNativeObject(), value);
@ -44,7 +44,7 @@ public class Params extends Z3Object
/** /**
* Adds a parameter setting. * Adds a parameter setting.
**/ **/
public void add(Symbol name, String value) throws Z3Exception public void add(Symbol name, String value)
{ {
Native.paramsSetSymbol(getContext().nCtx(), getNativeObject(), Native.paramsSetSymbol(getContext().nCtx(), getNativeObject(),
@ -55,7 +55,7 @@ public class Params extends Z3Object
/** /**
* Adds a parameter setting. * Adds a parameter setting.
**/ **/
public void add(Symbol name, Symbol value) throws Z3Exception public void add(Symbol name, Symbol value)
{ {
Native.paramsSetSymbol(getContext().nCtx(), getNativeObject(), Native.paramsSetSymbol(getContext().nCtx(), getNativeObject(),
@ -65,7 +65,7 @@ public class Params extends Z3Object
/** /**
* Adds a parameter setting. * Adds a parameter setting.
**/ **/
public void add(String name, boolean value) throws Z3Exception public void add(String name, boolean value)
{ {
Native.paramsSetBool(getContext().nCtx(), getNativeObject(), Native.paramsSetBool(getContext().nCtx(), getNativeObject(),
getContext().mkSymbol(name).getNativeObject(), value); getContext().mkSymbol(name).getNativeObject(), value);
@ -74,7 +74,7 @@ public class Params extends Z3Object
/** /**
* Adds a parameter setting. * Adds a parameter setting.
**/ **/
public void add(String name, int value) throws Z3Exception public void add(String name, int value)
{ {
Native.paramsSetUint(getContext().nCtx(), getNativeObject(), getContext() Native.paramsSetUint(getContext().nCtx(), getNativeObject(), getContext()
.mkSymbol(name).getNativeObject(), value); .mkSymbol(name).getNativeObject(), value);
@ -83,7 +83,7 @@ public class Params extends Z3Object
/** /**
* Adds a parameter setting. * Adds a parameter setting.
**/ **/
public void add(String name, double value) throws Z3Exception public void add(String name, double value)
{ {
Native.paramsSetDouble(getContext().nCtx(), getNativeObject(), getContext() Native.paramsSetDouble(getContext().nCtx(), getNativeObject(), getContext()
.mkSymbol(name).getNativeObject(), value); .mkSymbol(name).getNativeObject(), value);
@ -92,7 +92,7 @@ public class Params extends Z3Object
/** /**
* Adds a parameter setting. * Adds a parameter setting.
**/ **/
public void add(String name, Symbol value) throws Z3Exception public void add(String name, Symbol value)
{ {
Native.paramsSetSymbol(getContext().nCtx(), getNativeObject(), getContext() Native.paramsSetSymbol(getContext().nCtx(), getNativeObject(), getContext()
.mkSymbol(name).getNativeObject(), value.getNativeObject()); .mkSymbol(name).getNativeObject(), value.getNativeObject());
@ -101,7 +101,7 @@ public class Params extends Z3Object
/** /**
* Adds a parameter setting. * Adds a parameter setting.
**/ **/
public void add(String name, String value) throws Z3Exception public void add(String name, String value)
{ {
Native.paramsSetSymbol(getContext().nCtx(), getNativeObject(), Native.paramsSetSymbol(getContext().nCtx(), getNativeObject(),
@ -123,18 +123,18 @@ public class Params extends Z3Object
} }
} }
Params(Context ctx) throws Z3Exception Params(Context ctx)
{ {
super(ctx, Native.mkParams(ctx.nCtx())); super(ctx, Native.mkParams(ctx.nCtx()));
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getParamsDRQ().incAndClear(getContext(), o); getContext().getParamsDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getParamsDRQ().add(o); getContext().getParamsDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -26,7 +26,7 @@ public class Pattern extends AST
/** /**
* The number of terms in the pattern. * The number of terms in the pattern.
**/ **/
public int getNumTerms() throws Z3Exception public int getNumTerms()
{ {
return Native.getPatternNumTerms(getContext().nCtx(), getNativeObject()); return Native.getPatternNumTerms(getContext().nCtx(), getNativeObject());
} }
@ -36,7 +36,7 @@ public class Pattern extends AST
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr[] getTerms() throws Z3Exception public Expr[] getTerms()
{ {
int n = getNumTerms(); int n = getNumTerms();
@ -61,7 +61,7 @@ public class Pattern extends AST
} }
} }
Pattern(Context ctx, long obj) throws Z3Exception Pattern(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -34,30 +34,30 @@ public class Probe extends Z3Object
* 0.0 for false, and a value different from 0.0 for true. * 0.0 for false, and a value different from 0.0 for true.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public double apply(Goal g) throws Z3Exception public double apply(Goal g)
{ {
getContext().checkContextMatch(g); getContext().checkContextMatch(g);
return Native.probeApply(getContext().nCtx(), getNativeObject(), return Native.probeApply(getContext().nCtx(), getNativeObject(),
g.getNativeObject()); g.getNativeObject());
} }
Probe(Context ctx, long obj) throws Z3Exception Probe(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
Probe(Context ctx, String name) throws Z3Exception Probe(Context ctx, String name)
{ {
super(ctx, Native.mkProbe(ctx.nCtx(), name)); super(ctx, Native.mkProbe(ctx.nCtx(), name));
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getProbeDRQ().incAndClear(getContext(), o); getContext().getProbeDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getProbeDRQ().add(o); getContext().getProbeDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -27,7 +27,7 @@ public class Quantifier extends BoolExpr
/** /**
* Indicates whether the quantifier is universal. * Indicates whether the quantifier is universal.
**/ **/
public boolean isUniversal() throws Z3Exception public boolean isUniversal()
{ {
return Native.isQuantifierForall(getContext().nCtx(), getNativeObject()); return Native.isQuantifierForall(getContext().nCtx(), getNativeObject());
} }
@ -35,7 +35,7 @@ public class Quantifier extends BoolExpr
/** /**
* Indicates whether the quantifier is existential. * Indicates whether the quantifier is existential.
**/ **/
public boolean isExistential() throws Z3Exception public boolean isExistential()
{ {
return !isUniversal(); return !isUniversal();
} }
@ -43,7 +43,7 @@ public class Quantifier extends BoolExpr
/** /**
* The weight of the quantifier. * The weight of the quantifier.
**/ **/
public int getWeight() throws Z3Exception public int getWeight()
{ {
return Native.getQuantifierWeight(getContext().nCtx(), getNativeObject()); return Native.getQuantifierWeight(getContext().nCtx(), getNativeObject());
} }
@ -51,7 +51,7 @@ public class Quantifier extends BoolExpr
/** /**
* The number of patterns. * The number of patterns.
**/ **/
public int getNumPatterns() throws Z3Exception public int getNumPatterns()
{ {
return Native return Native
.getQuantifierNumPatterns(getContext().nCtx(), getNativeObject()); .getQuantifierNumPatterns(getContext().nCtx(), getNativeObject());
@ -62,7 +62,7 @@ public class Quantifier extends BoolExpr
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Pattern[] getPatterns() throws Z3Exception public Pattern[] getPatterns()
{ {
int n = getNumPatterns(); int n = getNumPatterns();
Pattern[] res = new Pattern[n]; Pattern[] res = new Pattern[n];
@ -75,7 +75,7 @@ public class Quantifier extends BoolExpr
/** /**
* The number of no-patterns. * The number of no-patterns.
**/ **/
public int getNumNoPatterns() throws Z3Exception public int getNumNoPatterns()
{ {
return Native.getQuantifierNumNoPatterns(getContext().nCtx(), return Native.getQuantifierNumNoPatterns(getContext().nCtx(),
getNativeObject()); getNativeObject());
@ -86,7 +86,7 @@ public class Quantifier extends BoolExpr
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Pattern[] getNoPatterns() throws Z3Exception public Pattern[] getNoPatterns()
{ {
int n = getNumNoPatterns(); int n = getNumNoPatterns();
Pattern[] res = new Pattern[n]; Pattern[] res = new Pattern[n];
@ -99,7 +99,7 @@ public class Quantifier extends BoolExpr
/** /**
* The number of bound variables. * The number of bound variables.
**/ **/
public int getNumBound() throws Z3Exception public int getNumBound()
{ {
return Native.getQuantifierNumBound(getContext().nCtx(), getNativeObject()); return Native.getQuantifierNumBound(getContext().nCtx(), getNativeObject());
} }
@ -109,7 +109,7 @@ public class Quantifier extends BoolExpr
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Symbol[] getBoundVariableNames() throws Z3Exception public Symbol[] getBoundVariableNames()
{ {
int n = getNumBound(); int n = getNumBound();
Symbol[] res = new Symbol[n]; Symbol[] res = new Symbol[n];
@ -124,7 +124,7 @@ public class Quantifier extends BoolExpr
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Sort[] getBoundVariableSorts() throws Z3Exception public Sort[] getBoundVariableSorts()
{ {
int n = getNumBound(); int n = getNumBound();
Sort[] res = new Sort[n]; Sort[] res = new Sort[n];
@ -139,7 +139,7 @@ public class Quantifier extends BoolExpr
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public BoolExpr getBody() throws Z3Exception public BoolExpr getBody()
{ {
return new BoolExpr(getContext(), Native.getQuantifierBody(getContext() return new BoolExpr(getContext(), Native.getQuantifierBody(getContext()
.nCtx(), getNativeObject())); .nCtx(), getNativeObject()));
@ -147,7 +147,7 @@ public class Quantifier extends BoolExpr
Quantifier(Context ctx, boolean isForall, Sort[] sorts, Symbol[] names, Quantifier(Context ctx, boolean isForall, Sort[] sorts, Symbol[] names,
Expr body, int weight, Pattern[] patterns, Expr[] noPatterns, Expr body, int weight, Pattern[] patterns, Expr[] noPatterns,
Symbol quantifierID, Symbol skolemID) throws Z3Exception Symbol quantifierID, Symbol skolemID)
{ {
super(ctx, 0); super(ctx, 0);
@ -183,7 +183,7 @@ public class Quantifier extends BoolExpr
Quantifier(Context ctx, boolean isForall, Expr[] bound, Expr body, Quantifier(Context ctx, boolean isForall, Expr[] bound, Expr body,
int weight, Pattern[] patterns, Expr[] noPatterns, int weight, Pattern[] patterns, Expr[] noPatterns,
Symbol quantifierID, Symbol skolemID) throws Z3Exception Symbol quantifierID, Symbol skolemID)
{ {
super(ctx, 0); super(ctx, 0);
@ -210,12 +210,12 @@ public class Quantifier extends BoolExpr
} }
} }
Quantifier(Context ctx, long obj) throws Z3Exception Quantifier(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
void checkNativeObject(long obj) throws Z3Exception void checkNativeObject(long obj)
{ {
if (Native.getAstKind(getContext().nCtx(), obj) != Z3_ast_kind.Z3_QUANTIFIER_AST if (Native.getAstKind(getContext().nCtx(), obj) != Z3_ast_kind.Z3_QUANTIFIER_AST
.toInt()) .toInt())

View file

@ -27,7 +27,7 @@ public class RatNum extends RealExpr
/** /**
* The numerator of a rational numeral. * The numerator of a rational numeral.
**/ **/
public IntNum getNumerator() throws Z3Exception public IntNum getNumerator()
{ {
return new IntNum(getContext(), Native.getNumerator(getContext().nCtx(), return new IntNum(getContext(), Native.getNumerator(getContext().nCtx(),
getNativeObject())); getNativeObject()));
@ -36,7 +36,7 @@ public class RatNum extends RealExpr
/** /**
* The denominator of a rational numeral. * The denominator of a rational numeral.
**/ **/
public IntNum getDenominator() throws Z3Exception public IntNum getDenominator()
{ {
return new IntNum(getContext(), Native.getDenominator(getContext().nCtx(), return new IntNum(getContext(), Native.getDenominator(getContext().nCtx(),
getNativeObject())); getNativeObject()));
@ -45,7 +45,7 @@ public class RatNum extends RealExpr
/** /**
* Converts the numerator of the rational to a BigInteger * Converts the numerator of the rational to a BigInteger
**/ **/
public BigInteger getBigIntNumerator() throws Z3Exception public BigInteger getBigIntNumerator()
{ {
IntNum n = getNumerator(); IntNum n = getNumerator();
return new BigInteger(n.toString()); return new BigInteger(n.toString());
@ -54,7 +54,7 @@ public class RatNum extends RealExpr
/** /**
* Converts the denominator of the rational to a BigInteger * Converts the denominator of the rational to a BigInteger
**/ **/
public BigInteger getBigIntDenominator() throws Z3Exception public BigInteger getBigIntDenominator()
{ {
IntNum n = getDenominator(); IntNum n = getDenominator();
return new BigInteger(n.toString()); return new BigInteger(n.toString());
@ -65,7 +65,7 @@ public class RatNum extends RealExpr
* Remarks: The result * Remarks: The result
* has at most {@code precision} decimal places. * has at most {@code precision} decimal places.
**/ **/
public String toDecimalString(int precision) throws Z3Exception public String toDecimalString(int precision)
{ {
return Native.getNumeralDecimalString(getContext().nCtx(), getNativeObject(), return Native.getNumeralDecimalString(getContext().nCtx(), getNativeObject(),
precision); precision);
@ -85,7 +85,7 @@ public class RatNum extends RealExpr
} }
} }
RatNum(Context ctx, long obj) throws Z3Exception RatNum(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -25,7 +25,7 @@ public class RealExpr extends ArithExpr
/** /**
* Constructor for RealExpr * Constructor for RealExpr
**/ **/
RealExpr(Context ctx, long obj) throws Z3Exception RealExpr(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -22,12 +22,12 @@ package com.microsoft.z3;
**/ **/
public class RealSort extends ArithSort public class RealSort extends ArithSort
{ {
RealSort(Context ctx, long obj) throws Z3Exception RealSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
RealSort(Context ctx) throws Z3Exception RealSort(Context ctx)
{ {
super(ctx, Native.mkRealSort(ctx.nCtx())); super(ctx, Native.mkRealSort(ctx.nCtx()));
} }

View file

@ -25,7 +25,7 @@ public class RelationSort extends Sort
/** /**
* The arity of the relation sort. * The arity of the relation sort.
**/ **/
public int getArity() throws Z3Exception public int getArity()
{ {
return Native.getRelationArity(getContext().nCtx(), getNativeObject()); return Native.getRelationArity(getContext().nCtx(), getNativeObject());
} }
@ -34,7 +34,7 @@ public class RelationSort extends Sort
* The sorts of the columns of the relation sort. * The sorts of the columns of the relation sort.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Sort[] getColumnSorts() throws Z3Exception public Sort[] getColumnSorts()
{ {
if (m_columnSorts != null) if (m_columnSorts != null)
@ -50,7 +50,7 @@ public class RelationSort extends Sort
private Sort[] m_columnSorts = null; private Sort[] m_columnSorts = null;
RelationSort(Context ctx, long obj) throws Z3Exception RelationSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }

View file

@ -22,12 +22,12 @@ package com.microsoft.z3;
**/ **/
public class SetSort extends Sort public class SetSort extends Sort
{ {
SetSort(Context ctx, long obj) throws Z3Exception SetSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
SetSort(Context ctx, Sort ty) throws Z3Exception SetSort(Context ctx, Sort ty)
{ {
super(ctx, Native.mkSetSort(ctx.nCtx(), ty.getNativeObject())); super(ctx, Native.mkSetSort(ctx.nCtx(), ty.getNativeObject()));
} }

View file

@ -27,7 +27,7 @@ public class Solver extends Z3Object
/** /**
* A string that describes all available solver parameters. * A string that describes all available solver parameters.
**/ **/
public String getHelp() throws Z3Exception public String getHelp()
{ {
return Native.solverGetHelp(getContext().nCtx(), getNativeObject()); return Native.solverGetHelp(getContext().nCtx(), getNativeObject());
} }
@ -37,7 +37,7 @@ public class Solver extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public void setParameters(Params value) throws Z3Exception public void setParameters(Params value)
{ {
getContext().checkContextMatch(value); getContext().checkContextMatch(value);
Native.solverSetParams(getContext().nCtx(), getNativeObject(), Native.solverSetParams(getContext().nCtx(), getNativeObject(),
@ -49,7 +49,7 @@ public class Solver extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public ParamDescrs getParameterDescriptions() throws Z3Exception public ParamDescrs getParameterDescriptions()
{ {
return new ParamDescrs(getContext(), Native.solverGetParamDescrs( return new ParamDescrs(getContext(), Native.solverGetParamDescrs(
getContext().nCtx(), getNativeObject())); getContext().nCtx(), getNativeObject()));
@ -60,7 +60,7 @@ public class Solver extends Z3Object
* @see pop * @see pop
* @see push * @see push
**/ **/
public int getNumScopes() throws Z3Exception public int getNumScopes()
{ {
return Native return Native
.solverGetNumScopes(getContext().nCtx(), getNativeObject()); .solverGetNumScopes(getContext().nCtx(), getNativeObject());
@ -70,7 +70,7 @@ public class Solver extends Z3Object
* Creates a backtracking point. * Creates a backtracking point.
* @see pop * @see pop
**/ **/
public void push() throws Z3Exception public void push()
{ {
Native.solverPush(getContext().nCtx(), getNativeObject()); Native.solverPush(getContext().nCtx(), getNativeObject());
} }
@ -79,7 +79,7 @@ public class Solver extends Z3Object
* Backtracks one backtracking point. * Backtracks one backtracking point.
* Remarks: . * Remarks: .
**/ **/
public void pop() throws Z3Exception public void pop()
{ {
pop(1); pop(1);
} }
@ -91,7 +91,7 @@ public class Solver extends Z3Object
* {@code NumScopes} * {@code NumScopes}
* @see push * @see push
**/ **/
public void pop(int n) throws Z3Exception public void pop(int n)
{ {
Native.solverPop(getContext().nCtx(), getNativeObject(), n); Native.solverPop(getContext().nCtx(), getNativeObject(), n);
} }
@ -101,7 +101,7 @@ public class Solver extends Z3Object
* Remarks: This removes all assertions from the * Remarks: This removes all assertions from the
* solver. * solver.
**/ **/
public void reset() throws Z3Exception public void reset()
{ {
Native.solverReset(getContext().nCtx(), getNativeObject()); Native.solverReset(getContext().nCtx(), getNativeObject());
} }
@ -111,7 +111,7 @@ public class Solver extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public void add(BoolExpr... constraints) throws Z3Exception public void add(BoolExpr... constraints)
{ {
getContext().checkContextMatch(constraints); getContext().checkContextMatch(constraints);
for (BoolExpr a : constraints) for (BoolExpr a : constraints)
@ -135,7 +135,7 @@ public class Solver extends Z3Object
* and the Boolean literals * and the Boolean literals
* provided using <see cref="Check"/> with assumptions. * provided using <see cref="Check"/> with assumptions.
**/ **/
public void assertAndTrack(BoolExpr[] constraints, BoolExpr[] ps) throws Z3Exception public void assertAndTrack(BoolExpr[] constraints, BoolExpr[] ps)
{ {
getContext().checkContextMatch(constraints); getContext().checkContextMatch(constraints);
getContext().checkContextMatch(ps); getContext().checkContextMatch(ps);
@ -160,7 +160,7 @@ public class Solver extends Z3Object
* and the Boolean literals * and the Boolean literals
* provided using <see cref="Check"/> with assumptions. * provided using <see cref="Check"/> with assumptions.
*/ */
public void assertAndTrack(BoolExpr constraint, BoolExpr p) throws Z3Exception public void assertAndTrack(BoolExpr constraint, BoolExpr p)
{ {
getContext().checkContextMatch(constraint); getContext().checkContextMatch(constraint);
getContext().checkContextMatch(p); getContext().checkContextMatch(p);
@ -174,7 +174,7 @@ public class Solver extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public int getNumAssertions() throws Z3Exception public int getNumAssertions()
{ {
ASTVector assrts = new ASTVector(getContext(), Native.solverGetAssertions( ASTVector assrts = new ASTVector(getContext(), Native.solverGetAssertions(
getContext().nCtx(), getNativeObject())); getContext().nCtx(), getNativeObject()));
@ -186,7 +186,7 @@ public class Solver extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public BoolExpr[] getAssertions() throws Z3Exception public BoolExpr[] getAssertions()
{ {
ASTVector assrts = new ASTVector(getContext(), Native.solverGetAssertions( ASTVector assrts = new ASTVector(getContext(), Native.solverGetAssertions(
getContext().nCtx(), getNativeObject())); getContext().nCtx(), getNativeObject()));
@ -204,7 +204,7 @@ public class Solver extends Z3Object
* @see getUnsatCore * @see getUnsatCore
* @see getProof * @see getProof
**/ **/
public Status check(Expr... assumptions) throws Z3Exception public Status check(Expr... assumptions)
{ {
Z3_lbool r; Z3_lbool r;
if (assumptions == null) if (assumptions == null)
@ -232,7 +232,7 @@ public class Solver extends Z3Object
* @see getUnsatCore * @see getUnsatCore
* @see getProof * @see getProof
**/ **/
public Status check() throws Z3Exception public Status check()
{ {
return check((Expr[]) null); return check((Expr[]) null);
} }
@ -246,7 +246,7 @@ public class Solver extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Model getModel() throws Z3Exception public Model getModel()
{ {
long x = Native.solverGetModel(getContext().nCtx(), getNativeObject()); long x = Native.solverGetModel(getContext().nCtx(), getNativeObject());
if (x == 0) if (x == 0)
@ -264,7 +264,7 @@ public class Solver extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr getProof() throws Z3Exception public Expr getProof()
{ {
long x = Native.solverGetProof(getContext().nCtx(), getNativeObject()); long x = Native.solverGetProof(getContext().nCtx(), getNativeObject());
if (x == 0) if (x == 0)
@ -282,7 +282,7 @@ public class Solver extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Expr[] getUnsatCore() throws Z3Exception public Expr[] getUnsatCore()
{ {
ASTVector core = new ASTVector(getContext(), Native.solverGetUnsatCore( ASTVector core = new ASTVector(getContext(), Native.solverGetUnsatCore(
@ -298,7 +298,7 @@ public class Solver extends Z3Object
* A brief justification of why the last call to {@code Check} returned * A brief justification of why the last call to {@code Check} returned
* {@code UNKNOWN}. * {@code UNKNOWN}.
**/ **/
public String getReasonUnknown() throws Z3Exception public String getReasonUnknown()
{ {
return Native.solverGetReasonUnknown(getContext().nCtx(), return Native.solverGetReasonUnknown(getContext().nCtx(),
getNativeObject()); getNativeObject());
@ -309,7 +309,7 @@ public class Solver extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Statistics getStatistics() throws Z3Exception public Statistics getStatistics()
{ {
return new Statistics(getContext(), Native.solverGetStatistics( return new Statistics(getContext(), Native.solverGetStatistics(
getContext().nCtx(), getNativeObject())); getContext().nCtx(), getNativeObject()));
@ -330,18 +330,18 @@ public class Solver extends Z3Object
} }
} }
Solver(Context ctx, long obj) throws Z3Exception Solver(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getSolverDRQ().incAndClear(getContext(), o); getContext().getSolverDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getSolverDRQ().add(o); getContext().getSolverDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -58,7 +58,7 @@ public class Sort extends AST
/** /**
* Returns a unique identifier for the sort. * Returns a unique identifier for the sort.
**/ **/
public int getId() throws Z3Exception public int getId()
{ {
return Native.getSortId(getContext().nCtx(), getNativeObject()); return Native.getSortId(getContext().nCtx(), getNativeObject());
} }
@ -66,7 +66,7 @@ public class Sort extends AST
/** /**
* The kind of the sort. * The kind of the sort.
**/ **/
public Z3_sort_kind getSortKind() throws Z3Exception public Z3_sort_kind getSortKind()
{ {
return Z3_sort_kind.fromInt(Native.getSortKind(getContext().nCtx(), return Z3_sort_kind.fromInt(Native.getSortKind(getContext().nCtx(),
getNativeObject())); getNativeObject()));
@ -75,7 +75,7 @@ public class Sort extends AST
/** /**
* The name of the sort * The name of the sort
**/ **/
public Symbol getName() throws Z3Exception public Symbol getName()
{ {
return Symbol.create(getContext(), return Symbol.create(getContext(),
Native.getSortName(getContext().nCtx(), getNativeObject())); Native.getSortName(getContext().nCtx(), getNativeObject()));
@ -98,12 +98,12 @@ public class Sort extends AST
/** /**
* Sort constructor * Sort constructor
**/ **/
Sort(Context ctx, long obj) throws Z3Exception Sort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
void checkNativeObject(long obj) throws Z3Exception void checkNativeObject(long obj)
{ {
if (Native.getAstKind(getContext().nCtx(), obj) != Z3_ast_kind.Z3_SORT_AST if (Native.getAstKind(getContext().nCtx(), obj) != Z3_ast_kind.Z3_SORT_AST
.toInt()) .toInt())
@ -111,7 +111,7 @@ public class Sort extends AST
super.checkNativeObject(obj); super.checkNativeObject(obj);
} }
static Sort create(Context ctx, long obj) throws Z3Exception static Sort create(Context ctx, long obj)
{ {
Z3_sort_kind sk = Z3_sort_kind.fromInt(Native.getSortKind(ctx.nCtx(), obj)); Z3_sort_kind sk = Z3_sort_kind.fromInt(Native.getSortKind(ctx.nCtx(), obj));
switch (sk) switch (sk)

View file

@ -70,7 +70,7 @@ public class Statistics extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public String getValueString() throws Z3Exception public String getValueString()
{ {
if (isUInt()) if (isUInt())
return Integer.toString(m_int); return Integer.toString(m_int);
@ -131,7 +131,7 @@ public class Statistics extends Z3Object
/** /**
* The number of statistical data. * The number of statistical data.
**/ **/
public int size() throws Z3Exception public int size()
{ {
return Native.statsSize(getContext().nCtx(), getNativeObject()); return Native.statsSize(getContext().nCtx(), getNativeObject());
} }
@ -141,7 +141,7 @@ public class Statistics extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Entry[] getEntries() throws Z3Exception public Entry[] getEntries()
{ {
int n = size(); int n = size();
@ -166,7 +166,7 @@ public class Statistics extends Z3Object
/** /**
* The statistical counters. * The statistical counters.
**/ **/
public String[] getKeys() throws Z3Exception public String[] getKeys()
{ {
int n = size(); int n = size();
String[] res = new String[n]; String[] res = new String[n];
@ -182,7 +182,7 @@ public class Statistics extends Z3Object
* *
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Entry get(String key) throws Z3Exception public Entry get(String key)
{ {
int n = size(); int n = size();
Entry[] es = getEntries(); Entry[] es = getEntries();
@ -192,18 +192,18 @@ public class Statistics extends Z3Object
return null; return null;
} }
Statistics(Context ctx, long obj) throws Z3Exception Statistics(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getStatisticsDRQ().incAndClear(getContext(), o); getContext().getStatisticsDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getStatisticsDRQ().add(o); getContext().getStatisticsDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -29,22 +29,22 @@ public class StringSymbol extends Symbol
* Remarks: Throws an exception if the * Remarks: Throws an exception if the
* symbol is not of string kind. * symbol is not of string kind.
**/ **/
public String getString() throws Z3Exception public String getString()
{ {
return Native.getSymbolString(getContext().nCtx(), getNativeObject()); return Native.getSymbolString(getContext().nCtx(), getNativeObject());
} }
StringSymbol(Context ctx, long obj) throws Z3Exception StringSymbol(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
StringSymbol(Context ctx, String s) throws Z3Exception StringSymbol(Context ctx, String s)
{ {
super(ctx, Native.mkStringSymbol(ctx.nCtx(), s)); super(ctx, Native.mkStringSymbol(ctx.nCtx(), s));
} }
void checkNativeObject(long obj) throws Z3Exception void checkNativeObject(long obj)
{ {
if (Native.getSymbolKind(getContext().nCtx(), obj) != Z3_symbol_kind.Z3_STRING_SYMBOL if (Native.getSymbolKind(getContext().nCtx(), obj) != Z3_symbol_kind.Z3_STRING_SYMBOL
.toInt()) .toInt())

View file

@ -27,7 +27,7 @@ public class Symbol extends Z3Object
/** /**
* The kind of the symbol (int or string) * The kind of the symbol (int or string)
**/ **/
protected Z3_symbol_kind getKind() throws Z3Exception protected Z3_symbol_kind getKind()
{ {
return Z3_symbol_kind.fromInt(Native.getSymbolKind(getContext().nCtx(), return Z3_symbol_kind.fromInt(Native.getSymbolKind(getContext().nCtx(),
getNativeObject())); getNativeObject()));
@ -36,7 +36,7 @@ public class Symbol extends Z3Object
/** /**
* Indicates whether the symbol is of Int kind * Indicates whether the symbol is of Int kind
**/ **/
public boolean isIntSymbol() throws Z3Exception public boolean isIntSymbol()
{ {
return getKind() == Z3_symbol_kind.Z3_INT_SYMBOL; return getKind() == Z3_symbol_kind.Z3_INT_SYMBOL;
} }
@ -44,7 +44,7 @@ public class Symbol extends Z3Object
/** /**
* Indicates whether the symbol is of string kind. * Indicates whether the symbol is of string kind.
**/ **/
public boolean isStringSymbol() throws Z3Exception public boolean isStringSymbol()
{ {
return getKind() == Z3_symbol_kind.Z3_STRING_SYMBOL; return getKind() == Z3_symbol_kind.Z3_STRING_SYMBOL;
} }
@ -72,12 +72,12 @@ public class Symbol extends Z3Object
/** /**
* Symbol constructor * Symbol constructor
**/ **/
protected Symbol(Context ctx, long obj) throws Z3Exception protected Symbol(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
static Symbol create(Context ctx, long obj) throws Z3Exception static Symbol create(Context ctx, long obj)
{ {
switch (Z3_symbol_kind.fromInt(Native.getSymbolKind(ctx.nCtx(), obj))) switch (Z3_symbol_kind.fromInt(Native.getSymbolKind(ctx.nCtx(), obj)))
{ {

View file

@ -29,7 +29,7 @@ public class Tactic extends Z3Object
/** /**
* A string containing a description of parameters accepted by the tactic. * A string containing a description of parameters accepted by the tactic.
**/ **/
public String getHelp() throws Z3Exception public String getHelp()
{ {
return Native.tacticGetHelp(getContext().nCtx(), getNativeObject()); return Native.tacticGetHelp(getContext().nCtx(), getNativeObject());
} }
@ -38,7 +38,7 @@ public class Tactic extends Z3Object
* Retrieves parameter descriptions for Tactics. * Retrieves parameter descriptions for Tactics.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public ParamDescrs getParameterDescriptions() throws Z3Exception public ParamDescrs getParameterDescriptions()
{ {
return new ParamDescrs(getContext(), Native.tacticGetParamDescrs(getContext() return new ParamDescrs(getContext(), Native.tacticGetParamDescrs(getContext()
.nCtx(), getNativeObject())); .nCtx(), getNativeObject()));
@ -48,7 +48,7 @@ public class Tactic extends Z3Object
* Execute the tactic over the goal. * Execute the tactic over the goal.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public ApplyResult apply(Goal g) throws Z3Exception public ApplyResult apply(Goal g)
{ {
return apply(g, null); return apply(g, null);
} }
@ -57,7 +57,7 @@ public class Tactic extends Z3Object
* Execute the tactic over the goal. * Execute the tactic over the goal.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public ApplyResult apply(Goal g, Params p) throws Z3Exception public ApplyResult apply(Goal g, Params p)
{ {
getContext().checkContextMatch(g); getContext().checkContextMatch(g);
if (p == null) if (p == null)
@ -77,28 +77,28 @@ public class Tactic extends Z3Object
* @see Context#mkSolver(Tactic) * @see Context#mkSolver(Tactic)
* @throws Z3Exception * @throws Z3Exception
**/ **/
public Solver getSolver() throws Z3Exception public Solver getSolver()
{ {
return getContext().mkSolver(this); return getContext().mkSolver(this);
} }
Tactic(Context ctx, long obj) throws Z3Exception Tactic(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
Tactic(Context ctx, String name) throws Z3Exception Tactic(Context ctx, String name)
{ {
super(ctx, Native.mkTactic(ctx.nCtx(), name)); super(ctx, Native.mkTactic(ctx.nCtx(), name));
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
getContext().getTacticDRQ().incAndClear(getContext(), o); getContext().getTacticDRQ().incAndClear(getContext(), o);
super.incRef(o); super.incRef(o);
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
getContext().getTacticDRQ().add(o); getContext().getTacticDRQ().add(o);
super.decRef(o); super.decRef(o);

View file

@ -26,7 +26,7 @@ public class TupleSort extends Sort
* The constructor function of the tuple. * The constructor function of the tuple.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncDecl mkDecl() throws Z3Exception public FuncDecl mkDecl()
{ {
return new FuncDecl(getContext(), Native.getTupleSortMkDecl(getContext() return new FuncDecl(getContext(), Native.getTupleSortMkDecl(getContext()
@ -36,7 +36,7 @@ public class TupleSort extends Sort
/** /**
* The number of fields in the tuple. * The number of fields in the tuple.
**/ **/
public int getNumFields() throws Z3Exception public int getNumFields()
{ {
return Native.getTupleSortNumFields(getContext().nCtx(), getNativeObject()); return Native.getTupleSortNumFields(getContext().nCtx(), getNativeObject());
} }
@ -45,7 +45,7 @@ public class TupleSort extends Sort
* The field declarations. * The field declarations.
* @throws Z3Exception * @throws Z3Exception
**/ **/
public FuncDecl[] getFieldDecls() throws Z3Exception public FuncDecl[] getFieldDecls()
{ {
int n = getNumFields(); int n = getNumFields();
@ -57,7 +57,7 @@ public class TupleSort extends Sort
} }
TupleSort(Context ctx, Symbol name, int numFields, Symbol[] fieldNames, TupleSort(Context ctx, Symbol name, int numFields, Symbol[] fieldNames,
Sort[] fieldSorts) throws Z3Exception Sort[] fieldSorts)
{ {
super(ctx, 0); super(ctx, 0);

View file

@ -22,12 +22,12 @@ package com.microsoft.z3;
**/ **/
public class UninterpretedSort extends Sort public class UninterpretedSort extends Sort
{ {
UninterpretedSort(Context ctx, long obj) throws Z3Exception UninterpretedSort(Context ctx, long obj)
{ {
super(ctx, obj); super(ctx, obj);
} }
UninterpretedSort(Context ctx, Symbol s) throws Z3Exception UninterpretedSort(Context ctx, Symbol s)
{ {
super(ctx, Native.mkUninterpretedSort(ctx.nCtx(), s.getNativeObject())); super(ctx, Native.mkUninterpretedSort(ctx.nCtx(), s.getNativeObject()));
} }

View file

@ -22,7 +22,7 @@ package com.microsoft.z3;
* The exception base class for error reporting from Z3 * The exception base class for error reporting from Z3
**/ **/
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class Z3Exception extends Exception public class Z3Exception extends RuntimeException
{ {
/** /**
* Constructor. * Constructor.

View file

@ -26,7 +26,7 @@ public class Z3Object extends IDisposable
/** /**
* Finalizer. * Finalizer.
**/ **/
protected void finalize() throws Z3Exception protected void finalize()
{ {
dispose(); dispose();
} }
@ -34,7 +34,7 @@ public class Z3Object extends IDisposable
/** /**
* Disposes of the underlying native Z3 object. * Disposes of the underlying native Z3 object.
**/ **/
public void dispose() throws Z3Exception public void dispose()
{ {
if (m_n_obj != 0) if (m_n_obj != 0)
{ {
@ -58,7 +58,7 @@ public class Z3Object extends IDisposable
m_ctx = ctx; m_ctx = ctx;
} }
Z3Object(Context ctx, long obj) throws Z3Exception Z3Object(Context ctx, long obj)
{ {
ctx.m_refCount++; ctx.m_refCount++;
m_ctx = ctx; m_ctx = ctx;
@ -66,15 +66,15 @@ public class Z3Object extends IDisposable
m_n_obj = obj; m_n_obj = obj;
} }
void incRef(long o) throws Z3Exception void incRef(long o)
{ {
} }
void decRef(long o) throws Z3Exception void decRef(long o)
{ {
} }
void checkNativeObject(long obj) throws Z3Exception void checkNativeObject(long obj)
{ {
} }
@ -83,7 +83,7 @@ public class Z3Object extends IDisposable
return m_n_obj; return m_n_obj;
} }
void setNativeObject(long value) throws Z3Exception void setNativeObject(long value)
{ {
if (value != 0) if (value != 0)
{ {