Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smt2lib parser in C-API #344

Open
AndreaCallia opened this issue Jun 14, 2017 · 0 comments
Open

Smt2lib parser in C-API #344

AndreaCallia opened this issue Jun 14, 2017 · 0 comments

Comments

@AndreaCallia
Copy link

AndreaCallia commented Jun 14, 2017

Dear dReal developers,

is there an SMT2 parser in the dReal project which can be used together with the C-API? I mean somehing similar to the parse_smt2_string() function provided by the z3 python API to convert an SMT2 string into a formula which can be added to a solver. An example of how this function is used in the z3 python API is below.

import z3
example = """
(declare-const x Real)
(assert (> x 0.0))
(assert (< x 2.0))
"""
f = z3.parse_smt2_string(example)
s = z3.Solver()
s.add(f)
s.check()
s.model()

and the output by z3 is:

sat
[x = 1]

If such a parser is not directly available in the C-API, is there some indirect way to access it, perhaps by changing something in the dReal source code?

This may help me very much to make an interactive version of dReal as proposed here

Many thanks for your wonderful work...

PS I have built dReal in a Ubuntu 14.04 64bit machine with clang-3.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant