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

Method getModel

src/api/java/Solver.java:296–304  ·  view source on GitHub ↗

The model of the last Check. Remarks: The result is null if Check was not invoked before, if its results was not SATISFIABLE, or if model production is not enabled. @throws Z3Exception

()

Source from the content-addressed store, hash-verified

294 * @throws Z3Exception
295 **/
296 public Model getModel()
297 {
298 long x = Native.solverGetModel(getContext().nCtx(), getNativeObject());
299 if (x == 0) {
300 return null;
301 } else {
302 return new Model(getContext(), x);
303 }
304 }
305
306 /**
307 * The proof of the last {@code Check}.

Callers 15

checkMethod · 0.95
disproveMethod · 0.95
modelConverterTestMethod · 0.95
arrayExample1Method · 0.95
sudokuExampleMethod · 0.95
evalExample1Method · 0.95
evalExample2Method · 0.95
floatingPointExample2Method · 0.95
checkMethod · 0.95
disproveMethod · 0.95
modelConverterTestMethod · 0.95
arrayExample1Method · 0.95

Calls 3

nCtxMethod · 0.80
getContextMethod · 0.80
getNativeObjectMethod · 0.80

Tested by

no test coverage detected