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

Method simplifierExample

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

Source from the content-addressed store, hash-verified

1820 // / Simplifier example.
1821
1822 @SuppressWarnings("unchecked")
1823 public void simplifierExample(Context ctx)
1824 {
1825 System.out.println("SimplifierExample");
1826 Log.append("SimplifierExample");
1827
1828 IntExpr x = ctx.mkIntConst("x");
1829 IntExpr y = ctx.mkIntConst("y");
1830 IntExpr z = ctx.mkIntConst("z");
1831 @SuppressWarnings("unused")
1832 IntExpr u = ctx.mkIntConst("u");
1833
1834 ArithExpr<IntSort> t1 = ctx.mkAdd(x, ctx.mkSub(y, ctx.mkAdd(x, z)));
1835 Expr<IntSort> t2 = t1.simplify();
1836 System.out.printf("%s -> %s%n", t1, t2);
1837 }
1838
1839 // / Extract unsatisfiable core example
1840

Callers 1

mainMethod · 0.95

Calls 5

appendMethod · 0.95
mkIntConstMethod · 0.80
mkAddMethod · 0.80
mkSubMethod · 0.80
simplifyMethod · 0.65

Tested by

no test coverage detected