Content
Installation¶
Pint is distributed as binaries for Ubuntu/Debian and Mac OS X. A docker image which contains all dependencies and the Jupyter notebook is also available.
Binaries¶
Ubuntu/Debian: pint_2019-05-24_amd64.deb.
Static binaries for Linux 64bits: pint_2019-05-24_linux-x86_64.txz, then read the README file to complete the installation.
Mac OS X: pint-2019-05-24.dmg, then read the README file to complete the installation.
Conda package¶
Pint can be installed on GNU/Linux using Conda with the colomoto channel:
conda install -c colomoto pint
Docker¶
Docker is the easiest way to use Pint with the Jupyter notebook interface on GNU/Linux, macOS, and Microsoft Windows. Pint is integrated in the CoLoMoTo Interactive Notebook available as Docker image colomoto/colomoto-docker.
See CoLoMoTo Docker quick usage guide for installation and usage.
Python/notebook interface¶
The pypint
module requires Python 3. It can be installed and upgraded with the pip
command line as follows:
pip3 install -U pypint
If you are interested in the IPython notebook web interface, see Jupyter documentation for installation and usage. Essentially you need to install the jupyter python module (pip3 install jupyter
) and then run jupyter-notebook
.
Tutorial¶
The code examples in this documentation assume that the pypint
module has been loaded as follows:
[1]:
import pypint
Command line usage¶
Instead of using the python API, one can invoke directly the Pint command line tools:
Model input / output
pint-export
– Automata network transformations and exportationpint-import
– Conversion to Pint .an format (requires the pypint python package)
Analysis tools
pint-reach
– Static analysis of reachabilitypint-stable
– Stable states listingpint-sg
– State graph analysispint-lcg
– Local Causality Graph computation
Interface with model-checkers
pint-mole
– Model-checking with mole
Miscellaneous commands
pint-confg
– Pint installation informationspint_install_deps
– Script to install third-party dependenciespint
– Pint+OCaml interactive toplevelpintc
– Pint+OCaml native-code compiler
Note that all these command take as input a model in the Pint native format (.an
). You may need to use python API to convert model from other formats.
All these commands come with a --help
option which display the full usage of it.
Another source of documentation is the debug mode of pint python module (enable_dbg()
) which displays the executed command lines.
OCaml API¶
All functions implemented in Pint are available through an OCaml library that can be embedded in other OCaml programs. The library is compiled by executing make libpint
in the source directory and is named pint.cmxa
.
pintc file.ml
can be used as a shortcut to compile OCaml code against the pint library.
pint
is an OCaml interactive toplevel embedding the Pint modules.