Skip to main content

Automatic Verification of Erlang-Style Concurrency

  • Conference paper
Book cover Static Analysis (SAS 2013)

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

Included in the following conference series:

Abstract

This paper presents an approach to verify safety properties of Erlang-style, higher-order concurrent programs automatically. Inspired by Core Erlang, we introduce λ Actor, a prototypical functional language with pattern-matching algebraic data types, augmented with process creation and asynchronous message-passing primitives. We formalise an abstract model of λ Actor programs called Actor Communicating System (ACS) which has a natural interpretation as a vector addition system, for which some verification problems are decidable. We give a parametric abstract interpretation framework for λ Actor and use it to build a polytime computable, flow-based, abstract semantics of λ Actor programs, which we then use to bootstrap the ACS construction, thus deriving a more accurate abstract model of the input program.

We evaluate the method which we implemented in the prototype Soter. We find that in practice our abstraction technique is accurate enough to verify an interesting range of safety properties. Though the ACS coverability problem is Expspace-complete, Soter can analyse non-trivial programs in a matter of seconds.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Agha, G.: Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge (1986)

    Google Scholar 

  2. Armstrong, J.: Erlang. CACM 53(9), 68 (2010)

    Article  Google Scholar 

  3. Armstrong, J., Virding, R., Williams, M.: Concurrent programming in Erlang. Prentice Hall (1993)

    Google Scholar 

  4. Bouajjani, A., Esparza, J., Touili, T.: A generic approach to the static analysis of concurrent programs with procedures. ACM SIGPLAN Notices 38, 62–73 (2003)

    Article  Google Scholar 

  5. Carlsson, R.: An introduction to Core Erlang. In: Proceedings of the PLI 2001 Erlang Workshop (2001)

    Google Scholar 

  6. Carlsson, R., Sagonas, K., Wilhelmsson, J.: Message analysis for concurrent programs using message passing. ACM TOPLAS (2006)

    Google Scholar 

  7. Christakis, M., Sagonas, K.: Static detection of race conditions in erlang. In: Carro, M., Peña, R. (eds.) PADL 2010. LNCS, vol. 5937, pp. 119–133. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  8. Christakis, M., Sagonas, K.: Detection of asynchronous message passing errors using static analysis. In: Rocha, R., Launchbury, J. (eds.) PADL 2011. LNCS, vol. 6539, pp. 5–18. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  9. Colby, C.: Analyzing the communication topology of concurrent programs. In: PEPM, pp. 202–213 (1995)

    Google Scholar 

  10. D’Osualdo, E., Kochems, J., Ong, C.-H.L.: Verifying Erlang-style concurrency automatically. Technical report, University of Oxford DCS Technical Report (2011), http://mjolnir.cs.ox.ac.uk/soter/cpmrs.pdf

  11. D’Osualdo, E., Kochems, J., Ong, C.-H.L.: Soter: an automatic safety verifier for Erlang. In: AGERE! 2012, pp. 137–140. ACM (2012)

    Google Scholar 

  12. D’Osualdo, E., Kochems, J., Ong, C.-H.L.: Automatic verification of Erlang-style concurrency. CoRR, abs/1303.2201 (2013), http://arxiv.org/abs/1303.2201

  13. Feret, J.: Abstract interpretation of mobile systems. Journal of Logic and Algebraic Programming 63(1), 59–130 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  14. Finkel, A., Schnoebelen, P.: Well-structured transition systems everywhere! Theoretical Computer Science 256(1-2), 63–92 (2001)

    Article  MathSciNet  MATH  Google Scholar 

  15. Fredlund, L., Svensson, H.: McErlang: a model checker for a distributed functional programming language. In: ICFP, pp. 125–136 (2007)

    Google Scholar 

  16. Ganty, P., Majumdar, R.: Algorithmic verification of asynchronous programs. TOPLAS 34(1) (2012)

    Google Scholar 

  17. Garoche, P.-L., Pantel, M., Thirioux, X.: Static safety for an actor dedicated process calculus by abstract interpretation. In: Gorrieri, R., Wehrheim, H. (eds.) FMOODS 2006. LNCS, vol. 4037, pp. 78–92. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  18. Huch, F.: Verification of Erlang programs using abstract interpretation and model checking. In: ICFP, pp. 261–272 (1999)

    Google Scholar 

  19. Jhala, R., Majumdar, R.: Interprocedural analysis of asynchronous programs. In: POPL 2007, pp. 339–350. ACM, New York (2007)

    Google Scholar 

  20. Kaiser, A., Kroening, D., Wahl, T.: Efficient coverability analysis by proof minimization. In: Koutny, M., Ulidowski, I. (eds.) CONCUR 2012. LNCS, vol. 7454, pp. 500–515. Springer, Heidelberg (2012), www.cprover.org/bfc/

    Chapter  Google Scholar 

  21. Kobayashi, N., Nakade, M., Yonezawa, A.: Static analysis of communication for asynchronous concurrent programming languages. In: Mycroft, A. (ed.) SAS 1995. LNCS, vol. 983, pp. 225–242. Springer, Heidelberg (1995)

    Chapter  Google Scholar 

  22. Lindahl, T., Sagonas, K.: Practical type inference based on success typings. In: PPDP, pp. 167–178 (2006)

    Google Scholar 

  23. Long, Z., Calin, G., Majumdar, R., Meyer, R.: Language-Theoretic abstraction refinement. In: de Lara, J., Zisman, A. (eds.) FASE. LNCS, vol. 7212, pp. 362–376. Springer, Heidelberg (2012)

    Google Scholar 

  24. Marlow, S., Wadler, P.: A practical subtyping system for Erlang. In: ICFP, pp. 136–149 (1997)

    Google Scholar 

  25. Meyer, R.: On boundedness in depth in the π-calculus. In: Fifth Ifip International Conference On Theoretical Computer Science, pp. 477–489 (2008)

    Google Scholar 

  26. Midtgaard, J., Jensen, T.: A calculational approach to control-flow analysis by abstract interpretation. In: Alpuente, M., Vidal, G. (eds.) SAS 2008. LNCS, vol. 5079, pp. 347–362. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  27. Might, M., Van Horn, D.: A family of abstract interpretations for static analysis of concurrent higher-order programs. In: Yahav, E. (ed.) SAS. LNCS, vol. 6887, pp. 180–197. Springer, Heidelberg (2011)

    Google Scholar 

  28. Milner, R.: A calculus of communicating systems, vol. 92. Springer, Heidelberg (1980)

    Book  MATH  Google Scholar 

  29. Nyström, S.: A soft-typing system for Erlang. In: ACM Sigplan Erlang Workshop, pp. 56–71 (2003)

    Google Scholar 

  30. Ong, C.-H.L., Ramsay, S.J.: Verifying higher-order functional programs with pattern-matching algebraic data types. In: POPL, pp. 587–598 (2011)

    Google Scholar 

  31. Park, Y.G., Goldberg, B.: Escape analysis on lists. ACM SIGPLAN Notices 27, 116–127 (1992)

    Article  Google Scholar 

  32. Pike, R.: Concurrency and message passing in Newsqueak. Google Talks Archive, http://youtu.be/hB05UFqOtFA

  33. Rackoff, C.: The covering and boundedness problems for vector addition systems. Theoretical Computer Science 6, 223–231 (1978)

    Article  MathSciNet  MATH  Google Scholar 

  34. Reppy, J.H., Xiao, Y.: Specialization of CML message-passing primitives. In: POPL, pp. 315–326 (2007)

    Google Scholar 

  35. Shivers, O.: Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University (1991)

    Google Scholar 

  36. Van Horn, D., Might, M.: Abstracting abstract machines. In: ICFP, pp. 51–62 (2010)

    Google Scholar 

  37. Venet, A.: Abstract interpretation of the pi-calculus. In: LOMAPS, pp. 51–75 (1996)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

D’Osualdo, E., Kochems, J., Ong, C.H.L. (2013). Automatic Verification of Erlang-Style Concurrency. In: Logozzo, F., Fähndrich, M. (eds) Static Analysis. SAS 2013. Lecture Notes in Computer Science, vol 7935. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38856-9_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-38856-9_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-38855-2

  • Online ISBN: 978-3-642-38856-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics