To build and use this tool you'll need at least python3
, pyeda
and
espresso
installed. As this relies on third-party QBF-/SAT-solvers, additional
tools are needed.
The actual dependency versions are maintained in the easy to read default.nix
file. This is a NixOs shell-environment definition.
- python 3
- pyeda
- espresso
- depqbf (to use the QBF synth variant with
depqbf
) - rareqs (to use the QBF synth variant with
rareqs
) - bloqqer (as a QBF preprocessor with
rareqs
) - cryptominisat (as a possible SAT solver)
- minisat (as a possible SAT solver)
If you want to run the test suite,
hypothesis
is required.
The easiest way to install the python dependencies and use this tool is via a
virtualenv. Of course you'll need to
install python3
, virtualenv
and the selected QBF-/SAT-solver(s).
To setup the virtualenv
and install the bare minimum, execute the commands:
virtualenv .env
source .env/bin/activate
unset SOURCE_DATE_EPOCH # might be necessary
pip install pyeda
pip install hypothesis # for tests
If you want to use the PyMiniSolvers
or python-cryptominisat
bindings to
enable incremental solving with minisat
and cryptominisat
, you'll need to
install them:
If you have all the dependencies correctly installed, the easiest way to execute
the synthesizer is as follows. If in doubt, refer to lattice-synth --help
.
./lattice-synth.py --function 'a & b' # syntax as in PyEDA
cat > function.pla <<EOF
-1-0 1
-00- 1
0--- 1
EOF
./lattice-synth.py function.pla