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

Method parserExample1

examples/java/JavaGenericExample.java:1228–1240  ·  view source on GitHub ↗
(Context ctx)

Source from the content-addressed store, hash-verified

1226 // / Demonstrates how to use the SMTLIB parser.
1227
1228 public void parserExample1(Context ctx) throws TestFailedException
1229 {
1230 System.out.println("ParserExample1");
1231 Log.append("ParserExample1");
1232
1233 BoolExpr f = ctx.parseSMTLIB2String(
1234 "(declare-const x Int) (declare-const y Int) (assert (and (> x y) (> x 0)))",
1235 null, null, null, null)[0];
1236 System.out.printf("formula %s%n", f);
1237
1238 @SuppressWarnings("unused")
1239 Model m = check(ctx, f, Status.SATISFIABLE);
1240 }
1241
1242 // / Demonstrates how to initialize the parser symbol table.
1243

Callers 1

mainMethod · 0.95

Calls 3

appendMethod · 0.95
checkMethod · 0.95
parseSMTLIB2StringMethod · 0.80

Tested by

no test coverage detected