0

I'm trying to parse an .smt2 file (which gives an answer without a problem if I just run it over z3) in my python file

ctx = Context()
s = Solver(ctx=ctx)
f = parse_smt2_file("./Encodings/foo.smt2", ctx=ctx)
s.add(f)

and I get the following problem:

Traceback (most recent call last): File "", line 1, in f = z3.parse_smt2_file("./ex.smt2", ctx=ctx) File "X/Applications/z3-4.3.3.376614a7822d-x64-osx-10.9.5/bin/z3.py", line 7305, in parse_smt2_file return _to_expr_ref(Z3_parse_smtlib2_file(ctx.ref(), f, ssz, snames, ssorts, dsz, dnames, ddecls), ctx) File "X/Applications/z3-4.3.3.376614a7822d-x64-osx-10.9.5/bin/z3core.py", line 2947, in Z3_parse_smtlib2_file raise Z3Exception(lib().Z3_get_error_msg_ex(a0, err)) Z3Exception: parser error

Any idea what the problem might be?

Bob
  • 1,489
  • 1
  • 16
  • 28

1 Answers1

0

The problem was that the file finished by

(check-sat)
(get-model)

I removed this lines and it worked