DistributedPetriNets

module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2021 License: Apache-2.0

README

Distributed Petri Nets

Distributed Petri nets consists of an implementation of Petri nets in which arcs may cross the boundaries of a node --that is, places and transitions of the net may reside in different nodes. The objective of this implementation is to use the Petri nets formalism to analize ad hoc systems, and prove distribution properties (e.g., deadlocks, liveliness, reachabillity) about them.

Getting Started

Go

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You will need to have Go on your machine. To get started with Go click here. File go.mod contains all the necessary libraries and requires to have the environment variable GO111MODULE set to "on".

Installing and running

The code is contained in a docker container

docker build -t dpn .

docker run -i -t --network host -v "$(pwd)":/go/src/github.com/FLAGlab/DistributedPetriNets dpn

You can run the code by going to the go/src/github.com/FLAGlab/DistributedPetriNets and then running the main using the command go run main.go

Running the tests

All tests can be run using go test ./...

Directories

Path Synopsis
dpn
cmd
Package petrinet where: P => places T => transitions F subset of (P X T) U (T X P) => arcs F0 subset of (P X T) => inhibitor arcs W: F -> {1,2,3,...} => weights of arcs W0: F0 -> {1,2,3,...} => weights of inhibitor arcs M_0: P -> {0, 1, 2, 3, ...} => Initial marking { P: Number => 1...P places T: Number => 1...T transitions Fpt: [{p: Number, t: Number, w: Number}] => Arcs from P to T list Ftp: [{p: Number, t: Number, w: Number}] => Arcs from T to P list Inhibitors: [{p: Number, t: Number, w: Number}] => Inhibitor Arcs from P to T list M: [{p: Number, m: Number}] => Initial marking list, } eg.
Package petrinet where: P => places T => transitions F subset of (P X T) U (T X P) => arcs F0 subset of (P X T) => inhibitor arcs W: F -> {1,2,3,...} => weights of arcs W0: F0 -> {1,2,3,...} => weights of inhibitor arcs M_0: P -> {0, 1, 2, 3, ...} => Initial marking { P: Number => 1...P places T: Number => 1...T transitions Fpt: [{p: Number, t: Number, w: Number}] => Arcs from P to T list Ftp: [{p: Number, t: Number, w: Number}] => Arcs from T to P list Inhibitors: [{p: Number, t: Number, w: Number}] => Inhibitor Arcs from P to T list M: [{p: Number, m: Number}] => Initial marking list, } eg.
tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL