| Crates.io | bex |
| lib.rs | bex |
| version | 0.3.0 |
| created_at | 2018-11-30 15:22:28.471563+00 |
| updated_at | 2025-02-17 04:39:23.664637+00 |
| description | A rust library for working with boolean expressions (syntax trees, decision diagrams, algebraic normal form, etc.) |
| homepage | |
| repository | https://github.com/tangentstorm/bex |
| max_upload_size | |
| id | 99387 |
| size | 924,499 |
Bex is a rust crate for working with binary (Boolean) expressions.
This crate lets you build a complicated abstract syntax tree (AST) by working with individual Bit structs, or vectors that act like integers.
You can also "solve" these AST structures by converting them into various canonical representations:
J and Bex vs Primorial 15 is about converting "simple" factoring problems into boolean expressions and solving them with bex.
It covers the large factoring problems in examples/solve/bdd-solve.rs and the smaller tests in src/solve.rs
BddBase:
reorder for arbitrary reorderingsreorder_by_force for the FORCE algorith, a fast (but not always as effective) alternative to variable siftingto_json and from_json to serialize and restore a set of nidsFun trait and NidFun struct, refining the idea of storing truth tables of up to 5 inputs in a NID.ASTBase::{apply,eval}naf.rs (a variation of ANF)FromStr and fmt::Display should now round-trip)For full changelog, see CHANGELOG.md.