Brought to you by the "it's not a title, it's an abstract"-foundation, today let's look at a continuation of my post from last Friday. The idea is that instead of "just" simulating the CPN model, we can attach ProM plugins that can monitor either places or transitions. Such monitors can collect information from the execution and use it, e.g., to generate more fine-grained logs or present information to the user. Simulation is gathered by notifying the plugin whenever a transition is executed or whenever a token is produced on a place. Additionally, plugins are able to modify the simulation of the model either by producing new tokens or by modifying the binding of the transition.
This kind of annotation can be used, e.g., to orchestrate ProM plugins by associating a ProM plugin with each transition and move values according to places. The association is done automatically by the tool by using heuristics such as the type of the values and the name of the transition.
In the video below, I present three simple examples of cosimulation, first by using the Log Transitions plugin, which logs the execution of specified transitions only. That is, Log Transitions is an example of a plugin that monitors transitions. Second, I show the Alert Channel Sink plugin, which displays all tokens produced on monitored places in the GUI. It is an example of a plugin that monitors places. Finally, I show the Hello World plugin which is mainly useful for testing and demonstration purposes. This plugin changes the binding of all string and integer variables, so that all string variables becomes bound to "Hello World!" and all integer variables become bound to 42.
After presenting the basics, I demonstrate the ProM Orchestrate plugin, which makes it possible to orchestrate the execution of ProM plugins. While the example in itself is interesting, its main purpose is to show the power of these simple annotation techniques. The ProM Orchestrate plugin is just a transition monitor and modifier, consists of only 250 lines of code (most of which is actually an implementation of the heuristics for automatically selecting plugins based on transitions and their surrounding places). I implemented the plugin this morning, starting from nothing and arriving at a complete implementation (sans a tiny bit of debugging) in 3 hours.
Without further ado, here is the demo. The video is in HD, so I suggest pressing the
Time person of the year 2006, Nobel Peace Prize winner 2012.
7 thoughts on “Cosimulating CPN models and ProM plugins and Application to ProM Orchestration”
I hope you are doing well,
Given an event log and some initial marking (in an external file, and not present in the CPN model), how is it possible to:
(1) Inject the CPN model with the given marking in an external file
(2) Run the CPN model exactly as indicated by the events in the log.
Greetings from Russia!
Unfortunately, there’s no automatic way to doing that. The CPN Tools homepage has (or at least used to have, I don’t know after the redesign) a page on loading the initial marking from a file.
There is no simple way to replay a log. I once wrote a response on the old CPN Tools mailing list on how it could be done, but that is probably lost to time. A more “modern” way would be to write an extension for replaying logs.
Funny that you should end up at HSE 🙂