简体   繁体   中英

How to generate a formula in SMTLIB2 format from z3 solver

I build the formula in z3 using the java API. However, I have some formula that are difficult to solve, and I want to investigate why. Therefore, I want to print the formula in SMTLIB2 format.

Is it possible to get that from a Solver object. Currently, what I can get is only an array of assertions. Thank you.

Yes, Solver.toString() does that. This should also include the variable/constant declarations if you are using the latest master; I think that part was added after the last release.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM