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

Method simplifierExample

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

Source from the content-addressed store, hash-verified

2015 // / Simplifier example.
2016
2017 public void simplifierExample(Context ctx)
2018 {
2019 System.out.println("SimplifierExample");
2020 Log.append("SimplifierExample");
2021
2022 IntExpr x = ctx.mkIntConst("x");
2023 IntExpr y = ctx.mkIntConst("y");
2024 IntExpr z = ctx.mkIntConst("z");
2025 @SuppressWarnings("unused")
2026 IntExpr u = ctx.mkIntConst("u");
2027
2028 Expr t1 = ctx.mkAdd(x, ctx.mkSub(y, ctx.mkAdd(x, z)));
2029 Expr t2 = t1.simplify();
2030 System.out.println((t1) + " -> " + (t2));
2031 }
2032
2033 // / Extract unsatisfiable core example
2034

Callers 1

mainMethod · 0.95

Calls 5

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

Tested by

no test coverage detected