.\" $Id: boolstuff.3.in,v 1.2 2014/03/01 17:41:03 sarrazip Exp $ .\" boolstuff - Disjunctive Normal Form boolean expression library .\" Copyright (C) 2002-2014 Pierre Sarrazin .\" .\" This program is free software; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License .\" as published by the Free Software Foundation; either version 2 .\" of the License, or (at your option) any later version. .\" .\" This program is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with this program; if not, write to the Free Software .\" Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA .\" 02111-1307, USA. .\" .\" .TH boolstuff "3" "May 24th, 2016" "" "" .SH NAME boolstuff \- Disjunctive Normal Form boolean expression C++ library .SH SYNOPSIS .B g++ prog.cpp -lboolstuff .SH DESCRIPTION .PP \fBboolstuff\fR is a C++ library that contains an algorithm to convert a boolean expression binary tree into the Disjunctive Normal Form. The NOT operator is supported. A C API covers most of the library's functionality. .PP The Disjunctive Normal Form is an ORing of ANDed terms. In other words, if the OR is considered an additive operation and the AND a multiplicative operation, then the DNF is a sum of products. .PP For example, the DNF of the expression \fBa&(b|c)\fR is \fBa&b|a&c\fR .PP The DNF eliminates parentheses and provides a normalized form of the original expression. This normalized form is easier to execute. .PP The DNF produced by BoolStuff is devoid of any "useless" terms, which are always false (e.g., \fBx&y&!x\fR), but the terms that form the DNF are not necessarily simplified (e.g., \fBx&y&x\fR). When executing an expression in DNF, it is recommended to obtain the list of terms and then to obtain the set of variables used in each term. In the case of the term \fBx&y&x\fR, the set will only contain \fBx\fR once. .SH EXAMPLES The library's source archive comes with an example program (in the 'examples' subdirectory) and with two testing programs (in the src/boolstuff subdirectory). .SH LICENSE This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. .SH AUTHOR Pierre Sarrazin .PP See the BoolStuff Home Page: .br http://sarrazip.com/dev/boolstuff.html .PP Comments are welcome. .SH BUGS Version 0.1.x is an unstable development version. The programming interface of the library and the command-line options of the accompanying commands are not necessarily fixed. The documentation has not been reviewed for completeness. .SH HISTORY George Boole (1815-1864) is an English mathematician who helped establish modern symbolic logic and whose algebra of logic, now called Boolean algebra, is basic to the design of digital computer circuits.