Z3PY:如何将公式转换为NNF格式?
我想使用Z3PY将公式转换为其NNF格式。例如,
鉴于
Or(Not(And(i1, Not(And(i0, i4, i1, i2)))), And(i3, i1, i2))
我要
Or(Not(i1), And(i0, i4, i1, i2), And(i3, i1, i2))
谢谢
I wanted to convert a formula to its NNF format using z3py. For e.g.,
Given
Or(Not(And(i1, Not(And(i0, i4, i1, i2)))), And(i3, i1, i2))
I want
Or(Not(i1), And(i0, i4, i1, i2), And(i3, i1, i2))
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
nnf
策略,然后使用简化
:此打印:
结果是目标列表;但是单身目标与您的公式相同。 (一个目标可以将公式分为许多部分,因此可以输出列表。)
You can use the
nnf
tactic, followed bysimplify
:This prints:
the result is a list of goals; but a singleton goal is the same as your formula. (A goal can split a formula into many parts, and hence the list output.)