(Context ctx)
| 1259 | // / Demonstrates how to initialize the parser symbol table. |
| 1260 | |
| 1261 | public void parserExample3(Context ctx) throws Exception |
| 1262 | { |
| 1263 | System.out.println("ParserExample3"); |
| 1264 | Log.append("ParserExample3"); |
| 1265 | |
| 1266 | /* declare function g */ |
| 1267 | IntSort I = ctx.mkIntSort(); |
| 1268 | FuncDecl<IntSort> g = ctx.mkFuncDecl("g", new Sort[] { I, I }, I); |
| 1269 | |
| 1270 | BoolExpr ca = commAxiom(ctx, g); |
| 1271 | |
| 1272 | BoolExpr thm = ctx.parseSMTLIB2String( |
| 1273 | "(declare-fun (Int Int) Int) (assert (forall ((x Int) (y Int)) (=> (= x y) (= (gg x 0) (gg 0 y)))))", |
| 1274 | null, null, new Symbol[] { ctx.mkSymbol("gg") }, |
| 1275 | new FuncDecl[] { g })[0]; |
| 1276 | System.out.printf("formula: %s%n", thm); |
| 1277 | prove(ctx, thm, false, ca); |
| 1278 | } |
| 1279 | |
| 1280 | |
| 1281 | // / Demonstrates how to handle parser errors using Z3 error handling |
nothing calls this directly
no test coverage detected