Getting Involved: Difference between revisions

Line 12: Line 12:
=== Running ProB from Prolog ===
=== Running ProB from Prolog ===


You first need to download and install [http://www.sics.se/isl/sicstuswww/site/index.html SICStus Prolog].
You first need to download and install [http://www.sics.se/isl/sicstuswww/site/index.html SICStus Prolog]. Evaluation licenses (30-days) are available.


You need the password to download SICStus then run <tt>sudo ./InstallSICStus</tt> and provide the site name, license code and expiration date. Be sure to add the SICStus binaries to your PATH.
You need the password to download SICStus then run <tt>sudo ./InstallSICStus</tt> and provide the site name, license code and expiration date. Be sure to add the SICStus binaries to your PATH.

Revision as of 14:39, 12 July 2014


The ProB Java Core and UI

see the README in our Github Repository


The Prolog Sources

If you want to contribute to the Prolog part of ProB, if you want to extend the ProB API, or need them as reference, you need the Prolog sources which can be downloaded from http://nightly.cobra.cs.uni-duesseldorf.de/source/. To compile the sources you need a SICStus Prolog licence.


Running ProB from Prolog

You first need to download and install SICStus Prolog. Evaluation licenses (30-days) are available.

You need the password to download SICStus then run sudo ./InstallSICStus and provide the site name, license code and expiration date. Be sure to add the SICStus binaries to your PATH.

Probably you should also install a recent Active Tcl distribution.

Now, you need the ProB Prolog sources. If you have access to our Gitlab server then the information is here: http://gitlab.cobra.cs.uni-duesseldorf.de/prob/prob_prolog.

Now, add the following to your .bash_login file (at least on Mac OS; supposing you cloned the Git repository into ~/git_root):

export PROBDIR=~/git_root/prob_prolog
export PROB_SOURCE_DIR=$PROBDIR/src
alias prob='cd $PROB_SOURCE_DIR; sicstus -Dprob_profile=true -l $PROB_SOURCE_DIR/prob_tcltk.pl --goal "go."'

Now, you can simply start ProB from the command-line and from source with prob.

To start the Unit Test REPL, add the following to your .bash_login file (at least on Mac OS):

alias test='cd $PROBDIR; rlwrap sicstus -Dprob_safe_mode=true -l $PROB_SOURCE_DIR/test_runner.pl --goal "test_repl."'

(It is recommended to install rlwrap so that you get a history of your commands. If you don't want to install rlwrap just remove it from the line above.)

Before using ProB for the first time from source you should build the extensions. The minimal extensions are counter and user_signal. You can build them using

cd extensions/counter
make
cd ../user_signal
make

You could also build all extensions at once by going to the top of the prob_prolog tree (i.e., the directory containing src and lib as sub-directories) and then type

make

On Mac you may have to add a symbolic link to gawk in order to build the ProZ fuzz extension:

sudo ln -s /usr/bin/awk /usr/bin/gawk

Now you can start the testing console using test. You can e.g. type the number of a unit test to run it, or a test category such as tickets to run all tests in that category.