How to hide variable with Z3

十年热恋 提交于 2019-12-10 14:49:36

问题


Say I have

t1<x and x<t2

is it possible to hide variable x so that t1<t2 in Z3?


回答1:


You can use quantifier elimination for doing that. Here is an example:

(declare-const t1 Int)
(declare-const t2 Int)

(elim-quantifiers (exists ((x Int)) (and (< t1 x) (< x t2))))

You can try this example online at: http://rise4fun.com/Z3/kp0X




回答2:


Possible solution using Redlog of Reduce:



来源:https://stackoverflow.com/questions/11625388/how-to-hide-variable-with-z3

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