MCPcopy Create free account
hub / github.com/Z3Prover/z3 / eval

Method eval

src/api/java/Model.java:211–219  ·  view source on GitHub ↗

Evaluates the expression 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. @param t the expression to evaluate @p

(Expr<R> t, boolean completion)

Source from the content-addressed store, hash-verified

209 * @throws Z3Exception
210 **/
211 public <R extends Sort> Expr<R> eval(Expr<R> t, boolean completion)
212 {
213 Native.LongPtr v = new Native.LongPtr();
214 if (!Native.modelEval(getContext().nCtx(), getNativeObject(),
215 t.getNativeObject(), (completion), v))
216 throw new ModelEvaluationFailedException();
217 else
218 return (Expr<R>) Expr.create(getContext(), v.value);
219 }
220
221 /**
222 * Alias for {@code Eval}.

Callers 2

evaluateMethod · 0.95
sudokuExampleMethod · 0.95

Calls 4

createMethod · 0.95
nCtxMethod · 0.80
getContextMethod · 0.80
getNativeObjectMethod · 0.80

Tested by

no test coverage detected