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

Method parOrExample

examples/java/JavaGenericExample.java:900–921  ·  view source on GitHub ↗
(Context ctx)

Source from the content-addressed store, hash-verified

898 // / Demonstrates how to use the ParOr tactic.
899
900 void parOrExample(Context ctx) throws TestFailedException
901 {
902 System.out.println("ParOrExample");
903 Log.append("ParOrExample");
904
905 BitVecSort bvs = ctx.mkBitVecSort(32);
906 Expr<BitVecSort> x = ctx.mkConst("x", bvs);
907 Expr<BitVecSort> y = ctx.mkConst("y", bvs);
908 BoolExpr q = ctx.mkEq(x, y);
909
910 Goal g = ctx.mkGoal(true, false, false);
911 g.add(q);
912
913 Tactic t1 = ctx.mkTactic("qfbv");
914 Tactic t2 = ctx.mkTactic("qfbv");
915 Tactic p = ctx.parOr(t1, t2);
916
917 ApplyResult ar = p.apply(g);
918
919 if (ar.getNumSubgoals() != 1 || !ar.getSubgoals()[0].isDecidedSat())
920 throw new TestFailedException();
921 }
922
923 void bigIntCheck(Context ctx, RatNum r)
924 {

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