Skip to content

Commit 4bb5429

Browse files
committed
Update README
1 parent 55b01cb commit 4bb5429

File tree

1 file changed

+40
-56
lines changed

1 file changed

+40
-56
lines changed

README.adoc

Lines changed: 40 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,20 @@
33
image:https://github.com/Lipen/bdd-rs/actions/workflows/ci.yml/badge.svg?branch=master["CI",link="https://github.com/Lipen/bdd-rs/actions"]
44
image:https://hitsofcode.com/github/Lipen/bdd-rs["Hits-of-Code",link="https://hitsofcode.com/view/github/Lipen/bdd-rs"]
55

6-
> A high-performance, safe, and manager-centric library for Binary Decision Diagrams (BDDs) in Rust.
7-
> BDDs are canonical data structures for representing and manipulating Boolean functions, widely used in formal verification, static analysis, symbolic model checking, and combinatorial optimization.
6+
> High-performance Binary Decision Diagrams (BDDs) library for Rust.
7+
> BDDs represent Boolean functions canonically, enabling efficient formal verification, static analysis, model checking, and optimization.
88

99
== Features
1010

11-
* *Manager-Centric Architecture*: All BDD operations go through the central `Bdd` manager, ensuring structural sharing (hash consing) and maintaining canonical form
12-
* *Safe & Efficient*: Lightweight `Ref` handles to reference nodes prevent invalid access while keeping memory overhead minimal
13-
* *Performance First*: Built-in operation caching (computed table) ensures redundant computations are avoided
14-
* *1-Based Variable Indexing*: Variables are 1-indexed (0 reserved for internal use), simplifying integration with standard formats like DIMACS
15-
* *Rich Boolean Operations*: Full support for AND, OR, XOR, NOT, ITE (if-then-else), implication, and equivalence
16-
* *Quantification*: Existential (∃) and universal (∀) quantification over variables
17-
* *Complement Edges*: Efficient negation through edge attributes without creating new nodes
18-
* *Variable Substitution*: Rename and substitute variables in Boolean formulas
19-
* *Satisfiability & Model Counting*: Check satisfiability, extract models, count solutions
20-
* *Visualization*: Export BDDs to Graphviz DOT format for visualization
11+
* *Manager-Centric*: All operations through central `Bdd` manager with hash consing
12+
* *Safe & Efficient*: Lightweight `Ref` handles with minimal overhead
13+
* *Operation Caching*: Computed table avoids redundant operations
14+
* *1-Based Variables*: Simplifies integration with DIMACS and similar formats
15+
* *Boolean Operations*: AND, OR, XOR, NOT, ITE, implication, equivalence
16+
* *Quantification*: Existential (∃) and universal (∀) over variables
17+
* *Complement Edges*: Efficient negation via edge attributes
18+
* *SAT & Model Counting*: Satisfiability checking, model extraction, solution counting
19+
* *Visualization*: Graphviz DOT export
2120

2221
== Installation
2322

@@ -98,15 +97,15 @@ assert!(bdd.is_one(result));
9897

9998
== Case Studies & Examples
10099

101-
This repository includes comprehensive examples demonstrating BDD applications in formal methods:
100+
Comprehensive examples demonstrating BDD applications:
102101

103102
=== Abstract Interpretation
104103

105104
See link:examples/abstract-interpretation/[`examples/abstract-interpretation/`]
106105

107-
A complete framework for static program analysis combining abstract interpretation with BDDs for path-sensitive analysis.
106+
Static program analysis framework combining abstract interpretation with BDDs.
108107

109-
*Detailed Examples*:
108+
*Examples*:
110109

111110
* *Numeric Analysis*: Sign domain, constant propagation, interval analysis, congruence domain
112111
* *Fixpoint Computation*: Loop analysis with widening/narrowing
@@ -119,13 +118,11 @@ A complete framework for static program analysis combining abstract interpretati
119118

120119
*Tests*: Comprehensive unit and integration tests for all domains
121120

122-
*Companion Guide*: link:examples/abstract-interpretation/guide/[`guide/`]
123-
124-
150+ page tutorial covering theory and implementation:
121+
*Companion Guide*: link:examples/abstract-interpretation/guide/[`guide/`] (150+ pages)
125122

126123
* Part I: Gentle Introduction
127-
* Part II: Deep Dive into lattice theory, fixpoints, and domain design
128-
* Part III: Applications and case studies
124+
* Part II: Lattice theory, fixpoints, domain design
125+
* Part III: Applications
129126

130127
[source,bash]
131128
----
@@ -139,17 +136,13 @@ cargo test # Run 80+ tests
139136

140137
See link:examples/model-checking/[`examples/model-checking/`]
141138

142-
BDD-based symbolic model checking implementing classic algorithms from _"Symbolic Model Checking: 10^20 States and Beyond"_ (Burch et al., 1990).
139+
Symbolic model checking implementing algorithms from Burch et al. (1990).
143140

144141
*Features*:
145142

146-
* Symbolic representation of Kripke structures
147-
* Forward/backward reachability via image/preimage computation
148-
* Full CTL (Computation Tree Logic) support: EX, AX, EF, AF, EG, AG, EU, AU
149-
* Fixpoint-based algorithms handling millions to billions of states
150-
* Efficient symbolic state space exploration
151-
152-
*Tests*: All CTL operators and transition system operations verified
143+
* Kripke structures with image/preimage computation
144+
* Full CTL support: EX, AX, EF, AF, EG, AG, EU, AU
145+
* Fixpoint algorithms for millions to billions of states
153146

154147
[source,bash]
155148
----
@@ -162,17 +155,16 @@ cargo run --bin modelcheck -- example toggle
162155

163156
See link:examples/symbolic-execution/[`examples/symbolic-execution/`]
164157

165-
Symbolic execution engine for boolean imperative programs with BDD-based constraint solving.
158+
Symbolic execution for boolean programs with BDD constraint solving.
166159

167160
*Features*:
168161

169-
* Path-sensitive symbolic state tracking
170-
* Automatic counterexample generation from assertion failures
171-
* Loop handling with bounded unrolling
162+
* Path-sensitive state tracking
163+
* Counterexample generation from assertion failures
164+
* Bounded loop unrolling
172165
* Exception handling (try/catch/finally)
173-
* Test case generation from failing assertions
174166

175-
*Built-in Examples*: Simple programs, branching logic, XOR properties, mutex verification, loops
167+
*Examples*: Branching, XOR properties, mutex verification, loops
176168

177169
[source,bash]
178170
----
@@ -189,19 +181,16 @@ cargo run --bin symexec -- example buggy # See counterexamples!
189181

190182
== Documentation
191183

192-
* *API Documentation*: Run `cargo doc --open` for detailed API reference
193-
* *Abstract Interpretation Guide*: 150-page tutorial in link:examples/abstract-interpretation/guide/[`examples/abstract-interpretation/guide/`]
194-
* *Example READMEs*: Each example directory contains detailed documentation:
195-
** link:examples/abstract-interpretation/README.md[Abstract Interpretation README]
196-
** link:examples/model-checking/README.md[Model Checking README]
197-
** link:examples/symbolic-execution/README.md[Symbolic Execution README]
184+
* *API*: `cargo doc --open`
185+
* *Guide*: link:examples/abstract-interpretation/guide/[150-page tutorial]
186+
* *Examples*: link:examples/abstract-interpretation/README.md[Abstract Interpretation], link:examples/model-checking/README.md[Model Checking], link:examples/symbolic-execution/README.md[Symbolic Execution]
198187

199-
== Performance Notes
188+
== Performance
200189

201-
* *Release Mode*: BDD operations are exponentially faster with optimizations. Always use `cargo build --release` for production
202-
* *Variable Ordering*: BDD size is critically dependent on variable ordering. Poor ordering can lead to exponential blowup
203-
* *Garbage Collection*: Call `collect_garbage()` periodically to reclaim unused nodes
204-
* *Caching*: Operation cache significantly improves performance for repeated operations
190+
* *Release Mode*: Always use `--release` for production (exponentially faster)
191+
* *Variable Ordering*: Critical for BDD size; poor ordering causes exponential blowup
192+
* *Garbage Collection*: Call `collect_garbage()` periodically
193+
* *Caching*: Operation cache improves repeated operations
205194

206195
== Architecture
207196

@@ -219,13 +208,13 @@ cargo run --bin symexec -- example buggy # See counterexamples!
219208
* link:src/dot.rs[`dot.rs`] -- Graphviz visualization
220209
* link:src/utils.rs[`utils.rs`] -- Utility functions
221210

222-
=== Key Design Decisions
211+
=== Design Decisions
223212

224-
* *Manager-Centric*: All operations go through `Bdd` manager (no standalone node operations)
225-
* *Complement Edges*: Only low edges can be negated, high edges are never complemented
226-
* *1-Based Variables*: Variables start at 1 (0 reserved for internal use)
227-
* *Canonical Representation*: Each Boolean function has unique BDD representation
228-
* *Hash Consing*: Automatic deduplication ensures memory efficiency
213+
* *Manager-Centric*: All operations through `Bdd` manager
214+
* *Complement Edges*: Only low edges negated, high edges never complemented
215+
* *1-Based Variables*: Start at 1 (0 reserved internally)
216+
* *Canonical Form*: Unique representation per Boolean function
217+
* *Hash Consing*: Automatic deduplication
229218

230219
== Testing
231220

@@ -263,8 +252,3 @@ Contributions are welcome! Areas for improvement:
263252
== License
264253

265254
This crate is licensed under the link:LICENSE[MIT License].
266-
267-
== Acknowledgments
268-
269-
This implementation builds on decades of research in BDDs and formal methods.
270-
Special thanks to Randal Bryant for introducing BDDs, and to the symbolic model checking and abstract interpretation communities.

0 commit comments

Comments
 (0)