Performance issues about Z3 for Java

限于喜欢 提交于 2019-12-06 04:34:50
  1. Simplify performs simple algebraic simplifications. You can control its behavior in some cases. For example * distributes over +, but this can cause real overhead and one can turn off simplifications of this kind. Use z3 -pm:simplify from the command-line to inspect parameters. (on the other hand, Z3 will unlikely be able to solve the formulas where this simplification is too expensive).
  2. The "let-bindings" are supplied by the printer. Internally, terms are represented as directed acyclic graphs where nodes are shared. Printing a DAG as a tree can be extremely expensive (exponential in the worst case). So the printer introduces let expressions when it determines that this gives a shorter print-length.

The .NET and Java APIs use the garbage collector to manage lifetimes of terms. They get recycled at the discretion of the GC. For top performance you can manage reference counts on your own, but then you have to bypass the supported API. The released source code contains the JNI/pinvoke relevant to do this. Note that rolling your own low level API is a lot of work and the low level reference counting is also not as easy to program with as the supported API.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!