Automatic Structure-Based Code Generation from Coloured Petri Nets: A Proof of Concept

  • Conference paper
Formal Methods for Industrial Critical Systems (FMICS 2010)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 6371))

Abstract

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).

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (Canada)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (Canada)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free ship** worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Chakeres, I.D., Perkins, C.E.: Dynamic MANET On-demand (DYMO) Routing, version 14, Internet-Draft. Work in Progress (June 2008)

    Google Scholar 

  2. CPN Tools webpage, http://www.cs.au.dk/CPNTools/

  3. The Erlang programming language, http://www.erlang.org/doc.html

  4. Espensen, K.E., Kjendsen, M.K.: Automatic Code Generation from Process-Partitioned Coloured Petri Net Models. Master’s thesis, Dept. of Computer Science, Aarhus University (2008)

    Google Scholar 

  5. Espensen, K.L., Kjeldsen, M.K., Kristensen, L.M.: Modelling and Initial Validation of the DYMO Routing Protocol for Mobile Ad-Hoc Networks. In: van Hee, K.M., Valk, R. (eds.) ATPN’08. LNCS, vol. 5062, pp. 152–170. Springer, Heidelberg (2008)

    Google Scholar 

  6. Espensen, K.L., Kjeldsen, M.K., Kristensen, L.M., Westergaard, M.: Towards Automatic Code Generation from Process-Partitioned Coloured Petri Nets. In: Proc. of 10th CPN Workshop, pp. 41–60. Aarhus University (2009)

    Google Scholar 

  7. Examples of Industrial Use of CP-nets, http://www.cs.au.dk/CPnets/intro/example/indu.html

  8. Girault, C., Valk, R.: Petri Nets for System Engineering: A Guide to Modeling, Verification, and Applications. Springer, Heidelberg (2003)

    Book  MATH  Google Scholar 

  9. Jensen, K., Kristensen, L.M.: Coloured Petri Nets – Modelling and Validation of Concurrent Systems. Springer, Heidelberg (2009)

    Book  MATH  Google Scholar 

  10. Kristensen, L.M., Mechlenborg, P., Zhang, L., Mitchell, B., Gallasch, G.E.: Model-based Development of COAST. STTT 10(1), 5–14 (2007)

    Article  Google Scholar 

  11. Kristensen, L.M., Valmari, A.: Finding Stubborn Sets of Coloured Petri Nets Without Unfolding. In: Desel, J., Silva, M. (eds.) ICATPN 1998. LNCS, vol. 1420, pp. 104–123. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  12. Lassen, K.B., Tjell, S.: Translating Colored Control Flow Nets into Readable Java via Annotated Java Workflow Nets. In: Proc. of 8th CPN Workshop. DAIMI-PB, vol. 584, pp. 127–146 (2007)

    Google Scholar 

  13. Mortensen, K.H.: Automatic Code Generation Method Based on Coloured Petri Net Models Applied on an Access Control System. In: Nielsen, M., Simpson, D. (eds.) ATPN’00. LNCS, vol. 1825, pp. 367–386. Springer, Heidelberg (2000)

    Google Scholar 

  14. Philippi, S.: Automatic code generation from high-level Petri-Nets for model driven systems engineering. Journal of Systems and Software 79(10), 1444–1455 (2006)

    Article  Google Scholar 

  15. van der Aalst, W.M.P., Jørgensen, J.B., Lassen, K.B.: Let’s Go All the Way: From Requirements Via Colored Workflow Nets to a BPEL Implementation of a New Bank System. In: Meersman, R., Tari, Z. (eds.) OTM 2005. LNCS, vol. 3760, pp. 22–39. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  16. Westergaard, M., Kristensen, L.M.: The Access/CPN Framework: A Tool for Interacting With the CPN Tools Simulator. In: Franceschinis, G., Wolf, K. (eds.) ATPN 2009. LNCS, vol. 5606, pp. 313–322. Springer, Heidelberg (2009)

    Google Scholar 

  17. Yakovlev, A., Gomes, L., Lavagno, L.: Hardware Design and Petri Nets. Kluwer Academic Publishers, Dordrecht (2000)

    Book  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kristensen, L.M., Westergaard, M. (2010). Automatic Structure-Based Code Generation from Coloured Petri Nets: A Proof of Concept. In: Kowalewski, S., Roveri, M. (eds) Formal Methods for Industrial Critical Systems. FMICS 2010. Lecture Notes in Computer Science, vol 6371. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-15898-8_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-15898-8_14

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-15897-1

  • Online ISBN: 978-3-642-15898-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

Navigation