Skip to main content
Log in

Formally based tool support for model checking Erlang applications

  • Regular Paper
  • Published:
International Journal on Software Tools for Technology Transfer Aims and scope Submit manuscript

Abstract

Model checking as a verification technique has proved effective at the system design and hardware level, and is now beginning to be applied to program code. In this paper, we study the application of model checking techniques in the development of Erlang systems. Erlang is a concurrent functional language with specific support for the development of distributed, fault-tolerant systems with soft real-time requirements. It was designed from the start to support a concurrency-oriented programming paradigm and large distributed implementations that this supports. The methodology we describe in this paper consists of abstracting the behaviour of Erlang and OTP components into a process algebraic specification, specifically an mCRL2 specification, upon which the standard model checker CADP can be used to verify the system’s properties. In addition to rules that model the Erlang syntax, a translation mechanism for the OTP modules gen_server, supervisor and gen_fsm, and the timeout event are defined. A tool-set etomcrl2 has been developed to automate the process of translation. A small illustrative example is used to evaluate the effectiveness of the proposed techniques, and its results show that the proposed techniques are effective in both verifying properties as well as distinguishing between correct and faulty implementations of the design.

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.

Institutional subscriptions

Similar content being viewed by others

References

  1. Armstrong J., Virding R., Wikström C., Williams M.: Concurrent Programming in Erlang. 2nd edn. Prentice-Hall, Englewood Cliffs (1996)

    Google Scholar 

  2. Arts, T., Benac-Earle, C., Derrick, J.: Verifying Erlang code: a resource locker case-study. In: Eriksson, L.-H., Lindsay, P. (eds.) Formal Methods Europe: Getting IT Right, Copenhagen, Denmark. LNCS, vol. 2391, pp. 184–203. Springer (2002)

  3. Arts, T., Benac-Earle, C., Sánchez Penas, J.J.: Translating Erlang to μCRL. In: Kishinevsky, M., Darondeau, P. (eds.) The Fourth International Conference on Application of Concurrency to System Design (ACSD’04), pp. 135–144. IEEE Computer Society (2004)

  4. Baeten J.C.M., Weijland W.P.: Process Algebra. Cambridge University, Cambridge (1990)

    Book  Google Scholar 

  5. Benac-Earle, C.: Model checking the interaction of Erlang components. PhD thesis, The University of Kent, Canterbury, Department of Computer Science (2006)

  6. Benac-Earle C., Fredlund L.-Å.: Verification of language based fault-tolerance. In: Moreno-Díaz, R., Pichler, F., Quesada-Arencibia, A. (eds) EUROCAST, pp. 140–149. Springer, Berlin (2005)

    Google Scholar 

  7. Benac-Earle C., Fredlund L.-Å, Derrick J.: Verifying fault-tolerant Erlang programs. In: Sagonas, K., Armstrong, J. (eds) Proceedings of ACM SigPlan Erlang 2005 Workshop, pp. 26–34. ACM Press, New York (2005)

    Chapter  Google Scholar 

  8. Blom, S., Ioustinova, N., Sidorova, N.: Timed verification with μCRL. In: Broy, M., Zamulin, A.V. (eds.) 5th Andrei Ershov International Conference on Perspectives of System Informatics PSI’2003. LNCS, vol. 2890, pp. 178–192, Springer (2003)

  9. CADP. http://www.inrialpes.fr/vasy/cadp/

  10. Clarke E., Grumberg O., Long D.: Model Checking. MIT Press, Cambridge (1999)

    Google Scholar 

  11. Fredlund, L.-Å., Svensson, H.: McErlang: a model checker for a distributed functional programming language. In: Hinze, R., Ramsey, N. (eds.) 12th ACM SIGPLAN International conference on functional programming (ICFP 2007). ISBN 978-1-59593-815-2 (2007)

  12. Fredlund, L.-Å.: Towards a semantics for Erlang. In: Foundations of Mobile Computation: A Post-Conference Satellite Workshop of FST and TCS 99 (1999)

  13. Fredlund, L.-Å.: A Framework for Reasoning about Erlang Code. PhD thesis, Roral Institute of Technology, Stockholm, Sweden (2001)

  14. Fredlund L.-Å., Gurov D., Noll T., Dam M., Arts T., Chugunov G.: A verification tool for Erlang. Int. J. Softw. Tools Technol. Transf. 4(4), 405–420 (2003)

    Article  Google Scholar 

  15. Groote, J.F.: The syntax and semantics of timed μCRL. In: SEN R9709 CWI, Amsterdam (1997)

  16. Groote J.F., Mathijssena A., van Weerdenburga M., Usenko Y.: From μCRL to mCRL2. Electron. Notes Theor. Comput. Sci. 162, 191–196 (2006)

    Article  Google Scholar 

  17. Groote, J.F., Ponse, A.: The syntax and semantics of μCRL. In: Ponse, A., Verhoef, C., van Vlijmen, S. (eds.) Algebra of Communicating Processes 1994, Workshop in Computing, pp. 26–62 (1995)

  18. Groote, J.F., Mathijssen, A., Reniers, M., Usenko, Y., van Weerdenburg, M.: The formal specification language mcrl2. In: Brinksma, Ed., Harel, D., Mader, A., Stevens, P., Wieringa, R. (eds.) Methods for Modelling Software Systems (MMOSS), number 06351 in Dagstuhl Seminar Proceedings, Dagstuhl, Germany (2007). Internationales Begegnungs- und Forschungszentrum für Informatik (IBFI), Schloss Dagstuhl, Germany

  19. Guo, Q.: Verifying Erlang/OTP components in μCRL. In: Derrick, J. (ed.) FORTE’07. LNCS, vol. 4574, pp. 227–246, Springer, June 2007

  20. Guo, Q., Derrick, J.: Eliminating overlapping of pattern matching when verifying Erlang programs in μCRL. In: 12th International Erlang User Conference (EUC’06), Stockholm, Sweden (2006)

  21. Guo Q., Derrick J.: Verification of timed Erlang/OTP components using the process algebra μCRL. In: Thompson, S., Fredlund, L.-Å. (eds) 6th ACM SIGPLAN Erlang Workshop, pp. 55–64. ACM Press, New York (2007)

    Google Scholar 

  22. Guo, Q., Derrick, J., Benac-Earle, C., Fredlund, L.-Å.: Model-checking Erlang—a comparison between EtomCRL2 and McErlang. In: Bottaci, L., Fraser, G. (eds.) Testing—Practice and Research Techniques, 5th International Academic and Industrial Conference (TAIC PART 2010). LNCS, vol. 6303, pp. 23–38. Springer (2010)

  23. Guo, Q., Derrick, J., Hoch, C.: Verifying Erlang telecommunication systems with the process algebra μCRL. In: Suzuki, K., Higashino, T. Yasumoto, K., El-Fakih, K. (eds.) FORTE’08. LNCS, vol. 5048, pp. 201–217. Springer, June 2008

  24. Havelund K., Lowry M., Penix J.: Formal analysis of a space-craft controller using SPIN. IEEE Trans. Softw. Eng. 27(8), 749–765 (2001)

    Article  MATH  Google Scholar 

  25. Huch F.: Verification of Erlang programs using abstract interpretation and model checking. ACM SIGPLAN Notices 34(9), 261–272 (1999)

    Article  Google Scholar 

  26. Kozen D.: Results on the propositional μ-calculus. Theor. Comput. Sci. 27, 333–354 (1983)

    Article  MATH  MathSciNet  Google Scholar 

  27. Mauw S., Veltink G.J.: A process specification formalism. Fundamenta Informaticae XIII, 85–139 (1990)

    Google Scholar 

  28. Svensson H., Fredlund L.-Å: A more accurate semantics for distributed Erlang. In: Thompson, S., Fredlund, L.-A. (eds) 6th ACM SIGPLAN Erlang Workshop, pp. 43–54. ACM Press, New York (2007)

    Google Scholar 

  29. van Eijk P.H.J., Vissers C.A., Diaz M.: The formal description technique LOTOS. Elsevier Science Publishers B.V., New York (1989)

    MATH  Google Scholar 

  30. Visser W., Havelund K., Brat G., Park S.: Model checking programs. Automat. Softw. Eng. J. 10(2), 3–12 (2000)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Qiang Guo.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Guo, Q., Derrick, J. Formally based tool support for model checking Erlang applications. Int J Softw Tools Technol Transfer 13, 355–376 (2011). https://doi.org/10.1007/s10009-010-0179-1

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10009-010-0179-1

Keywords

Navigation