Automatic code generation based on Coloured Petri Net (CPN) models is challenging because CPNs allow for the construction of abstract models that intermix control flow and data processing, making translation into conventional programming constructs difficult. We introduce Process-Partitioned CPNs (PP-CPNs) which is a subclass of CPNs equipped with an explicit separation of process control flow, message passing, and access to shared and local data. We show how PP-CPNs caters for a four phase structure-based automatic code generation process directed by the control flow of processes. The viability of our approach is demonstrated by applying it to automatically generate an Erlang implementation of the Dynamic MANET On-demand (DYMO) routing protocol specified by the Internet Engineering Task Force (IETF).
|Title of host publication||Formal Methods for Industrial Critical Systems (15th International Workshop, FMICS 2010, Antwerp, Belgium, September 20-21, 2010. Proceedings)|
|Editors||S. Kowalewski, M. Roveri|
|Place of Publication||Berlin|
|Publication status||Published - 2010|
|Name||Lecture Notes in Computer Science|
Kristensen, L. M., & Westergaard, M. (2010). Automatic structure-based code generation from coloured Petri nets: A proof of concept. In S. Kowalewski, & M. Roveri (Eds.), Formal Methods for Industrial Critical Systems (15th International Workshop, FMICS 2010, Antwerp, Belgium, September 20-21, 2010. Proceedings) (pp. 215-230). (Lecture Notes in Computer Science; Vol. 6371). Springer. https://doi.org/10.1007/978-3-642-15898-8_14