A Path Sensitive Type System for Resource Usage Verification of C Like Languages

  • Hyun-Goo Kang
  • Youil Kim
  • Taisook Han
  • Hwansoo Han
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3780)


In this paper, we present a path sensitive type system for resource usage verification. Path sensitivity is essential to model resource usage in C programs correctly and accurately. So far, most of methods to analyze this kind of property in the path sensitive way have been proposed as whole program analyses or unsound analyses. Our main contributions are as follows. First, we formalize a sound analysis for path sensitive resource usage properties in C like languages. To the best of our knowledge, it is the first sound and modular analysis for this problem. We provide the complete proof for the soundness of the type system and algorithm. Second, our analysis is modular, and we provide an inference algorithm to generate function summaries automatically. We believe that our approach suggests new insights into the design of modular analyses.


False Alarm Type System Resource Usage Resource State Inference Algorithm 
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.
    Aiken, A., Fähndrich, M., Levien, R.: Better Static Memory Management: Improving Region-Based Analysis of Higher-Order Languages. In: PLDI (1995)Google Scholar
  2. 2.
    Ball, T., Rajamani, S.: The SLAM Project: Debugging System Software via Static Analysis. In: POPL (2002)Google Scholar
  3. 3.
    Chaki, S., Clarke, E., Groce, A., Jha, S., Veith, H.: Modular Verification of Software Components in C. In: ICSE (2003)Google Scholar
  4. 4.
    Clarke, E., Kroening, D., Lerda, F.: A Tool for Checking ANSI-C Programs. In: Jensen, K., Podelski, A. (eds.) TACAS 2004. LNCS, vol. 2988, pp. 168–176. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  5. 5.
    Das, M., Lerner, S., Seigle, M.: ESP: Path-Sensitive Program Verification in Polynomial Time. In: PLDI (2002)Google Scholar
  6. 6.
    DeLine, R., Fähndrich, M.: Enforcing High-Level Protocols in Low-Level Software. In: PLDI (2001)Google Scholar
  7. 7.
    Dor, N., Adams, S., Das, M., Yang, Z.: Software Validation via Scalable Path-Sensitive Value Flow Analysis. In: ISSTA (2004)Google Scholar
  8. 8.
    Engler, D., Chelf, B., Chou, A., Hallem, S.: Checking System Rules Using System-Specific, Programmer-Written Compiler Extensions. In: OSDI (2000)Google Scholar
  9. 9.
    Fähndrich, M., DeLine, R.: Typestates for Objects. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 465–490. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  10. 10.
    Field, J., Goyal, D., Ramalingam, G., Yahav, E.: Typestate Verification: Abstraction Techniques and Complexity Result. In: SAS (2003)Google Scholar
  11. 11.
    Flanagan, C., Abadi, M.: Object Types Against Races. In: CONCUR (1999)Google Scholar
  12. 12.
    Flanagan, C., Abadi, M.: Types for Safe Locking. In: Swierstra, S.D. (ed.) ESOP 1999. LNCS, vol. 1576, p. 91. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  13. 13.
    Flanagan, C., Leino, K., Lillibridge, M., Nelson, G., Saxe, J., State, R.: Extended Static Checking for Java. In: PLDI (2002)Google Scholar
  14. 14.
    Foster, J., Terauhi, T., Aiken, A.: Flow-Sensitive Type Qualifiers. In: PLDI (2002)Google Scholar
  15. 15.
    Freund, S., Mitchell, J.: The Type System for Object Initialization in the Java Bytecode Language. TOPLAS 21(6), 1196–1250 (1999)CrossRefGoogle Scholar
  16. 16.
    Henzinger, T., Jhala, R., Majumdar, R., Sutre, G.: Software Verification with BLAST. In: 10th International SPIN Workshop (2003)Google Scholar
  17. 17.
    Igarashi, A., Kobayashi, N.: Resource Usage Analysis. In: POPL (2002)Google Scholar
  18. 18.
    Kang, H.-G., Kim, Y., Han, T., Han, H.: A Path Sensitive Type System for Resource Usage Verification of C like Languages (2005),
  19. 19.
    Kobayashi, N.: Quasi-Linear Types. In: POPL (1999)Google Scholar
  20. 20.
    Kobayashi, N.: Time Regions and Effects for Resource Usage Analysis. In: TLDI (2003)Google Scholar
  21. 21.
    Laneve, C.: A Type System for JVM Threads. Theoretical Computer Science 290(1), 741–778 (2003)zbMATHCrossRefMathSciNetGoogle Scholar
  22. 22.
    Lee, O., Yang, H., Yi, K.: Inserting Safe Memory Reuse Commands into ML-like Programs. In: SAS (2003)Google Scholar
  23. 23.
    Moskewicz, M., Madigan, C., Zhao, Y., Zhang, L., Malik, S.: Chaff: Engineering an Efficient SAT Solver. In: DAC (2001)Google Scholar
  24. 24.
    Shapiro, M., Horwitz, S.: The Effects of the Precision of Pointer Analysis. In: SAS (1997)Google Scholar
  25. 25.
    Smith, G.: Polymorphic Type Inference for Languages with Overloading and Subtyping. PhD thesis, Cornell University (August 1991)Google Scholar
  26. 26.
    SPEC. SPEC Benchmarks Suite,
  27. 27.
    Strom, R., Yemini, S.: Typestate: A Programming Language Concept for Enhancing Software Reliability. IEEE Transactions on Software Engineering 12(1), 157–171 (1986)Google Scholar
  28. 28.
    Tan, G., Ou, X., Walker, D.: Enforcing Resource Usage Protocols via Scoped Methods. In: FOOL (2003)Google Scholar
  29. 29.
    Tofte, M., Birkedal, L.: A Region Inference Algorithm. TOPLAS 20(4), 734–767 (1998)CrossRefGoogle Scholar
  30. 30.
    Walker, D., Crary, K., Morriset, G.: Typed Memory Management via Static Capabilities. TOPLAS 22(4), 701–771 (2000)CrossRefGoogle Scholar
  31. 31.
    Xie, Y., Aiken, A.: Scalable Error Detection using Boolean Satisfiability. In: POPL, pp. 351–363 (2005)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Hyun-Goo Kang
    • 1
  • Youil Kim
    • 1
  • Taisook Han
    • 1
  • Hwansoo Han
    • 1
  1. 1.Department of Computer ScienceKorea Advanced Institute of Science and Technology 

Personalised recommendations