Boolean expression solver/simplifier(布尔表达式求解器/简化器)
问题描述
我正在为非常大(但不复杂)的代数寻找布尔表达式求解器,例如: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.
这篇关于布尔表达式求解器/简化器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:布尔表达式求解器/简化器


基础教程推荐
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- 降序排序:Java Map 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01