Skip to main content
Log in

Implementing Coloured Petri Nets Using a Functional Programming Language

  • Published:
Higher-Order and Symbolic Computation

Abstract

Coloured Petri Nets (CPNs) are a graphically oriented modelling language for concurrent systems based on Petri Nets and the functional programming language Standard ML. Petri Nets provide the primitives for modelling concurrency and synchronisation. Standard ML provides the primitives for modelling data manipulation and for creating compact and parameterisable CPN models.

Functional programming and Standard ML have played a major role in the development of CPNs and the CPN computer tools supporting modelling, simulation, verification, and performance analysis of concurrent systems. At the modelling language level, Standard ML has extended Petri Nets with the practical expressiveness required for modelling systems of the size and complexity found in typical industrial projects. At the implementation level, Standard ML has been used to implement the formal semantics of CPNs that provide the theoretical foundation of the CPN computer tools.

This paper provides an overview of how functional programming and Standard ML are applied in the CPN modelling language and the supporting computer tools. We give a detailed presentation of the key algorithms and techniques used for implementing the formal semantics of CPNs, and we survey a number of case studies where CPNs have been used for the design and analysis of systems. We also demonstrate how the use of a Standard ML programming environment has allowed Petri Nets to be used for the implementation of systems.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abdulla, P.A. and Nylen, A. Timed Petri Nets and BQOs. In Proc. of 22nd International Conference on Application and Theory of Petri Nets, vol. 2075 of Lecture Notes in Computer Science, Springer-Verlag, 2001, pp. 53-70.

  2. Alur, R. and Dill, D. A theory of timed automata. Theoretical Computer Science, 126(2) (1994) 183-235.

    Google Scholar 

  3. Appel, A.W. and MacQueen, D.B. Standard ML of New Jersey. In Proceedings of the Third International Symposium on Programming Language Implementation and Logic Programming, vol. 528 of Lecture Notes in Computer Science, Springer-Verlag, 1991, pp. 1-13.

  4. Cheng, A., Christensen, S., and Mortensen, K.H. Model checking coloured petri nets exploiting strongly connected components. In Proceedings of the International Workshop on Discrete Event Systems, WODES96, Institution of Electrical Engineers, Computing and Control Division, Edinburgh, UK, 1996, pp. 169-177.

    Google Scholar 

  5. Christensen, S. and Jørgensen, J.B. Analysis of Bang and Olufsen's BeoLink audio/video system using coloured petri nets. In Proceedings of International Conference on Application and Theory of Petri Nets, vol. 1248 of Lecture Notes in Computer Science, Springer-Verlag, 1997, pp. 387-406.

  6. Christensen, S., Kristensen, L.M., and Mailund, T. Condensed state spaces for timed petri nets. In Proceedings of the 22nd International Conference on Application and Theory of Petri Nets, vol. 2075 of Lecture Notes in Computer Science, Springer-Verlag, 2001, pp. 101-120.

  7. Christensen S., Kristensen, L.M., and Mailund, T. A sweep-line method for state space exploration. In Proceedings of TACAS'01, vol. 2031 of Lecture Notes in Computer Science, Springer-Verlag, 2001, pp. 450-464.

  8. Ciardo, G., Cherkasova, L., Kotov, V., and Rokicki, T. Modeling a scaleable high-speed interconnect with stochastic petri nets. In Proceedings of PNPM'95, IEEE Computer Society Press, 1995, pp. 83-93.

  9. Clarke, E.M. and Wing, J.M. Formal methods: State of the art and future directions. ACM Computing Surveys, 28(4) (1996), 626-643.

    Google Scholar 

  10. Clarke, E.M., Emerson, E.A., and Sistla, A.P. Automatic verification of finite state concurrent systems using temporal logic. ACM Transactions on Programming Languages and Systems, 8(2) (1986) 244-263.

    Google Scholar 

  11. Clausen, H. and Jensen, P.R. Validation and performance analysis of network algorithms by coloured petri nets. In Proceedings of PNPM'93, IEEE Computer Society Press, 1993, pp. 280-289.

  12. Comer, D.E. Computer Networks and Internets. Prentice-Hall, 1997.

  13. The Design/CPN Homepage. http://www.daimi.au.dk/designCPN/.

  14. Eker, S.M. Associative-commutative matching via bipartite graph matching. The Computer Journal, 38(5) (1995) 381-399.

    Google Scholar 

  15. Emerson, E.A. and Sistla, A.P. Symmetry and model checking. Formal Methods in System Design, 9(1/2) (1996) 105-131.

    Google Scholar 

  16. Floreani, D.J., Billington J., and Dadej, A. Designing and verifying a communications gateway using colored petri nets and design/CPN. In Proc. of International Conference on Application and Theory of Petri Nets, vol. 1091 of Lecture Notes in Computer Science, Springer-Verlag, 1996, pp. 153-171.

  17. The Formal Methods Homepage. http://www.afm.sbu.ac.uk/.

  18. Formal Systems—FDR2. http://www.formal.demon.co.uk/FDR2.html.

  19. Gaeta, R. Efficient discrete-event simulation of coloured petri nets. IEEE Transactions on Software Engineering, 22(9) (1996) 629-639.

    Google Scholar 

  20. Gallasch, G. and Kristensen, L.M. Comms/CPN: A communication infrastructure for external communication with design/cpn. In Proceedings of the 3rd Workshop on Practical Use of Coloured Petri Nets and the CPN Tools (CPN'01), DAIMI PB-554, University of Aarhus, 2001, pp. 79-93.

  21. Genrich, H. Predicate/transition nets. In High-level Petri Nets, Springer-Verlag, 1991, pp. 3-43.

  22. Giacalone, A., Mishra, P., and Prasad, S. Facile: A symmetric integration of concurrent and functional programming. In Proc. of TAPSOFT'89, vol. 352 of Lecture Notes in Computer Science, Springer-Verlag, 1989, pp. 184-209.

  23. Giunchiglia, F. and Traverso, P. Special issue on theorem proving. International Journal on Software Tools for Technology Transfer (STTT), 3(1) (2000) 1-92.

    Google Scholar 

  24. Gordon, M.J.C. and Melham, T.F. (Eds.). Introduction to HOL. Cambridge University Press, 1993.

  25. Gordon, S., Kristensen, L.M., and Billington, J. Verification of a revisedWAP wireless transaction protocol. In Proceedings of 23rd International Conference on Application and Theory of Petri Nets, vol. 2360 of Lecture Notes in Computer Science, Springer-Verlag, 2002, pp. 182-202.

  26. Grahlmann, B. The PEP tool. In Proceedings of CAV'97, vol. 1254 of Lecture Notes in Computer Science, Springer-Verlag, 1997, pp. 440-443.

  27. The GreatSPN Homepage. http://www.di.unito.it/~greatspn/index.html.

  28. Harel, D. Statecharts: A visual formalism for complex systems. Science of Computer Programming, 8 (1987) 231-274.

    Google Scholar 

  29. Hoare, C.A.R. Communicating sequential processes. Prentice-Hall, 1985.

  30. Holzmann, G.J. Design and Validation of Computer Protocols. Prentice-Hall, 1991.

  31. Ilié, J.-M. and Rojas, O. On well-formed nets and optimisations in enabling tests. In Proc. of International Conference on Application and Theory of Petri Nets, vol. 691 of Lecture Notes in Computer Science, Springer-Verlag, 1993, pp. 300-318.

  32. The Java Homepage. http://java.sun.com/.

  33. Jensen, K. Coloured Petri Nets. Basic Concepts, Analysis Methods and Practical Use. Vol. 1, Basic Concepts. Monographs in Theoretical Computer Science. Springer-Verlag, 1992.

  34. Jensen, K. Coloured Petri Nets. Basic Concepts, Analysis Methods and Practical Use. Vol. 2, Analysis Methods. Monographs in Theoretical Computer Science. Springer-Verlag, 1994.

  35. Jensen, K. Condensed state spaces for symmetrical coloured petri nets. Formal Methods in System Design, 9(1/2) (1996) 7-40.

    Google Scholar 

  36. Jensen, K. Coloured Petri Nets. Basic Concepts, Analysis Methods and Practical Use. Vol. 3, Practical Use. Monographs in Theoretical Computer Science. Springer-Verlag, 1997.

  37. Jensen, K. An introduction to the practical use of coloured petri nets. In Lectures on Petri Nets II, vol. 1492 of Lecture Notes in Computer Science, Springer Verlag, 1998, pp. 237-292.

  38. Jensen, K. and Rozenberg, G. (Eds.). High-level Petri Nets. Springer-Verlag, 1991.

  39. Jones, S.P., Gordon, A., and Finne, S. Concurrent Haskell. In 23rd ACM Symposium on Principles of Programming Languages, 1996, pp. 295-308.

  40. Kristensen, L.M., Christensen S., and Jensen, K. The Practitioner's Guide to Coloured Petri Nets. International Journal on Software Tools for Technology Transfer, 2(2) (1998) 98-132.

    Google Scholar 

  41. Kristensen, L.M. and Valmari, A. Finding stubborn sets of coloured petri nets without unfolding. In Proceedings of ICATPN'98, vol. 1420 of Lecture Notes in Computer Science, Springer-Verlag, 1998, pp. 104-123.

  42. Kristensen, L.M. and Mailund, T. A generalised sweep-line method for safety properties. In Proceedings of Formal Methods Europe, vol. 2391 of Lecture Notes in Computer Science, Springer-Verlag, 2002, pp. 549-567.

  43. Kummer, O. Tight integration of JAVA and petri nets. In Proc. of 6th Workshop on Algorithms and Tools for Petri Nets, J.W. Goethe-Universität, Institut für Wirtschaftinformatik, Oct. 1999, pp. 30-35.

  44. Larsen, K.G., Pettersson, P., and Yi, W. Uppaal in a Nutshell. International Journal on Software Tools for Technology Transfer, 1(1+2) (1997) 134-152.

    Google Scholar 

  45. Lincoln, P. and Christian, J.C. Adventures in associative-commutative unification. Journal of Symbolic Computation, 8(1/2) (1989) 217-240.

    Google Scholar 

  46. Lorentsen, L. and Kristensen, L.M. Modelling and analysis of a danfoss flowmeter system using coloured petri nets. In Proceedings of 21st International Conference on Application and Theory of Petri Nets, vol. 1825 of Lecture Notes in Computer Science, Springer-Verlag, 2000, pp. 346-366.

  47. Mäkelä, M. Optimising enabling tests and unfoldings of algebraic system nets. In Proc. of International Conference on Application and Theory of Petri Nets, vol. 2075 of Lecture Notes in Computer Science, Springer-Verlag, 2001, pp. 283-302.

  48. Mäkelä, M. Maria: Modular reachability analyser for algebraic system nets. In Proc. of 23rd International Conference on Application and Theory of Petri Nets, vol. 2360 of Lecture Notes in Computer Science, Springer-Verlag, 2002, pp. 434-444.

  49. Marsan, M.A., Balbo, G., Conte, G., Donatelli, S., and Franceschinis, G. Modelling with Generalized Stochastic Petri Nets. Series in Parallel Computing. Wiley, 1995.

  50. Milner, R. Communication and Concurrency. Prentice-Hall, 1989.

  51. Milner, R., Harper, R., and Tofte, M. The Definition of Standard ML. MIT Press, 1990.

  52. Monchelet, G., Christensen, S., Demmou, H., Paludetto, M., and Porras, J. Analysing a mechatronic system with coloured petri nets. Int. Journal on Software Tools for Technology Transfer, 2(2) (1998) 160-167.

    Google Scholar 

  53. Mortensen, K.H. Automatic code generation method based on coloured petri net models applied on an access control system. In Proc. of 21st International Conference on Application and Theory of Petri Nets, vol. 1825 of Lecture Notes in Computer Science, Springer-Verlag, 2000, pp. 367-386.

  54. The Moscow ML Homepage. http://www.dina.dk/~sestoft/mosml.html.

  55. Nöcker, E., Smethers, S., van Eekelen, M., and Plasmeijer, R. Concurrent clean. In Proc. of Parallel Architectures and Languages Europe (PARLE '91), vol. 505 of Lecture Notes in Computer Science, Springer-Verlag, 1991, pp. 202-219.

  56. The Standard ML of New Jersey Homepage. http://cm.bell-labs.com/cm/cs/what/smlnj/index.html.

  57. The Haskell Homepage. http://www.haskell.org.

  58. Paulson, L.C. ML for the Working Programmer. Cambridge University Press, 2nd edn., 1996.

  59. Peled, D. All from one, one for all: on model checking using representatives. In Proceedings of CAV'93, vol. 697 of Lecture Notes in Computer Science, Springer-Verlag, 1993, pp. 409-423.

  60. Petri, C.A. Kommunikation mit Automaten. Bonn: Institut für Instrumentelle Mathematik, Schriften des IIM Nr. 2, 1962.

    Google Scholar 

  61. The PVS Specification and Verification System Homepage. http://pvs.csl.sri.com/.

  62. Rasmussen, J.L. and Singh, M. Designing a security system by means of coloured petri nets. In Proceedings of 17th International Conference on Application and Theory of Petri Nets, vol. 1091 of Lecture Notes in Computer Science, Springer-Verlag, 1996, pp. 400-419.

  63. Reinke, C. Haskell-coloured petri nets. In Proc. of 11th International Workshop Implementation of Functional Langugages (IFL'99), vol. 1868 of Lecture Notes in Computer Science, Springer-Verlag, 1999, pp. 165-180.

  64. Reisig, W. Petri Nets, vol. 4 of EACTS Monographs on Theoretical Computer Science. Springer-Verlag, 1985.

  65. Reppy, J. Concurrent Programming in ML. Cambridge University Press, 1999.

  66. Rozenberg, G. and Reisig, W. (Eds.). Lectures on Petri Nets I: Basic Models, vol. 1491 of Lecture Notes in Computer Science. Springer-Verlag, 1998.

  67. Sanders, M.J. Efficient computation of enabled transition bindings in high-level petri nets. In Proc. of IEEE International Conference on Systems, Man and Cybernetics, Oct. 2000, pp. 3153-3158.

  68. Schmidt, K. LoLA: A low level analyser. In Proc. of 21st International Conference on Application and Theory of Petri Nets, vol. 1825 of Lecture Notes in Computer Science, Springer-Verlag, 2000, pp. 465-474.

  69. Steggles, L.J. Rewriting logic and elan: Prototyping tools for petri nets with time. In Proc. of 22nd International Conference on Application and Theory of Petri Nets, vol. 2075 of Lecture Notes in Computer Science, Springer-Verlag, 2001, pp. 363-381.

  70. Stoustrup, B. The C++ Programming Language, 3rd edition. Addison-Wesley, 1997.

  71. The Edinburgh Concurency Workbench Homepage. http://www.dcs.ed.ac.uk/home/cwb/index.html.

  72. The CPN Tools Homepage. http://www.daimi.au.dk/CPNtools/.

  73. Ullman, J.D. Elements of ML Programming. Prentice-Hall, 1998.

  74. Valmari, A. A stubborn attack on state explosion. In Proceedings of Computer-Aided Verification '90, vol. 531 of Lecture Notes in Computer Scienc, Springer-Verlag, 1990, pp. 156-165.

  75. Valmari, A. Stubborn sets of coloured petri nets. In Proceedings of ICATPN'91, 1991, pp. 102-121.

  76. Valmari, A. The state explosion problem. In Lectures on Petri Nets I: Basic Models, vol. 1491 of Lecture Notes in Computer Science, Springer-Verlag, 1998, pp. 429-528.

  77. Van der Aalst, W.M.P. Interval timed coloured petri nets and their analysis. In Proceedings of ICATPN'93, vol. 691 of Lecture Notes in Computer Science, Springer Verlag, 1993, pp. 453-472.

  78. The VisualState Homepage. http://www.iar.com/.

  79. Xu, J. and Kuusela, J. Analyzing the execution architecture of mobile phone software with coloured petri nets. Int. Journal on Software Tools for Technology Transfer, 2(2) (1998) 133-143.

    Google Scholar 

  80. Yakovlev, A., Gomes, L., and Lavagno, L. (Eds.). Hardware Design and Petri Nets. Kluwer Academic Publishers, 2000.

  81. Zhang, L., Kristensen, L.M., Janczura, C., Gallasch, G., and Billington, J. A coloured petri net based tool for course of action development and analysis. In Proc. of Workshop on Formal Methods Applied to Defence Systems, vol. 12 of Conferences in Research and Practice in Information Technology, Australian Computer Society, 2002, pp. 125-134.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Kristensen, L.M., Christensen, S. Implementing Coloured Petri Nets Using a Functional Programming Language. Higher-Order and Symbolic Computation 17, 207–243 (2004). https://doi.org/10.1023/B:LISP.0000029445.29210.ca

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/B:LISP.0000029445.29210.ca

Navigation