如何使用SMT-LIB2格式的z3py输出断言?我在文档中找不到任何提及。我找到了一个标志Z3_PRINT_SMTLIB_FULL
,但我不知道如何设置它。
答案 0 :(得分:1)
您可以使用sexpr()方法。 例如: http://rise4fun.com/Z3Py/9t
x, y = Reals('x y')
print (x + y * 3).sexpr()
有Python API的在线文档。 例如,sexpr()方法记录在:
http://research.microsoft.com/en-us/um/redmond/projects/z3/z3.html#ExprRef