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

Method parserExample1

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

Source from the content-addressed store, hash-verified

1440 // / Demonstrates how to use the SMTLIB parser.
1441
1442 public void parserExample1(Context ctx) throws TestFailedException
1443 {
1444 System.out.println("ParserExample1");
1445 Log.append("ParserExample1");
1446
1447 BoolExpr f = ctx.parseSMTLIB2String(
1448 "(declare-const x Int) (declare-const y Int) (assert (and (> x y) (> x 0)))",
1449 null, null, null, null)[0];
1450 System.out.println("formula " + f);
1451
1452 @SuppressWarnings("unused")
1453 Model m = check(ctx, f, Status.SATISFIABLE);
1454 }
1455
1456 // / Demonstrates how to initialize the parser symbol table.
1457

Callers 1

mainMethod · 0.95

Calls 3

appendMethod · 0.95
checkMethod · 0.95
parseSMTLIB2StringMethod · 0.80

Tested by

no test coverage detected