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 |
---|---|
<R extends Sort> |
eval(Expr<R> t,
boolean completion)
Evaluates the expression
t in the current model. |
<R extends Sort> |
evaluate(Expr<R> t,
boolean completion)
Alias for
Eval . |
FuncDecl<?>[] |
getConstDecls()
The function declarations of the constants in the model.
|
<R extends Sort> |
getConstInterp(Expr<R> a)
Retrieves the interpretation (the assignment) of
a in
the model. |
<R extends Sort> |
getConstInterp(FuncDecl<R> 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.
|
<R extends Sort> |
getFuncInterp(FuncDecl<R> 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.
|
<R extends Sort> |
getSortUniverse(R s)
The finite set of distinct values that represent the interpretation for
sort
s . |
java.lang.String |
toString()
Conversion of models to strings.
|
arrayLength, arrayToNative
public <R extends Sort> Expr<R> getConstInterp(Expr<R> a)
a
in
the model.a
- A ConstantZ3Exception
public <R extends Sort> Expr<R> getConstInterp(FuncDecl<R> f)
f
in
the model.f
- A function declaration of zero arityZ3Exception
public <R extends Sort> FuncInterp<R> getFuncInterp(FuncDecl<R> f)
f
in the model.f
- A function declaration of non-zero arityZ3Exception
public int getNumConsts()
public FuncDecl<?>[] getConstDecls()
Z3Exception
public int getNumFuncs()
public FuncDecl<?>[] getFuncDecls()
Z3Exception
public FuncDecl<?>[] getDecls()
Z3Exception
public <R extends Sort> Expr<R> eval(Expr<R> 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.Z3Exception
public <R extends Sort> Expr<R> evaluate(Expr<R> t, boolean completion)
Eval
.Z3Exception
public int getNumSorts()
public Sort[] getSorts()
Z3Exception
getNumSorts()
,
getSortUniverse(R)
public <R extends Sort> Expr<R>[] getSortUniverse(R s)
s
.s
- An uninterpreted sorts
Z3Exception
public java.lang.String toString()
toString
in class java.lang.Object