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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Agha, G.: Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge (1986)
Armstrong, J.: Erlang. CACM 53(9), 68 (2010)
Armstrong, J., Virding, R., Williams, M.: Concurrent programming in Erlang. Prentice Hall (1993)
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)
Carlsson, R.: An introduction to Core Erlang. In: Proceedings of the PLI 2001 Erlang Workshop (2001)
Carlsson, R., Sagonas, K., Wilhelmsson, J.: Message analysis for concurrent programs using message passing. ACM TOPLAS (2006)
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)
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)
Colby, C.: Analyzing the communication topology of concurrent programs. In: PEPM, pp. 202–213 (1995)
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
D’Osualdo, E., Kochems, J., Ong, C.-H.L.: Soter: an automatic safety verifier for Erlang. In: AGERE! 2012, pp. 137–140. ACM (2012)
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
Feret, J.: Abstract interpretation of mobile systems. Journal of Logic and Algebraic Programming 63(1), 59–130 (2005)
Finkel, A., Schnoebelen, P.: Well-structured transition systems everywhere! Theoretical Computer Science 256(1-2), 63–92 (2001)
Fredlund, L., Svensson, H.: McErlang: a model checker for a distributed functional programming language. In: ICFP, pp. 125–136 (2007)
Ganty, P., Majumdar, R.: Algorithmic verification of asynchronous programs. TOPLAS 34(1) (2012)
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)
Huch, F.: Verification of Erlang programs using abstract interpretation and model checking. In: ICFP, pp. 261–272 (1999)
Jhala, R., Majumdar, R.: Interprocedural analysis of asynchronous programs. In: POPL 2007, pp. 339–350. ACM, New York (2007)
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/
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)
Lindahl, T., Sagonas, K.: Practical type inference based on success typings. In: PPDP, pp. 167–178 (2006)
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)
Marlow, S., Wadler, P.: A practical subtyping system for Erlang. In: ICFP, pp. 136–149 (1997)
Meyer, R.: On boundedness in depth in the π-calculus. In: Fifth Ifip International Conference On Theoretical Computer Science, pp. 477–489 (2008)
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)
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)
Milner, R.: A calculus of communicating systems, vol. 92. Springer, Heidelberg (1980)
Nyström, S.: A soft-typing system for Erlang. In: ACM Sigplan Erlang Workshop, pp. 56–71 (2003)
Ong, C.-H.L., Ramsay, S.J.: Verifying higher-order functional programs with pattern-matching algebraic data types. In: POPL, pp. 587–598 (2011)
Park, Y.G., Goldberg, B.: Escape analysis on lists. ACM SIGPLAN Notices 27, 116–127 (1992)
Pike, R.: Concurrency and message passing in Newsqueak. Google Talks Archive, http://youtu.be/hB05UFqOtFA
Rackoff, C.: The covering and boundedness problems for vector addition systems. Theoretical Computer Science 6, 223–231 (1978)
Reppy, J.H., Xiao, Y.: Specialization of CML message-passing primitives. In: POPL, pp. 315–326 (2007)
Shivers, O.: Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University (1991)
Van Horn, D., Might, M.: Abstracting abstract machines. In: ICFP, pp. 51–62 (2010)
Venet, A.: Abstract interpretation of the pi-calculus. In: LOMAPS, pp. 51–75 (1996)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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)