17 releases
Uses old Rust 2015
0.4.4 | Mar 16, 2021 |
---|---|
0.4.1 | Jul 15, 2020 |
0.3.10 | Jan 19, 2020 |
0.3.9 | Sep 30, 2019 |
0.3.0 | May 17, 2016 |
#608 in Math
3,454 downloads per month
Used in 21 crates
(4 directly)
82KB
2K
SLoC
boolean_expression: a small Rust crate for Boolean expressions and BDDs
This crate provides for the manipulation and evaluation of Boolean expressions and Binary Decision Diagrams (BDDs), the construction of BDDs from Boolean expressions, and the construction of Boolean expressions from BDDs (via a simple cubelist-based minimization algorithm). It also has a very simple identity-based Boolean expression simplifier, though the cubelist-based minimizer is more effective.
boolean_expression
is Copyright (c) 2016 by Chris Fallin <cfallin@c1f.net>
and is released under the MIT license. See LICENSE
for details.
Documentation: here
Crates.io: here
lib.rs
:
boolean_expression expression manipulation / BDD library
This crate provides for the manipulation and evaluation of Boolean expressions
and Binary Decision Diagrams (BDDs), and the construction of BDDs from Boolean
expressions. It can also simplify Boolean expressions via either a set of rules
such as DeMorgan's Law (see Expr::simplify_via_laws()
), or via a
roundtrip through a BDD
and a cubelist-based term reduction (see
Expr::simplify_via_bdd()
). The latter is more powerful, but also more
expensive.
The main pieces of interest are:
Expr
, an AST enum for expression simpleAND
/OR
/NOT
-based expressions.BDD
, a Binary Decision Diagram implementation.CubeList
, a low-level datatype with support for cubelist manipulation (used when convertingBDD
functions to expressions).
Dependencies
~530KB
~11K SLoC