public class Model extends Z3Object
| Modifier and Type | Class and Description |
|---|---|
class |
Model.ModelEvaluationFailedException
A ModelEvaluationFailedException is thrown when an expression cannot be
evaluated by the model.
|
| Modifier and Type | Method and Description |
|---|---|
Expr |
eval(Expr t,
boolean completion)
Evaluates the expression
t in the current model. |
Expr |
evaluate(Expr t,
boolean completion)
Alias for
Eval. |
FuncDecl[] |
getConstDecls()
The function declarations of the constants in the model.
|
Expr |
getConstInterp(Expr a)
Retrieves the interpretation (the assignment) of
a in
the model. |
Expr |
getConstInterp(FuncDecl f)
Retrieves the interpretation (the assignment) of
f in
the model. |
FuncDecl[] |
getDecls()
All symbols that have an interpretation in the model.
|
FuncDecl[] |
getFuncDecls()
The function declarations of the function interpretations in the model.
|
FuncInterp |
getFuncInterp(FuncDecl f)
Retrieves the interpretation (the assignment) of a non-constant
f in the model. |
int |
getNumConsts()
The number of constants that have an interpretation in the model.
|
int |
getNumFuncs()
The number of function interpretations in the model.
|
int |
getNumSorts()
The number of uninterpreted sorts that the model has an interpretation
for.
|
Sort[] |
getSorts()
The uninterpreted sorts that the model has an interpretation for.
|
Expr[] |
getSortUniverse(Sort s)
The finite set of distinct values that represent the interpretation for
sort
s. |
java.lang.String |
toString()
Conversion of models to strings.
|
public Expr getConstInterp(Expr a)
a in
the model.a - A ConstantZ3Exceptionpublic Expr getConstInterp(FuncDecl f)
f in
the model.f - A function declaration of zero arityZ3Exceptionpublic FuncInterp getFuncInterp(FuncDecl f)
f in the model.f - A function declaration of non-zero arityZ3Exceptionpublic int getNumConsts()
public FuncDecl[] getConstDecls()
Z3Exceptionpublic int getNumFuncs()
public FuncDecl[] getFuncDecls()
Z3Exceptionpublic FuncDecl[] getDecls()
Z3Exceptionpublic Expr eval(Expr t, boolean completion)
t in the current model.
Remarks: This function may fail if t contains
quantifiers, is partial (MODEL_PARTIAL enabled), or if t is not well-sorted. In this case a
ModelEvaluationFailedException is thrown.t - the expression to evaluatecompletion - An expression completion When this flag
is enabled, a model value will be assigned to any constant or function
that does not have an interpretation in the model.t in the model.Z3Exceptionpublic int getNumSorts()
public Sort[] getSorts()
Z3ExceptiongetNumSorts(),
getSortUniverse(com.microsoft.z3.Sort)public Expr[] getSortUniverse(Sort s)
s.s - An uninterpreted sortsZ3Exceptionpublic java.lang.String toString()
toString in class java.lang.Object