File: booldnf.1

package info (click to toggle)
boolstuff 0.1.11-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,664 kB
  • ctags: 152
  • sloc: sh: 8,653; cpp: 1,435; makefile: 200; ansic: 162; perl: 106
file content (66 lines) | stat: -rw-r--r-- 2,351 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.\" $Id: booldnf.1,v 1.7 2006/02/05 03:26:11 sarrazip Exp $
.\" booldnf - Program to convert a boolean expression to the DNF
.\" boolstuff - Disjunctive Normal Form boolean expression library
.\" Copyright (C) 2002--2006 Pierre Sarrazin <http://sarrazip.com/>
.\"
.\" 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 booldnf "1" "February 4th, 2006" "" ""
.SH NAME
booldnf - converts a boolean expression to the DNF
.SH SYNOPSIS
.B echo 'a&(!b|c&!d)' | booldnf > result.txt
.SH DESCRIPTION
.PP
\fBbooldnf\fR
is a program that reads boolean expressions from its standard input
and rewrites them in
\fBDisjunctive Normal Form\fR
on its standard output.
It uses the BoolStuff library.
.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
Each expression must be on its own text line.  Variable names
must be composed only of ASCII letters and digits.
.PP
The AND operator is \fB&\fR,
the OR operator is \fB|\fR,
and
the NOT operator is \fB!\fR.
Parentheses are allowed.
.PP
The command flushes its output buffer after each result or error message,
to make sure that it can be used with bidirectional pipes.
Results and error messages always take exactly one text line.
.SH EXAMPLES
The command
.IP
.B echo 'a&(!b|c&!d)' | booldnf
.PP
should display
.IP
.B a&c&!d|a&!b
.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
See the boolstuff(3) manual page.
.SH BUGS
See the boolstuff(3) manual page.