Code Monkey home page Code Monkey logo

ecofolder's Introduction

Ecofolder - A program to unfold Petri nets with resets

General info

Ecofolder is a software for unfolding Petri nets, its architecture is quite similar to Mole - A Petri Net Unfolder. It provides a data structure for a net's unfolding and a way to visualize it in a .pdf file using the DOT language. Ecofolder aims to deliver means for analyzing ecosystem dynamics in nature, but its usage is not restricted to those particular systems.

Installation

Typing make in the directory with the sources should do the trick. You can place the resulting executable in whichever directory you want.

You can run and see one of the examples as follows:

./ecofolder examples/termites_pr_eg.ll_net
./mci2dot examples/termites_pr_eg.mci > examples/termites_pr_eg.dot
dot -T pdf < examples/termites_pr_eg.dot > examples/termites_pr_eg.pdf
evince termites_pr_eg.pdf

Overview

This program implements the Esparza/Römer/Vogler unfolding algorithm for low-level Petri nets (see ERV02). It is designed to be compatible with the tools in the PEP project STE01 and with the Model-Checking Kit SSE03 . Its input is a low level Petri net in PEP's .ll_net format, and its output is the resulting unfolding in the .mci format also used in the PEP tools.

Quick Start

Calling Ecofolder without any argument yields a usage summary. Currently, there are just four options:

-m <some.filename> Normally, if the input net is some.ll_net, then the resulting unfolding will be written to some.mci. This option allows the result to be written to some other file.

-d <some.number> Unfolding is performed up to the given depth, i.e. the generated prefix contains all events whose local configuration size does not exceed some.number. No cutoff events will be generated.

-T <some_transition_name> The unfolding process will abort as soon as an event is found which is related to the named transition.

-i The program outputs verbose information about the discovered events and conditions and allows the user to choose among the potential extensions. (Cutoffs are added immediately without asking because adding them at any other time would not change the result.)

The distribution contains an additional utility called mci2dot. The input of this tool is an .mci file (as produced by ecofolder), and its output can be processed by the DOT language in order to visualise the unfolding. Calling

mci2dot some.mci

will cause mci2dot to read the file some.mci and print the results to standard output.

Representing a net in ll_net format

.ll_net format example

PEP 
PetriBox
FORMAT_N2
PL 
"p1"M1
"p2"
"p3"
TR
"r1"
"r2"
TP
1<2
2<3
PT
1>1
RS
2>2

Explanation:

# Header
PEP 
PetriBox
FORMAT_N2
# Tag for places, a M1 at the end of each place name is added to point out is marked for the initial marking.
PL
"place_name"M1 
...
# Tag for transitions
TR
"transition_name"
...
# Tag for arcs going from transitions to places that produce. It should be interpreted as the first transition produces a token in the second place, i.e., first_transition < second_place.
TP
1<2
...
### Tag for arcs going from places to transitions that consume. It should be interpreted as the first transition consumes a token in the first place, i.e., first_place > first_transition.
PT
1>1
...
### Tag for arcs going from places to transitions that reset. It should be interpreted as the second transition resets all tokens (if any) in the second place, i.e., second_place > second_transition.
RS
2>2
...

History

Previous versions of Ecofolder are Mole - A Petri Net Unfolder. Ecofolder uses several contributions to the scope of unfoldings from different authors:

César Rodríguez: mci2sat.c
Thomas Chatain, Stefan Haar, Loïg Jezequel, Loïc Paulevé, and Stefan Schowoon: allfinals.pl, attractors.py CHJPS14
Stefan Römer, Stefan Schwoon: main core of the unfolding algorithm.

References

Related publications:

[ERV02] Javier Esparza, Stefan Römer, and Walter Vogler. An improvement of McMillan's unfolding algorithm. Formal Methods in System Design, 20:285-310, 2002.

[SSE03] Claus Schröter, Stefan Schwoon, and Javier Esparza. The Model-Checking Kit. In Wil van der Aalst and Eike Best, editors, Applications and Theory of Petri Nets 2003, volume 2679 of Lecture Notes in Computer Science, pages 463-472. Springer, June 2003. doi: https://doi.org/10.1007/3-540-44919-1_29

[STE01] C. Stehno. PEP Version 2.0. Tool demonstration ICATPN 2001. Newcastle upon Tyne 2001.

[CHJPS14] Thomas Chatain, Stefan Haar, Loïg Jezequel, Loïc Paulevé, and Stefan Schwoon. Characterization of reachable attractors using Petri net unfoldings. In Pedro Mendes, Joseph Dada, and Kieran Smallbone, editors, Computational Methods in Systems Biology, volume 8859 of Lecture Notes in Computer Science, pages 129–142. Springer Berlin Heidelberg, Cham, 2014. doi: http://dx.doi.org/10.1007/978-3-319-12982-2_10

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see licenses.

ecofolder's People

Contributors

giannkas avatar fpom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.