布尔表达式求解器/简化器 [英] Boolean expression solver/simplifier

查看:67
本文介绍了布尔表达式求解器/简化器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为非常大(但不复杂)的代数寻找布尔表达式求解器,例如:Boolsche Ausdrücke vereinfachen (Axiome)我想要一些代码(c++ 或 java [或库])来简化巨大的布尔表达式.我还没有发现什么.我只想做一些简单"的转换,比如:

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

但要长得多.我现在想使用符号(a、b、c1、d1..)而不是 TRUE、FALSE、0 或 1.提前谢谢你.

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.

如果我自己编写,我可以使用 Javaluator 并进行评估.当我有: (adb+c) &&d 我想从乘法开始.有人有想法吗?

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?

推荐答案

我最喜欢处理此类任务的工具是 Logic Friday 1.非商业用途免费.

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

Logic Friday 1 接受布尔表达式作为公式和真值表.它包括 Berkeley 工具 Espresso 和 misII 的编译二进制文件.后者用于多级功能.

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.

另一个工具是 bc2cnf.它将布尔表达式(或一组表达式)读取为电路"并将其转换为 连接范式 (CNF),基本上是 OR 表达式的产物.bc2cnf 在此翻译过程中应用了一些简化规则.对于中等大小的表达式,可以选择将 CNF 转换为 析取范式 (DNF) 并使用 Espresso 来获得最小化的形式.

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.

这篇关于布尔表达式求解器/简化器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆