APO – A Free Online Petri Net Editor
Tags: octograd2020
Published: 2020-05-20 09:56:24

Last year I did the course on [petri nets](https://en.wikipedia.org/wiki/Petri_net) at my home university in Oldenburg. With the help of petri nets algorithms, processes and complex systems (e.g. in industrial production or even chemistry) can be analysed and evaluated. The topic was quite interesting to me and the more types of nets and algorithms we got to know, the more I wondered why there is no good editor for these nets.

In fact the [research group for parallel systems](http://parsys.informatik.uni-oldenburg.de) in Oldenburg is developing a really powerful software called [APT](https://github.com/CvO-Theory/apt) (**A**nalysis of **P**etri Nets and **T**ransitions Systems) which is able to analyse huge nets at massive scale and supports hundreds of powerful algorithms. The software is openly [developed on GitHub](https://github.com/CvO-Theory/apt) under an MIT licence. APT is designed as a command line interface which makes sense when operating with these kind of nets with thousands of nodes. But for learning purposes, sometimes a nice user interface that lets you see your nets and makes it easy to interact with them has some true benefits. Therefore, I was surprised that no such tool existed.

![Synthesis of Petri Nets with APO](https://dev-to-uploads.s3.amazonaws.com/i/m24xzl9zlqoe4dzy2i95.png)

This got me to the idea to combine my interests in petri nets and the development of web apps for my bachelor thesis and to create an easy to use yet powerful online petri net editor that helps you to create and analyse petri nets and transition systems. Because it runs in your browser no installation is needed so you can quickly simulate different nets and run several algorithms on it. It even allows you to generate the coverability graph from petri nets and supports the synthesis of petri nets with specified properties from given transition systems. For further research on these nets import and export to APT allows you to use the whole range of algorithms provided by APT.

[Try APO (APT Online) here](https://apo.adrian-jagusch.de)

I named my project APO (for **AP**T **O**nline) and used [GitHub for developing and hosting](https://github.com/stromhalm/apo) as well. Usage instructions are available inside the app and instructions for further development (e.g. the implementation of new algorithms or other net types) can be found [on GitHub](https://github.com/stromhalm/apo). The App is written in [CoffeeScript](http://coffeescript.org) and uses AngularJS and Google’s Material Design. No active internet connection is needed for the creation and manipulation of nets (they also use the browser for continuous storage), but the algorithms used for minimisation, detection of properties (like liveness, homogenousness, boundedness, safeness, conflict freedom etc.), analysis and synthesis depend on APT which is written in Java. Therefore, I created an AngularJS Service called [APT Online](https://github.com/stromhalm/angular-apt) (as another project on GitHub) that comes with a REST interface to run these algorithms on the server.

As you may see when trying APO, I put a lot of effort in this app, but I also learned very much by developing it. Not only did I learn a new programming language with CoffeeScript, but also the design, testing and human computer interaction part were quite challenging. Therefore, I would love to hear from you, if you use APO for learning, demonstration purposes or even further development.