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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
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)
Babich, F., Deotto, L.: Formal methods for specification and analysis of communication protocols. IEEE Commun. Surv. Tutor. 4(1), 2–20 (2002)
Groovy. Project Web Site. http://groovy.codehaus.org
ITU-T. Recommendation Z.100 (11/99) Specification and Description Language (SDL) (1999)
Jensen, K., Kristensen, L.M.: Coloured Petri Nets - Modelling and Validation of Concurrent Systems. Springer, Heidelberg (2009)
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)
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)
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)
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)
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)
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)
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)
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)
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)
PetriCode. Project Web Site. http://kentis.github.io/petriCode/
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)
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)
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)
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)
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)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)