Package com.microsoft.z3
Class Goal
java.lang.Object
com.microsoft.z3.Z3Object
com.microsoft.z3.Goal
A goal (aka problem). A goal is essentially a set of formulas, that can be
solved and/or transformed using tactics and solvers.
-
Method Summary
Modifier and TypeMethodDescriptionfinal voidAdds theconstraintsto the given goal.Goal to BoolExpr conversion.Convert a model for the goal into a model of the original goal from which this goal was derived.intgetDepth()The depth of the goal.BoolExpr[]The formulas in the goal.intThe number of formulas, subformulas and terms in the goal.The precision of the goal.booleanIndicates whether the goal contains `false'.booleanIndicates whether the goal is empty, and it is precise or the product of an under approximation.booleanIndicates whether the goal contains `false', and it is precise or the product of an over approximation.booleanIndicates whether the goal is garbage (i.e., the product of over- and under-approximations).booleanIndicates whether the goal is an over-approximation.booleanIndicates whether the goal is precise.booleanIndicates whether the goal is an under-approximation.voidreset()Erases all formulas from the given goal.simplify()Simplifies the goal.Simplifies the goal.intsize()The number of formulas in the goal.toString()Goal to string conversion.Translates (copies) the Goal to the target Contextctx.Methods inherited from class com.microsoft.z3.Z3Object
arrayLength, arrayToNative
-
Method Details
-
getPrecision
The precision of the goal. Remarks: Goals can be transformed using over and under approximations. An under approximation is applied when the objective is to find a model for a given goal. An over approximation is applied when the objective is to find a proof for a given goal. -
isPrecise
public boolean isPrecise()Indicates whether the goal is precise. -
isUnderApproximation
public boolean isUnderApproximation()Indicates whether the goal is an under-approximation. -
isOverApproximation
public boolean isOverApproximation()Indicates whether the goal is an over-approximation. -
isGarbage
public boolean isGarbage()Indicates whether the goal is garbage (i.e., the product of over- and under-approximations). -
add
Adds theconstraintsto the given goal.- Throws:
Z3Exception
-
inconsistent
public boolean inconsistent()Indicates whether the goal contains `false'. -
getDepth
public int getDepth()The depth of the goal. Remarks: This tracks how many transformations were applied to it. -
reset
public void reset()Erases all formulas from the given goal. -
size
public int size()The number of formulas in the goal. -
getFormulas
The formulas in the goal.- Throws:
Z3Exception
-
getNumExprs
public int getNumExprs()The number of formulas, subformulas and terms in the goal. -
isDecidedSat
public boolean isDecidedSat()Indicates whether the goal is empty, and it is precise or the product of an under approximation. -
isDecidedUnsat
public boolean isDecidedUnsat()Indicates whether the goal contains `false', and it is precise or the product of an over approximation. -
translate
Translates (copies) the Goal to the target Contextctx.- Throws:
Z3Exception
-
simplify
Simplifies the goal. Remarks: Essentially invokes the `simplify' tactic on the goal. -
simplify
Simplifies the goal. Remarks: Essentially invokes the `simplify' tactic on the goal. -
toString
Goal to string conversion. -
AsBoolExpr
Goal to BoolExpr conversion. Returns a string representation of the Goal. -
convertModel
Convert a model for the goal into a model of the original goal from which this goal was derived.- Returns:
- A model for
g - Throws:
Z3Exception
-