| 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 | |