Boolean expression solver/simplifier

最后都变了- 提交于 2019-12-04 02:56:10

问题


I am looking for an Boolean expression solver for very big (but not complex) algebra like: Boolsche Ausdrücke vereinfachen (Axiome) I would like to have some code (c++ or java [or libraries]) to simplify huge boolean expression. I haven´t found something. I just want to do some "simply" convertion like:

a && ~a -> 0

a || a && (b || c) -> a

But much longer. And I want to use symbolics (a, b, c1, d1..) not TRUE, FALSE, 0 or 1 at the moment. Thank you in advance.

Edit: If I write it my self, I could use Javaluator and evaluate. When I have: (adb+c) && d I would like to start with multiply out. Anyone an idea?


回答1:


My favorite tool for such tasks is Logic Friday 1. It is free for non-commercial use.

Logic Friday 1 accepts Boolean expressions as formula and as truth table. It includes compiled binaries of Berkeley tools Espresso and misII. The latter is being used for multi-level functions.

Another tool is bc2cnf. It reads a boolean expression (or a set of expressions) as a "circuit" and translates it to conjunctive normal form (CNF), basically a product of OR-expressions. bc2cnf applies some simplification rules during this translation. For expressions of modest size it would be an option to convert the CNF to disjunctive normal form (DNF) and use Espresso to get a minimized form.



来源:https://stackoverflow.com/questions/13546791/boolean-expression-solver-simplifier

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