(Context ctx)
| 1456 | // / Demonstrates how to initialize the parser symbol table. |
| 1457 | |
| 1458 | public void parserExample2(Context ctx) throws TestFailedException |
| 1459 | { |
| 1460 | System.out.println("ParserExample2"); |
| 1461 | Log.append("ParserExample2"); |
| 1462 | |
| 1463 | Symbol[] declNames = { ctx.mkSymbol("a"), ctx.mkSymbol("b") }; |
| 1464 | FuncDecl a = ctx.mkConstDecl(declNames[0], ctx.mkIntSort()); |
| 1465 | FuncDecl b = ctx.mkConstDecl(declNames[1], ctx.mkIntSort()); |
| 1466 | FuncDecl[] decls = new FuncDecl[] { a, b }; |
| 1467 | |
| 1468 | BoolExpr f = ctx.parseSMTLIB2String("(assert (> a b))", null, null, |
| 1469 | declNames, decls)[0]; |
| 1470 | System.out.println("formula: " + f); |
| 1471 | check(ctx, f, Status.SATISFIABLE); |
| 1472 | } |
| 1473 | |
| 1474 | // / Demonstrates how to initialize the parser symbol table. |
| 1475 |
no test coverage detected