Which is better practice in SMT: to add multiple assertions or single and?

此生再无相见时 提交于 2019-12-24 05:04:33

问题


Lets say I have two clauses that I want to model in SMT, is it better to add them as separate assertions like

(assert (> x y))
(assert (< y 2))

or to add one assertion with and operator like this

(assert (and 
(> x y)
(< y 2)
))

Does this matter for large scale problems in terms of SMT solver performance. I am using Z3.


回答1:


The conjunction gets split into multiple assertions, so it doesn't really matter too much. If you introduce a large conjunction, Z3's parser will create a term that contains all the conjuncts, but this is just a constant overhead on top of maintaining the conjuncts.



来源:https://stackoverflow.com/questions/24711329/which-is-better-practice-in-smt-to-add-multiple-assertions-or-single-and

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