- Windows XP or newer
- Microsoft Visual C++ 2008 Redistributable Package (x86)

**Supported input formats:** PLA (only the on-set is used), pseudo-VHDL and DIMACS (cnf only)

**Supported output formats:** PLA, BLIF, VHDL, pseudo-VHDL and DIMACS (cnf only)

Program can be run either interactively or non-interactively, non-interactive usage can by invoked by entering all three input parameters, otherwise interactive usage is invoked.

`booltool [input] [output] [script]`

If name of the input file contains string *.pla* or *.vhdl* the file type is recognized automatically

This way of usage enables performing any script given as parameter and save the result in a PLA format, the script itself contains expressions which determine operations between functions that are supposed to be done.

Syntax of the script is the same as in the VHDL format - commands must be in format
`id <= V;`

where *id* denotes the name of output variable and *V* denotes any Boolean expression.
Multiple output functions can be created this way.

*Example of a script:*
```
```

y4 <= (0 or 1) and 3;

y5 <= 2 xor 3;

y6 <= 4 nand 5;

This script would create new output variables y4, y5 and y6
and would substitute the numbers by functions on positions (in the input file) corresponding to the nubmers
(output variable names can also be used instead of numbers).

Results of the operation are saved automatically.

It is not possible to refer to functions that haven't been defined yet, if user does this a warning is displayed.

Note: Input and output variables are numbered from zero

Let us have the following PLA file as an input (source.pla):

```
```

.i 4

.o 3

.ilb a b c d

.ob x y z

00-- 100

1-11 100

-11- 010

1--- 001

-10- 001

Such a PLA describes the following set of functions:

*
x = a'b' + acd
y = bc
z = a + bc'
*

Next, the following script (script.vhd):

```
```

u <= x and y;

v <= x or y;

w <= (y xor z) and x;

not_u <= not u;

By running the command:

`BoolTool source.pla out.pla script.vhd`

,the following PLA (out.pla) is obtained:

```
```

.i 4

.o 4

.ilb a b c d

.ob u v w not_u

.p 9

# literals: 19

1111 1000

00-- 0100

-11- 0100

1-11 0100

1011 0010

0--- 0001

-0-- 0001

--0- 0001

---0 0001

`u <= 0 and 1;`

).**Negation**- negates the entire input**And-Or-Not form**- transforms the entire input into form containing only and, or, not operators**CNF**- converts input into CNF (automatically minimizes the result)**DNF**- converts input into DNF (automatically minimizes the result)**Satisfiability test**- runs satisfiability test (produces exact solution)**Nand form**- transforms input into form containing only Nand nodes**Nor form**- transforms input into form containing only Nor nodes**Add function**- adds a new function by combining input functions**Save as PLA**- saves results in PLA format**Save as VHDL**- saves results in VDHL format**Save as BLIF**- saves results in BLIF format**Save as DIMACS**- saves results in DIMACS format**Disable/enable absorption**- disables/enables absorption (enabled by default)**Compute cofactor**- computes cofactor of a function against the selected variable**Exit**- exits program

When performing the operation *add function* it is necessary to enter the input string in form
`id <= V;`

where *id* denotes the name of output variable and *V* denotes any Boolean expression.

*example of usage:* `y4 <= (0 and 1) xor (2 or 3);`

By entering this string a new output variable *y4* would be created and numbers 0,1,2,3 would be substituted by functions
on positions corresponding to the numbers.

When saving the results is it necessary to choose if all functions or only those newly added have to be saved.