Petriscript

PetriScript is a modeling language for Petri nets, designed by Alexandre Hamez and Xavier Renault. The CPN-AMI platform provides many tools to work on Petri nets, such as verifying and model-checking tools.

Originally, simple Petri nets were created through graphic design, but research conducted internally at LIP6 revealed that it was needed to automate such tasks. PetriScript was designed to provide some facilities in modeling places-transition and coloured Petri nets within the CPN-AMI platform. Petriscript's main purpose is to automate modeling operations on Petri nets by merging, creating, and connecting nodes. It supports almost everything needed, such as macros, loops control, lists, and string and arithmetic expressions, and blocks intervention of the user as much as possible. Its syntax is Ada-like.

The following script produces a FIFO with three sections:

Which produces the following graph:

Here is another example that shows the power of PetriScript:

Which produces the following graph: