Lp2pb is a translation tool that translates ground ASP (lparse smodels) to PB-constraints (.OPB).
The translator consists of multiple c++ files. Install 'make' and call it inside the root folder.
make
This tool makes use of 3 other tools to translate its input; lp2sat, lp2lp and lp2normal.
The executables for these should be in your PATH.
By calling:
make path
the latest versions (at the moment) are added to your ~/bin folder.
Make sure this folder is included in your PATH variable.
export PATH=~/bin:$PATH
OR add following line to ~/.bashrc:
export PATH="/home/$USER/bin:$PATH"
and restart your terminal or call:
source ~/.bashrc
If you would want another version for any of these tools you can put them in your PATH yourself using the correct names:
- lp2lp2
- lp2normal
- lp2sat
The translator expects smodels input, see Appendix B here.
To run the application:
./lp2pb <-i inputfile> <-o outputfile>
Input and output files are optional, if not provided standard input and output is used.
W. De Wulf, B. Bogaerts. LP2PB: Translating Answer Set Programs into Pseudo-Boolean Theories. ICLP Technical Communications 2020: 206-219