mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 19:05:51 +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:
parent
2f4c923216
commit
b7bb53406f
62 changed files with 834 additions and 834 deletions
|
@ -33,7 +33,7 @@ public class Goal extends Z3Object
|
|||
* 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(),
|
||||
getNativeObject()));
|
||||
|
@ -42,7 +42,7 @@ public class Goal extends Z3Object
|
|||
/**
|
||||
* Indicates whether the goal is precise.
|
||||
**/
|
||||
public boolean isPrecise() throws Z3Exception
|
||||
public boolean isPrecise()
|
||||
{
|
||||
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.
|
||||
**/
|
||||
public boolean isUnderApproximation() throws Z3Exception
|
||||
public boolean isUnderApproximation()
|
||||
{
|
||||
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.
|
||||
**/
|
||||
public boolean isOverApproximation() throws Z3Exception
|
||||
public boolean isOverApproximation()
|
||||
{
|
||||
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
|
||||
* under-approximations).
|
||||
**/
|
||||
public boolean isGarbage() throws Z3Exception
|
||||
public boolean isGarbage()
|
||||
{
|
||||
return getPrecision() == Z3_goal_prec.Z3_GOAL_UNDER_OVER;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ public class Goal extends Z3Object
|
|||
*
|
||||
* @throws Z3Exception
|
||||
**/
|
||||
public void add(BoolExpr ... constraints) throws Z3Exception
|
||||
public void add(BoolExpr ... constraints)
|
||||
{
|
||||
getContext().checkContextMatch(constraints);
|
||||
for (BoolExpr c : constraints)
|
||||
|
@ -90,7 +90,7 @@ public class Goal extends Z3Object
|
|||
/**
|
||||
* Indicates whether the goal contains `false'.
|
||||
**/
|
||||
public boolean inconsistent() throws Z3Exception
|
||||
public boolean inconsistent()
|
||||
{
|
||||
return Native.goalInconsistent(getContext().nCtx(), getNativeObject());
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ public class Goal extends Z3Object
|
|||
* Remarks: This tracks how many transformations
|
||||
* were applied to it.
|
||||
**/
|
||||
public int getDepth() throws Z3Exception
|
||||
public int getDepth()
|
||||
{
|
||||
return Native.goalDepth(getContext().nCtx(), getNativeObject());
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class Goal extends Z3Object
|
|||
/**
|
||||
* Erases all formulas from the given goal.
|
||||
**/
|
||||
public void reset() throws Z3Exception
|
||||
public void reset()
|
||||
{
|
||||
Native.goalReset(getContext().nCtx(), getNativeObject());
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ public class Goal extends Z3Object
|
|||
/**
|
||||
* The number of formulas in the goal.
|
||||
**/
|
||||
public int size() throws Z3Exception
|
||||
public int size()
|
||||
{
|
||||
return Native.goalSize(getContext().nCtx(), getNativeObject());
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ public class Goal extends Z3Object
|
|||
*
|
||||
* @throws Z3Exception
|
||||
**/
|
||||
public BoolExpr[] getFormulas() throws Z3Exception
|
||||
public BoolExpr[] getFormulas()
|
||||
{
|
||||
int n = size();
|
||||
BoolExpr[] res = new BoolExpr[n];
|
||||
|
@ -139,7 +139,7 @@ public class Goal extends Z3Object
|
|||
/**
|
||||
* The number of formulas, subformulas and terms in the goal.
|
||||
**/
|
||||
public int getNumExprs() throws Z3Exception
|
||||
public int getNumExprs()
|
||||
{
|
||||
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
|
||||
* an under approximation.
|
||||
**/
|
||||
public boolean isDecidedSat() throws Z3Exception
|
||||
public boolean isDecidedSat()
|
||||
{
|
||||
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
|
||||
* product of an over approximation.
|
||||
**/
|
||||
public boolean isDecidedUnsat() throws Z3Exception
|
||||
public boolean isDecidedUnsat()
|
||||
{
|
||||
return Native
|
||||
.goalIsDecidedUnsat(getContext().nCtx(), getNativeObject());
|
||||
|
@ -168,7 +168,7 @@ public class Goal extends Z3Object
|
|||
*
|
||||
* @throws Z3Exception
|
||||
**/
|
||||
public Goal translate(Context ctx) throws Z3Exception
|
||||
public Goal translate(Context ctx)
|
||||
{
|
||||
return new Goal(ctx, Native.goalTranslate(getContext().nCtx(),
|
||||
getNativeObject(), ctx.nCtx()));
|
||||
|
@ -179,7 +179,7 @@ public class Goal extends Z3Object
|
|||
* Remarks: Essentially invokes the `simplify' tactic
|
||||
* on the goal.
|
||||
**/
|
||||
public Goal simplify() throws Z3Exception
|
||||
public Goal simplify()
|
||||
{
|
||||
Tactic t = getContext().mkTactic("simplify");
|
||||
ApplyResult res = t.apply(this);
|
||||
|
@ -195,7 +195,7 @@ public class Goal extends Z3Object
|
|||
* Remarks: Essentially invokes the `simplify' tactic
|
||||
* on the goal.
|
||||
**/
|
||||
public Goal simplify(Params p) throws Z3Exception
|
||||
public Goal simplify(Params p)
|
||||
{
|
||||
Tactic t = getContext().mkTactic("simplify");
|
||||
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);
|
||||
}
|
||||
|
||||
Goal(Context ctx, boolean models, boolean unsatCores, boolean proofs)
|
||||
throws Z3Exception
|
||||
|
||||
{
|
||||
super(ctx, Native.mkGoal(ctx.nCtx(), (models) ? true : false,
|
||||
(unsatCores) ? true : false, (proofs) ? true : false));
|
||||
}
|
||||
|
||||
void incRef(long o) throws Z3Exception
|
||||
void incRef(long o)
|
||||
{
|
||||
getContext().getGoalDRQ().incAndClear(getContext(), o);
|
||||
super.incRef(o);
|
||||
}
|
||||
|
||||
void decRef(long o) throws Z3Exception
|
||||
void decRef(long o)
|
||||
{
|
||||
getContext().getGoalDRQ().add(o);
|
||||
super.decRef(o);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue