1boolstuff(3) boolstuff(3)
2
3
4
6 boolstuff - Disjunctive Normal Form boolean expression C++ library
7
9 g++ prog.cpp -lboolstuff
10
12 boolstuff is a C++ library that contains an algorithm to convert a
13 boolean expression binary tree into the Disjunctive Normal Form. The
14 NOT operator is supported. A C API covers most of the library's func‐
15 tionality.
16
17 The Disjunctive Normal Form is an ORing of ANDed terms. In other
18 words, if the OR is considered an additive operation and the AND a mul‐
19 tiplicative operation, then the DNF is a sum of products.
20
21 For example, the DNF of the expression a&(b|c) is a&b|a&c
22
23 The DNF eliminates parentheses and provides a normalized form of the
24 original expression. This normalized form is easier to execute.
25
26 The DNF produced by BoolStuff is devoid of any "useless" terms, which
27 are always false (e.g., x&y&!x), but the terms that form the DNF are
28 not necessarily simplified (e.g., x&y&x). When executing an expression
29 in DNF, it is recommended to obtain the list of terms and then to
30 obtain the set of variables used in each term. In the case of the term
31 x&y&x, the set will only contain x once.
32
34 The library's source archive comes with an example program (in the
35 'examples' subdirectory) and with two testing programs (in the
36 src/boolstuff subdirectory).
37
39 This program is free software; you may redistribute it under the terms
40 of the GNU General Public License. This program has absolutely no war‐
41 ranty.
42
44 Pierre Sarrazin
45
46 See the BoolStuff Home Page:
47 http://sarrazip.com/dev/boolstuff.html
48
49 Comments are welcome.
50
52 Version 0.1.x is an unstable development version. The programming
53 interface of the library and the command-line options of the accompany‐
54 ing commands are not necessarily fixed. The documentation has not been
55 reviewed for completeness.
56
58 George Boole (1815-1864) is an English mathematician who helped estab‐
59 lish modern symbolic logic and whose algebra of logic, now called Bool‐
60 ean algebra, is basic to the design of digital computer circuits.
61
62
63
64 February 14th, 2010 boolstuff(3)