How to use the 2CL Software

Software

To generate the labelled graph of the possible interactions use the file ccl.jar (download).

To use the 2CL interpreter it is necessary to have a Java interpreter. Put in a directory the file ccl.jar, and the folder prolog that can be found in the archive 2cltools.zip. Then type the following command:

prompt> java -jar ccl.jar -h

The above command will print the list of the options that can be used and composed in order to make the 2CL interpreter produce different kinds of file.

In order to obtain the graph of all the executable paths, type the following command:

prompt> java -jar ccl.jar -a -f examples/example_directory/file.2cl

where

  • the option -f specifies the file that contains the example description according to the 2CL syntax;
  • the option -a specifies that we are interested in the production of the graph of the possible paths.

The above command produces the file file.dot in the directory examples/example_directory. This file is produced by the tuProlog engine, it is the output of the extended commitment machine.

In order to obtain an svg/png/pdf/eps/jpg image it is necessary to have the graphviz program installed, then, please use the option:

-T format

For example:

prompt> java -jar ccl.jar -a -T png -f examples/example_directory/file.2cl

The above command will produce a png file.