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

Polya #1

Open
spitters opened this issue Feb 25, 2016 · 6 comments
Open

Polya #1

spitters opened this issue Feb 25, 2016 · 6 comments

Comments

@spitters
Copy link

Since you can export real number expressions from Coq, maybe it is possible to call Polya, too? @avigad or @rlewis1988 will know more about this.

@gmalecha
Copy link
Owner

We'd love to do this. What is the input format for these tools? Right now we are generating SMT 2 format, if those follow that format, then porting should be pretty easy.

@spitters
Copy link
Author

This is the conversion tool.
https://github.com/rlewis1988/smtlib2polya

@gmalecha
Copy link
Owner

Great. I'll take a look at it.

@robertylewis
Copy link

Yes, this would be a great connection to make!

We can take SMT2 input, using the tool @spitters points out. We don't support all features of the format, and I suspect the conversion isn't entirely bug-free, but I'd be happy to take a look at anything that seems suspicious. I haven't worked on the conversion tool recently, but there are a bunch of additions on my to-do list that I'm hoping to get to over the next few weeks.

@gmalecha
Copy link
Owner

gmalecha commented Mar 1, 2016

I refactored the implementation a bit in the split-solvers branch. This should make it pretty easy to write a new prover and plug it into the system. I took a brief look at the installation instructions but it seems a bit complex to install right now. Is it reasonable to have a program that acts in a similar way to the cvc4 or z3 executables where I can simply write a problem out and get a result? In particular the src/z3solve.ml file contains the code to invoke z3.

@robertylewis
Copy link

Yes, you can generate an executable similar to the one for z3. In the main directory of https://github.com/rlewis1988/smtlib2polya, there's an executable polya generated on Kubuntu -- I'm not sure how cross-platform it is, though. To generate your own:

Run this by giving it a .smt2 file: ./polya file_name.smt2 I don't think that you need to keep the polya directory in your python path for the executable to work. The output is 1 if unsat, -1 if Polya fails, and 0 if there is an error. (Polya is not a decision procedure, so you should interpret -1 as "possibly sat." 0 could mean a timeout, a feature of the SMT spec we don't support, or a bug in my code.)

If you'd prefer to call python directly, python single_translate.py file_name.smt2 will have the same output as the executable. You may need to be careful with the python path, though, or put the Polya directory in the smtlib2polya directory. (The two are released separately for licensing reasons, sorry for the complication.)

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

3 participants