APO is a web interface for APT, a powerful software for Petri net analysis and synthesis developed at the Carl von Ossietzky University in Oldenburg, Germany. Visit apo.adrian-jagusch.de in your browser to try it out!
APO currently supports two types of nets: Petri nets (PN) and (labeled) transition systems (LTS). At your first visit a sample Petri net is created for you. Use the tools in the toolbar to create places and transitions and combine them with the Arrows tool.
Then let APO calculate the properties of your net by using the Petri net analyzer in the menu bar! Is your net safe or bounded? What about its reversibility?
Now let's use APO to minimize a Petri net! First we create a net for mutual exclusion which is an often used example for the parallel features of Petri nets. See the first image below for what such a net could look like. You may use the Tokens tool to fire transitions and elucidate the net's behavior.
Then use the Coverability Graph module to generate the nets coverability graph. It will be created as a new transition system. Use the Fix Nodes tool to unravel the nodes.
Now let's synthesize a Petri net from this transition system which will have the same behavior but needs fewer nodes. Use APOs Synthesizer module and choose minimize as an option. Notice all the other options for net synthesis – you may combine them as you like.
Image 4 shows the result which has been created as a new Petri net in the sidebar. It has the same behavior as the often referenced example for mutual exclusion but due to its intelligent use of weighted edges it only has 9 nodes (instead of 13 in the old net).
APO is written in the CoffeeScipt programming language. It is maintained by Adrian Jagusch and was part of his bachelor thesis.
Before running, you must install and configure the following one-time dependencies:
$ npm install -g grunt-cli
- karma - For Windows machines, you may need to install karma globally. Use the terminal command below
$ npm install -g karma
Once the dependencies have been installed, enter the following commands in the terminal:
$ git clone https://github.com/stromhalm/apo.git
$ cd apo
$ npm install
Development with APO is simple. Just type
$ grunt
to compile all the CoffeeScipt files and start a local server running APO on your machine. Your default browser is opened automatically and Grunt will watch for file changes and refresh your browser.
For production environments there is a second compiling option. Grunt will compress HTML, JavaScript, CSS and concatenate them. Just run grunt prod
and you can find the compiled output in the dist
folder. All your other files will remain unchanged.
APO uses several frameworks and libraries:
- CoffeeScipt – A beautiful programming language for the web
- AngularJS – For a modern and dynamic MVC web application
- D3.js – For the physics simulation in your browser
- Angular Material – For beautiful design components based on Google's Material Design
- ngClassify – A set of AngularJS classes in CoffeeScript
- Less – For nice CSS code with variables and inheritance.
- GitHub – Here you are ;-)
- Angular APT – The APT interface for web applications
- CoffeeLint – For linting CoffeeScipt
- Jasmine – A JavaScript testing framework
- Karma – A JavaScript test runner with AngularJS in mind
- AngularFun – A good starting point for modern web development
- Netlify – Hosting and Continuous Deployment
If you find a bug in the source code or a mistake in the documentation, you can help by submitting an issue to the repository. Even better, you can submit a Pull Request with a fix.
Enhancements like new net types or analysis modules are always welcome! Feel free to contact me :)