Type-based analysis of communication for concurrent programming languages

  • Atsushi Igarashi
  • Naoki Kobayashi
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1302)


Powerful concurrency primitives in recent concurrent languages and thread libraries provide the great flexibility about implementation of high-level features like concurrent objects. However, they are so low-level that they often make it difficult to check global correctness of programs or to perform aggressive code optimization. We propose a static analysis method for inferring how many times each communication channel is used during execution of concurrent programs: a type system that is sensitive to usage information is constructed for this purpose and a type reconstruction algorithm is developed. Our analysis can, in particular, automatically detect linear channels (communication channels used just once): as studied by Kobayashi, Pierce, and Turner, they are very useful for reasoning about program behavior and aggressive code optimization. Our analysis has already been implemented and applied to the compiler of a concurrent language HACL; we present the results of simple benchmarks to show performance improvement gained by our analysis.


Process Expression Typing Rule Type Environment Principal Typing Type Annotation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Andrew W. Appel. Compiling with Continuations. Cambridge Univ. Press, 1992.Google Scholar
  2. 2.
    Christopher Colby. Analyzing the communication topology of concurrent programs. In ACM PEPM'95, 1995.Google Scholar
  3. 3.
    Atsushi Igarashi. Type-based analysis of usage of values for concurrent programming languages. Master's thesis, University of Tokyo, February 1997.Google Scholar
  4. 4.
    Atsushi Igarashi and Naoki Kobayashi. Type-based analysis of communication for concurrent programming languages. Technical Report 97-03, Department of Information Science, University of Tokyo, June 1997.Google Scholar
  5. 5.
    P.C. Kanellakis, H.G. Mairson, and J.C. Mitchell. Unification and ML type reconstruction. In Computational Logic, Essays in Honor of Alan Robinson, pages 444–478. MIT Press, 1991.Google Scholar
  6. 6.
    Naoki Kobayashi. A partially deadlock-free typed process calculus. In IEEE LICS, 1997.Google Scholar
  7. 7.
    Naoki Kobayashi, Motoki Nakade, and Akinori Yonezawa. Static analysis of communication for asynchronous concurrent programming languages. In SAS'95, volume 983 of LNCS, pages 225–242. Springer-Verlag, 1995.Google Scholar
  8. 8.
    Naoki Kobayashi, Benjamin C. Pierce, and David N. Turner. Linearity and the pi-calculus. In ACM POPL'96, pages 358–371, January 1996.Google Scholar
  9. 9.
    Naoki Kobayashi and Akinori Yonezawa. Higher-order concurrent linear logic programming. In Theory and Practice of Parallel Programming, volume 907 of LNCS, pages 137–166. Springer-Verlag, 1995.Google Scholar
  10. 10.
    Nicolas Mercouroff. An algorithm for analyzing communicating processes. In S. Brookes, M. Main, A. Melton, M. Mislove, and D. Schmidt, editors, Mathematical Foundations of Programming Semantics, volume 598 of LNCS, pages 312–325. Springer-Verlag, 1991.Google Scholar
  11. 11.
    Robin Milner. The polyadic π-calculus: a tutorial. Technical Report ECS-LFCS-91-180, Laboratory for Foundations of Computer Science, Department of Computer Science, University of Edinburgh, UK, 1991.Google Scholar
  12. 12.
    Hanne Riis Nielson and Flemming Nielson. Higher-order concurrent programs with finite communication topology. In ACM POPL'94, pages 84–97, 1994.Google Scholar
  13. 13.
    Hanne Riis Nielson and Flemming Nielson. Static and dynamic processor allocation for higher-order concurrent languages. In TAPSOFT'95: Theory and Practice of Software Development, LNCS, pages 590–604. Springer-Verlag, 1995.Google Scholar
  14. 14.
    Benjamin C. Pierce and Davide Sangiorgi. Typing and subtyping for mobile processes. In IEEE LICS'93, pages 376–385, 1993.Google Scholar
  15. 15.
    Benjamin C. Pierce and David N. Turner. Pict: A programming language based on the pi-calculus. Technical report, Computer Science Department, Indiana University, 1997. To appear in Milner Festschrift, MIT Press, 1997.Google Scholar
  16. 16.
    John H. Reppy. CML: A higher-order concurrent language. In ACM PLDI'91, pages 293–305, 1991.Google Scholar
  17. 17.
    David N. Turner, Philip Wadler, and Christian Mossin. Once upon a type. In ACM FPCA'95, San Diego, California, 1995.Google Scholar
  18. 18.
    Akinori Yonezawa. ABCL: An Object-Oriented' Concurrent System. MIT Press, 1990.Google Scholar
  19. 19.
    Akinori Yonezawa and Mario Tokoro. Object-Oriented Concurrent Programming. The MIT Press, 1987. *** DIRECT SUPPORT *** A0008C44 00005Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1997

Authors and Affiliations

  • Atsushi Igarashi
    • 1
  • Naoki Kobayashi
    • 1
  1. 1.Department of Information ScienceUniversity of TokyoTokyoJapan

Personalised recommendations