简体   繁体   English

通过z3 python API和直接从可执行文件调用smtlib2求解器时的输出差异?

[英]Difference in output when smtlib2 solver is invoked through z3 python api and directly from executable?

I am working with z3 python api. 我正在使用z3 python API。 When I solve constraints using z3 python api then the solver runs infinitely and no errors are thrown. 当我使用z3 python api解决约束时,求解器将无限运行,并且不会引发任何错误。 But, when same constraints are dumped in the form of smtlib2 format and then are solved via z3 executable, it almost instantaneously gives sat or unsat. 但是,当相同的约束以smtlib2格式的形式转储,然后通过z3可执行文件解决时,它几乎立即给出坐姿或坐姿。 The smtlib2 dump is very large (around 1000 lines). smtlib2转储非常大(大约1000行)。 Although for small number of constraints, z3 api works fine. 尽管对于少数约束,z3 api可以正常工作。 Is there a bug in z3 python api for handling large number of constraints? z3 python API中是否存在用于处理大量约束的错误?

This can happen, eg, when the configuration between the two methods differs (even slightly), or when when the problems aren't exactly identical (eg different order of constraints). 例如,当两种方法之间的配置不同(甚至略有不同)时,或者当问题不完全相同时(例如约束顺序不同),就可能发生这种情况。 Some tactics are also non-deterministic (eg they use timers in the preprocessing) and the executable happens to be a bit faster/slower. 一些策略也不是确定性的(例如,它们在预处理中使用计时器),并且可执行文件碰巧快一点/慢一点。 To diagnose what exactly causes the difference we would need to see some of your problems, or at the very least some diagnostic output, for instance, add -v:10 on the command line and set the global "verbosity" option to 10. 要诊断到底是什么造成了差异,我们需要查看您的一些问题,或者至少要提供一些诊断输出,例如,在命令行上添加-v:10并将全局“ verbosity”选项设置为10。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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