Cunf: An Unfolder for Contextual Nets
Cunf is a set of research tools to carrying out unfolding-based formal verification of Petri nets extended with read arcs, also called contextual nets, or c-nets. The package specifically contains the tools:
cunf: constructs the unfolding of a c-net;
cna: performs reachability and deadlock analysis using unfoldings constructed by cunf;
- Scripts such as
grml2pepto do format conversion between various Petri net formats, unfolding formats, etc.
ptnet: a small Python module (see scripts/ptnet/) suitable to programmatically generate and manage Petri net models.
cna you will need to have the
minisat SAT solver in the
(download it here). Compiling the source code will
make and a C/C++11-compatible compiler. Building the
From Precompiled Binaries (includes examples)
Please check the latest release to find a
.tar.gz file with precompiled
binaries (currently only available for Linux x86_64).
- Download the
.tar.gzfile and uncompress it.
- All binaries are in the
bin/, you can directly invoke them from there.
- You may move the
cunfbinary elsewhere in your system, but do not move the
cnabinary as it locates a necessary Python package using a relative path from the
From Source Code
Please note that development takes place in the
master branch of this
repository. If you want a stable version of the tool you should download and
compile the sources of the latest release available.
Download and uncompress the source code (in this case for Cunf v1.6.1):
wget https://github.com/cesaro/cunf/archive/v1.6.1.zip unzip cunf-1.6.1.zip cd cunf-1.6.1
Compile the source code:
make all make dist
This will put all binaries and libraries into the
dist/folder, from where you may directly run them or copy them to suitable locations in your machine.
In particular, make available to Python the module in:
by copying it to any folder pointed by your installation-dependent default module search path, or any folder pointed by the environment variable
PYTHONPATH. The tool
cnaand other Python scripts won't work without this step.
The Cunf user's manual (available with the latest release) contains all documentation available, including a guided tutorial of the tool.
Cunf implements the contextual net unfolding algorithm proposed by Baldan et al. in [BCKS08]. The algorithms and data structures actually implemented have been partially described in [RSB11], [BBCKRS12]. Cunf can only unfold 1-safe c-nets (i.e., no reachable marking puts more than one token on every place), and for the time being the tool will blindly assume the input is 1-safe.
Cna, whose name stands for Contextual Net Analyzer, checks for place coverability or deadlock-freedom of a c-net by examining its unfolding. The tool reduces these problems to the satisfiability of a propositional formula that it generates out of the unfolding, and uses Minisat as a back-end to solve the formula. The algorithms used by Cna has been described in [RS12].
|[BBCKRS12]||Paolo Baldan, Alessandro Bruni, Andrea Corradini, Barbara König, César Rodríguez, and Stefan Schwoon. Efficient Unfolding of Contextual Petri Nets. Theoretical Computer Science 449, 2 – 22 (2012).|
|[BCKS08]||Paolo Baldan, Andrea Corradini, Barbara König, and Stefan Schwoon. McMillan's Complete Prefix for Contextual Nets. In Transactions on Petri Nets and Other Models of Concurrency I, p. 199-220, 2008. Springer-Verlag.|
|[RSB11]||César Rodríguez, Stefan Schwoon, and Paolo Baldan. Efficient contextual unfolding. In Proc. of CONCUR'11, volume 6901 of LNCS. Springer, 2011.|
|[RS12]||César Rodríguez and Stefan Schwoon. Verification of Petri Nets with Read Arcs. In Proc. of CONCUR'12, vol. 7454 of LNCS, pages 471–485, September 2012.|
- Stefan Schwoon's Mole unfolder.
- Victor Khomenko's Punf unfolder.
- The PEP homepage.
- DPU, an unfolder for multithreaded C programs.
Author and Contact
The Cunf Tool is developed and maintained by César Rodríguez. Please feel free to contact me with questions or to send feedback.