Detection of Asynchronous Message Passing Errors Using Static Analysis
Concurrent programming is hard and prone to subtle errors. In this paper we present a static analysis that is able to detect some commonly occurring kinds of message passing errors in languages with dynamic process creation and communication based on asynchronous message passing. Our analysis is completely automatic, fast, and strikes a proper balance between soundness and completeness: it is effective in detecting errors and avoids false alarms by computing a close approximation of the interprocess communication topology of programs. We have integrated our analysis in dialyzer, a widely used tool for detecting software defects in Erlang programs, and demonstrate its effectiveness on libraries and applications of considerable size. Despite the fact that these applications have been developed over a long period of time and are reasonably well-tested, our analysis has managed to detect a significant number of previously unknown message passing errors in their code.
KeywordsFalse Alarm Message Passing Communication Graph Program Point Call Graph
Unable to display preview. Download preview PDF.
- 1.Armstrong, J.: Programming Erlang: Software for a Concurrent World. The Pragmatic Bookshelf, Raleigh (2007)Google Scholar
- 3.Sagonas, K.: Experience from developing the Dialyzer: A static analysis tool detecting defects in Erlang applications. In: Proceedings of the ACM SIGPLAN Workshop on the Evaluation of Software Defect Detection Tools (2005)Google Scholar
- 5.Carlsson, R.: An introduction to Core Erlang. In: Proceedings of the PLI 2001 Workshop on Erlang (2001)Google Scholar
- 7.Lindahl, T., Sagonas, K.: Practical type inference based on success typings. In: Proceedings of the 8th ACM SIGPLAN International Conference on Principles and Practice of Declarative Programming, pp. 167–178. ACM, New York (2006)Google Scholar
- 9.Shivers, O.: Control Flow Analysis in Scheme. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 164–174. ACM, New York (1988)Google Scholar
- 10.Nielson, F., Nielson, H.R.: Infinitary Control Flow Analysis: a Collecting Semantics for Closure Analysis. In: Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 332–345. ACM, New York (1997)Google Scholar
- 11.Nielson, F., Nielson, H.R.: Higher-Order Concurrent Programs with Finite Communication Topology. In: Proceedings of the ACM-SIGPLAN Symposium on Principles of Programming Languages, pp. 84–97. ACM, New York (1994)Google Scholar
- 14.Colby, C.: Analyzing the Communication Topology of Concurrent Programs. In: Proceedings of the ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation, pp. 202–213. ACM, New York (1995)Google Scholar