Skip to main content

PetriCode: A Tool for Template-Based Code Generation from CPN Models

  • Conference paper
  • First Online:
Software Engineering and Formal Methods (SEFM 2013)

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

Included in the following conference series:

Abstract

Code generation is an important part of model driven methodologies. In this paper, we present PetriCode, a software tool for generating protocol software from a subclass of Coloured Petri Nets (CPNs). The CPN subclass is comprised of hierarchical CPN models describing a protocol system at different levels of abstraction. The elements of the models are annotated with code generation pragmatics enabling PetriCode to use a template-based approach to generate code while keeping the models uncluttered from implementation artefacts. PetriCode is the realization of our code generation approach which has been described in previous works.

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

Access this chapter

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

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Alanen, M., Lilius, J., Porres, I., Truscan, D.: On Modeling Techniques for Supporting Model Driven Development of Protocol Processing Applications, pp. 305–328. Springer, Heidelberg (2005)

    Google Scholar 

  2. Babich, F., Deotto, L.: Formal methods for specification and analysis of communication protocols. IEEE Commun. Surv. Tutor. 4(1), 2–20 (2002)

    Article  Google Scholar 

  3. Groovy. Project Web Site. http://groovy.codehaus.org

  4. ITU-T. Recommendation Z.100 (11/99) Specification and Description Language (SDL) (1999)

    Google Scholar 

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

    Book  Google Scholar 

  6. Jensen, K., Kristensen, L.M., Wells, L.: Coloured Petri Nets and CPN Tools for modelling and validation of concurrent systems. Int. J. Softw. Tools Technol. Transf. 9(3–4), 213–254 (2007)

    Article  Google Scholar 

  7. Kindler, E.: Model-based software engineering: the challenges of modelling behaviour. In: Proceedings of BM-FA ’10, pp. 4:1–4:8. ACM Electronic Libraries (2010)

    Google Scholar 

  8. Kristensen, L.M., Simonsen, K.I.F.: Applications of coloured Petri Nets for functional validation of protocol designs. In: Jensen, K., van der Aalst, W.M.P., Balbo, G., Koutny, M., Wolf, K. (eds.) ToPNoC VII. LNCS, vol. 7480, pp. 56–115. Springer, Heidelberg (2013)

    Google Scholar 

  9. Kristensen, L.M., Westergaard, M.: Automatic structure-based code generation from Coloured Petri Nets: a proof of concept. In: Kowalewski, S., Roveri, M. (eds.) FMICS 2010. LNCS, vol. 6371, pp. 215–230. Springer, Heidelberg (2010)

    Google Scholar 

  10. Kroiss, C., Koch, N., Knapp, A.: UWE4JSF: a model-driven generation approach for web applications. In: Gaedke, M., Grossniklaus, M., Díaz, O. (eds.) ICWE 2009. LNCS, vol. 5648, pp. 493–496. Springer, Heidelberg (2009)

    Google Scholar 

  11. Kukkala, P., Helminen, V., Hannikainen, M., Hamalainen, T.D.: UML 2.0 implementation of an embedded WLAN protocol. In: Proceedings of PIMRC ’04, vol. 2, pp. 1158–1162 (2004)

    Google Scholar 

  12. Kummer, O., Wienberg, F., Duvigneau, M., Schumacher, J., Köhler, M., Moldt, D., Rölke, H., Valk, R.: An extensible editor and simulation engine for Petri Nets: renew. In: Cortadella, J., Reisig, W. (eds.) ICATPN 2004. LNCS, vol. 3099, pp. 484–493. Springer, Heidelberg (2004)

    Google Scholar 

  13. Parssinen, J., von Knorring, N., Heinonen, J., Turunen, M.: UML for protocol engineering-extensions and experiences. In: Proceedings of TOOLS ’00, pp. 82–93 (2000)

    Google Scholar 

  14. Pereira, C.L., da Silva, D.C., Jr., Duarte, R.G., Fernandes, A.O., Canaan, L.H., Coelho, C.J.N., Ambrosio, L.L.: Jade: an embedded systems specification, code generation and optimization tool. In: Proceedings of SBCCI ’00, pp. 263–268 (2000)

    Google Scholar 

  15. PetriCode. Project Web Site. http://kentis.github.io/petriCode/

  16. Simonsen, K.I.F.: On the use of pragmatics for model-based development of protocol software. In: Proceedings of PNSE ’11, vol. 723 of CEUR Workshop Proceedings, pp. 179–190. www.CEUR-WS.org (2011)

  17. Simonsen, K.I.F.: PetriCode: a tool for template-based code generation from CPN models. Technical Report DTU Compute-Technical Reports-2013-11, PetriCode (2013)

    Google Scholar 

  18. Simonsen, K.I.F., Kristensen, L.M.: Towards a CPN-based modelling approach for reconciling verification and implementation of protocol models. In: Machado, R.J., Maciel, R.S.P., Rubin, J., Botterweck, G. (eds.) MOMPES 2012. LNCS, vol. 7706, pp. 106–125. Springer, Heidelberg (2013)

    Google Scholar 

  19. Simonsen, K.I.F., Kristensen, L.M., Kindler, E.: Code generation for protocol software from CPN models annotated with pragmatics. In: Proceedings of SBMF’13. LNCS. Springer (2013, to appear)

    Google Scholar 

  20. Wehrmeister, M.A., Freitas, E.P., Pereira, C.E., Rammig, F.: Genertica: a tool for code generation and aspects weaving. In: Proceedings of ISORC ’08, pp. 234–238. IEEE Computer Society, Washington, DC (2008)

    Google Scholar 

  21. Westergaard, M., Kristensen, L.M.: The access/CPN framework: a tool for interacting with the CPN tools simulator. In: Franceschinis, G., Wolf, K. (eds.) PETRI NETS 2009. LNCS, vol. 5606, pp. 313–322. Springer, Heidelberg (2009)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kent Inge Fagerland Simonsen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2014 Springer International Publishing Switzerland

About this paper

Cite this paper

Simonsen, K.I.F. (2014). PetriCode: A Tool for Template-Based Code Generation from CPN Models. In: Counsell, S., Núñez, M. (eds) Software Engineering and Formal Methods. SEFM 2013. Lecture Notes in Computer Science(), vol 8368. Springer, Cham. https://doi.org/10.1007/978-3-319-05032-4_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-05032-4_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-05031-7

  • Online ISBN: 978-3-319-05032-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics