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

Method getConsequences

src/api/java/Solver.java:274–284  ·  view source on GitHub ↗

Retrieve fixed assignments to the set of variables in the form of consequences. Each consequence is an implication of the form relevant-assumptions Implies variable = value where the relevant assumptions is a subset of the assumptions that are passed in and the equality on the right side of

(Expr<BoolSort>[] assumptions, Expr<?>[] variables, List<Expr<BoolSort>> consequences)

Source from the content-addressed store, hash-verified

272 *
273 */
274 public Status getConsequences(Expr<BoolSort>[] assumptions, Expr<?>[] variables, List<Expr<BoolSort>> consequences)
275 {
276 ASTVector result = new ASTVector(getContext());
277 ASTVector asms = new ASTVector(getContext());
278 ASTVector vars = new ASTVector(getContext());
279 for (Expr<BoolSort> asm : assumptions) asms.push(asm);
280 for (Expr<?> v : variables) vars.push(v);
281 int r = Native.solverGetConsequences(getContext().nCtx(), getNativeObject(), asms.getNativeObject(), vars.getNativeObject(), result.getNativeObject());
282 for (int i = 0; i < result.size(); ++i) consequences.add((BoolExpr) Expr.create(getContext(), result.get(i).getNativeObject()));
283 return lboolToStatus(Z3_lbool.fromInt(r));
284 }
285
286
287 /**

Callers

nothing calls this directly

Calls 10

pushMethod · 0.95
sizeMethod · 0.95
createMethod · 0.95
getMethod · 0.95
lboolToStatusMethod · 0.95
getContextMethod · 0.80
nCtxMethod · 0.80
getNativeObjectMethod · 0.80
fromIntMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected