Resource Usage Analysis for the π-Calculus

  • Naoki Kobayashi
  • Kohei Suenaga
  • Lucian Wischik
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3855)


We propose a type-based resource usage analysis for the (pi)-calculus extended with resource creation/access primitives. The goal of the resource usage analysis is to statically check that a program accesses resources such as files and memory in a valid manner. Our type system is an extension of previous behavioral type systems for the pi-calculus, and can guarantee the safety property that no invalid access is performed, as well as the property that necessary accesses (such as the close operation for a file) are eventually performed unless the program diverges. A sound type inference algorithm for the type system is also developed to free the programmer from the burden of writing complex type annotations. Based on the algorithm, we have implemented a prototype resource usage analyzer for the π-calculus. To the authors’ knowledge, ours is the first type-based resource usage analysis that deals with an expressive concurrent language like the π-calculus.


Model Check Type System Resource Usage Operational Semantic Regular Language 
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.
    Ball, T., Cook, B., Levin, V., Rajamani, S.K.: SLAM and static driver verifier: Technology transfer of formal methods inside microsoft. In: Boiten, E.A., Derrick, J., Smith, G.P. (eds.) IFM 2004. LNCS, vol. 2999, pp. 1–20. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  2. 2.
    Ball, T., Rajamani, S.K.: The SLAM project: Debugging system software via static analysis. In: Proc. of POPL, pp. 1–3 (2002)Google Scholar
  3. 3.
    Chaki, S., Rajamani, S., Rehof, J.: Types as models: Model checking message-passing programs. In: Proc. of POPL, pp. 45–57 (2002)Google Scholar
  4. 4.
    Dam, M.: Model checking mobile processes. Information and Computation 129(1), 35–51 (1996)zbMATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    DeLine, R., Fähndrich, M.: Enforcing high-level protocols in low-level software. In: Proc. of PLDI, pp. 59–69 (2001)Google Scholar
  6. 6.
    DeLine, R., Fähndrich, M.: Adoption and focus: Practical linear types for imperative programming. In: Proc. of PLDI (2002)Google Scholar
  7. 7.
    Foster, J.S., Terauchi, T., Aiken, A.: Flow-sensitive type qualifiers. In: Proc. of PLDI, pp. 1–12 (2002)Google Scholar
  8. 8.
    Igarashi, A., Kobayashi, N.: A generic type system for the pi-calculus. Theor. Comput. Sci. 311(1-3), 121–163 (2004)zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Igarashi, A., Kobayashi, N.: Resource usage analysis. ACM Trans. Prog. Lang. Syst. 27(2), 264–313 (2005); Preliminary summary appeared in Proceedings of POPL 2002CrossRefGoogle Scholar
  10. 10.
    Kobayashi, N.: Type-based information flow analysis for the pi-calculus. In: Acta Informatica (to appear)Google Scholar
  11. 11.
    Kobayashi, N.: TyPiCal: A type-based static analyzer for the pi-calculus. Tool available at,
  12. 12.
    Kobayashi, N.: A partially deadlock-free typed process calculus. ACM Trans. Prog. Lang. Syst. 20(2), 436–482 (1998)CrossRefGoogle Scholar
  13. 13.
    Kobayashi, N.: A type system for lock-free processes. Info. Comput. 177, 122–159 (2002)zbMATHGoogle Scholar
  14. 14.
    Kobayashi, N., Saito, S., Sumii, E.: An implicitly-typed deadlock-free process calculus. In: Palamidessi, C. (ed.) CONCUR 2000. LNCS, vol. 1877, pp. 489–503. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  15. 15.
    Kobayashi, N., Suenaga, K., Wischik, L.: Resource usage analysis for the pi-calculus. Full version (2005),
  16. 16.
    Marriott, K., Stuckey, P.J., Sulzmann, M.: Resource usage verification. In: Ohori, A. (ed.) APLAS 2003. LNCS, vol. 2895, pp. 212–229. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  17. 17.
    Milner, R.: Communication and Concurrency. Prentice-Hall, Englewood Cliffs (1989)zbMATHGoogle Scholar
  18. 18.
    Nguyen, N., Rathke, J.: Typed static analysis for concurrent, policy-based, resource access control. draftGoogle Scholar
  19. 19.
    Peterson, J.L.: Petri Net Theory and the Modeling of Systems. Prentice-Hall, Englewood Cliffs (1981)Google Scholar
  20. 20.
    Skalka, C., Smith, S.: History effects and verification. In: Chin, W.-N. (ed.) APLAS 2004. LNCS, vol. 3302, pp. 107–128. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  21. 21.
    Victor, B., Moller, F.: The Mobility Workbench — a tool for the π-calculus. In: Dill, D.L. (ed.) CAV 1994. LNCS, vol. 818, pp. 428–440. Springer, Heidelberg (1994)Google Scholar
  22. 22.
    Yang, P., Ramakrishnan, C.R., Smolka, S.A.: A logical encoding of the pi-calculus: Model checking mobile processes using tabled resolution. In: Zuck, L.D., Attie, P.C., Cortesi, A., Mukhopadhyay, S. (eds.) VMCAI 2003. LNCS, vol. 2575, pp. 116–131. Springer, Heidelberg (2002)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Naoki Kobayashi
    • 1
  • Kohei Suenaga
    • 2
  • Lucian Wischik
    • 3
  1. 1.Tohoku University 
  2. 2.University of Tokyo 
  3. 3.Microsoft Corporation 

Personalised recommendations