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

Method parOrExample

examples/java/JavaExample.java:1108–1129  ·  view source on GitHub ↗
(Context ctx)

Source from the content-addressed store, hash-verified

1106 // / Demonstrates how to use the ParOr tactic.
1107
1108 void parOrExample(Context ctx) throws TestFailedException
1109 {
1110 System.out.println("ParOrExample");
1111 Log.append("ParOrExample");
1112
1113 BitVecSort bvs = ctx.mkBitVecSort(32);
1114 Expr x = ctx.mkConst("x", bvs);
1115 Expr y = ctx.mkConst("y", bvs);
1116 BoolExpr q = ctx.mkEq(x, y);
1117
1118 Goal g = ctx.mkGoal(true, false, false);
1119 g.add(q);
1120
1121 Tactic t1 = ctx.mkTactic("qfbv");
1122 Tactic t2 = ctx.mkTactic("qfbv");
1123 Tactic p = ctx.parOr(t1, t2);
1124
1125 ApplyResult ar = p.apply(g);
1126
1127 if (ar.getNumSubgoals() != 1 || !ar.getSubgoals()[0].isDecidedSat())
1128 throw new TestFailedException();
1129 }
1130
1131 void bigIntCheck(Context ctx, RatNum r)
1132 {

Callers 1

mainMethod · 0.95

Calls 12

appendMethod · 0.95
addMethod · 0.95
applyMethod · 0.95
getNumSubgoalsMethod · 0.95
getSubgoalsMethod · 0.95
mkBitVecSortMethod · 0.80
mkConstMethod · 0.80
mkEqMethod · 0.80
mkGoalMethod · 0.80
mkTacticMethod · 0.80
parOrMethod · 0.80
isDecidedSatMethod · 0.65

Tested by

no test coverage detected