Requirements
A reasonable up-to-date computer, running Linux or Mac OS, YAP Prolog (6.2.0 or better).
Step 1: Obtain YAP Prolog
ProbLog is contained YAP Prolog since version 6.2.0. If you want to use the latest
features of ProbLog, you have to use the development version of
YAP. This is only available in source code and can be obtained by
cloning the git repository. To do so execute, on the command line
git clone git://yap.dcc.fc.up.pt/yap-6
For this command to work, you need to have the git package
installed.
In the following, we assume, that you downloaded yap into the folder
~/yap-6.
Also, you might want to install some extra packages which are not
vital for ProbLog to work, but which might be useful at some point:
sudo apt-get install libreadline6-dev sudo apt-get install libgmp3-dev sudo apt-get install g++ sudo apt-get install zlib1g-dev sudo apt-get install libncurses5-dev
Step 2: Download and compile CUDD
You need to download the CUDD package from here. In the
following, we assume, that you downloaded cudd into the folder
/home/foo/cudd-2.4.1.
Compile CUDD by executing on the command line
cd /home/foo/cudd make
Step 3a: Compile YAP (with superuser rights)
In case you do not have superuser rights on your machine (you can
not execute commands as root), go to Step 3b.
Excute the following commands (replace the folders if you downloaded
YAP or CUDD in different folders)
cd ~/yap-6 ./configure --with-cudd="/home/foo/cudd-2.4.1" --enable-tabling=yes make sudo make install
Afterwards, you can run YAP by calling yap.
Step 3b: Compile YAP (without superuser rights)
In this case you will install YAP locally in your home directory. Execute
cd ~/yap-6 ./configure --prefix=`pwd` --exec-prefix=`pwd` --with-cudd="/home/foo/cudd-2.4.1" --enable-tabling=yes make make install
Afterwards, you can run YAP by calling ~/yap-6/yap. In case you do not want to to type the full path to YAP all the time, add the directory ~/yap-6 to the PATH variable of your shell.
Step 3: Try it out
After compiling everything, go your ProbLog folder, start YAP and execute :-use_module(library(problog)),problog_help. The installation went ok if you see the list of all available options (for inference) followed by
... ------------------------------------------------------------ use problog_help/0 for information use problog_flags/0 to display current parameter values ------------------------------------------------------------ yes ?-
Now you are ready to try out the examples from the tutorial.
Experts with super user rights click here
wget http://dtai.cs.kuleuven.be/problog/files/cudd-2.4.1.tgz tar xvfz cudd-2.4.1.tgz cd cudd-2.4.1 make export CUDDPATH=$PWD cd .. git clone git://yap.dcc.fc.up.pt/yap-6 cd yap-6 ./configure --enable-tabling=yes --with-cudd="$CUDDPATH" export CUDDPATH= make sudo make install
Experts without super user rights click here
wget http://dtai.cs.kuleuven.be/problog/files/cudd-2.4.1.tgz tar xvfz cudd-2.4.1.tgz cd cudd-2.4.1 make export CUDDPATH=$PWD cd .. git clone git://yap.dcc.fc.up.pt/yap-6 cd yap-6 mkdir install cd install ../configure --enable-tabling=yes --with-cudd="$CUDDPATH" --prefix="$PWD" export CUDDPATH= make make install