(Context ctx)
| 1474 | // / Demonstrates how to initialize the parser symbol table. |
| 1475 | |
| 1476 | public void parserExample3(Context ctx) throws Exception |
| 1477 | { |
| 1478 | System.out.println("ParserExample3"); |
| 1479 | Log.append("ParserExample3"); |
| 1480 | |
| 1481 | /* declare function g */ |
| 1482 | Sort I = ctx.mkIntSort(); |
| 1483 | FuncDecl g = ctx.mkFuncDecl("g", new Sort[] { I, I }, I); |
| 1484 | |
| 1485 | BoolExpr ca = commAxiom(ctx, g); |
| 1486 | |
| 1487 | BoolExpr thm = ctx.parseSMTLIB2String( |
| 1488 | "(declare-fun (Int Int) Int) (assert (forall ((x Int) (y Int)) (=> (= x y) (= (gg x 0) (gg 0 y)))))", |
| 1489 | null, null, new Symbol[] { ctx.mkSymbol("gg") }, |
| 1490 | new FuncDecl[] { g })[0]; |
| 1491 | System.out.println("formula: " + thm); |
| 1492 | prove(ctx, thm, false, ca); |
| 1493 | } |
| 1494 | |
| 1495 | |
| 1496 | // / Demonstrates how to handle parser errors using Z3 error handling |
nothing calls this directly
no test coverage detected