Skip to main content

Memory Usage Verification for OO Programs

  • Conference paper
Static Analysis (SAS 2005)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 3672))

Included in the following conference series:

Abstract

We present a new type system for an object-oriented (OO) language that characterizes the sizes of data structures and the amount of heap memory required to successfully execute methods that operate on these data structures. Key components of this type system include type assertions that use symbolic Presburger arithmetic expressions to capture data structure sizes, the effect of methods on the data structures that they manipulate, and the amount of memory that methods allocate and deallocate. For each method, we conservatively capture the amount of memory required to execute the method as a function of the sizes of the method’s inputs. The safety guarantee is that the method will never attempt to use more memory than its type expressions specify. We have implemented a type checker to verify memory usages of OO programs. Our experience is that the type system can precisely and effectively capture memory bounds for a wide range of programs.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Aldrich, J., Kostadinov, V., Chambers, C.: Alias Annotation for Program Understanding. In: ACM OOPSLA, Seattle, Washington (November 2002)

    Google Scholar 

  2. Alpern, B., Attanasio, D., Barton, J.J., Cocchi, A., Hummel, S.F., Lieber, D., Mergen, M., Ngo, T., Shepherd, J., Smith, S.: Implementing Jalapeño in Java. In: ACM OOPSLA, Denver, Colorado (November 1999)

    Google Scholar 

  3. Aspinall, D., Compagnoni, A.: Heap bounded assembly language. Journal of Automated Reasoning 31, 261–302 (2003)

    Article  MATH  Google Scholar 

  4. Berger, E.D., Zorn, B.G., Mckinley, K.S.: Reconsidering Custom Memory Allocation. In: ACM OOPSLA (November 2002)

    Google Scholar 

  5. Boyland, J., Noble, J., Retert, W.: Capabilities for sharing. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, p. 2. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  6. Cachera, D., Jensen, T., Pichardie, D., Schneider, G.: Certified memory usage analysis. In: Fitzgerald, J.S., Hayes, I.J., Tarlecki, A. (eds.) FM 2005. LNCS, vol. 3582, pp. 91–106. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  7. Carlisle, M.C., Rogers, A.: Software caching and computation migration in Olden. In: 4th Principles and Practice of Parallel Programming, Santa Barbara, California (May 1993)

    Google Scholar 

  8. Chan, E.C., Boyland, J., Scherlis, W.L.: Promises: Limited Specifications for Analysis and Manipulation. In: Proceedings of the International Conference on Software Engineering, Kyoto, Japan, April 1998, pp. 167–176 (1998)

    Google Scholar 

  9. Chin, W.N., Khoo, S.C., Qin, S.C., Popeea, C., Nguyen, H.H.: Verifying Safety Policies with Size Properties and Alias Controls. In: Inverardi, P., Jazayeri, M. (eds.) ICSE 2005. LNCS, vol. 4309, Springer, Heidelberg (2006)

    Google Scholar 

  10. Chin, W.N., Nguyen, H.H., Qin, S.C., Rinard, M.: Predictable Memory Usage for Object-Oriented Programs. Technical report, SoC, Natl Univ. of Singapore (November 2004), avail. at, http://www.dur.ac.uk/shengchao.qin/papers/memj.ps.gz

  11. Christiansen, M.V., Velschow, P.: Region-Based Memory Management in Java. Master’s Thesis, Department of Computer Science (DIKU), University of Copenhagen (1998)

    Google Scholar 

  12. Fahndrich, M., Leino, R.: Declaring and checking non-null types in an object-oriented language. In: ACM OOPSLA, Anaheim, CA (October 2003)

    Google Scholar 

  13. Hoare, C.A.R., He, J.: Unifying Theories of Programming. Prentice-Hall, Englewood Cliffs (1998)

    Google Scholar 

  14. Hofmann, M., Jost, S.: Static prediction of heap space usage for first order functional programs. In: ACM POPL, New Orleans, Louisiana (January 2003)

    Google Scholar 

  15. Hughes, J., Pareto, L.: Recursion and Dynamic Data-Structures in Bounded Space: Towards Embedded ML Programming. In: Proceedings of the International Conference on Functional Programming (ICFP 1999) (September 1999)

    Google Scholar 

  16. IBM. JikesTM Research Virtual Machine (RVM), http://www-124.ibm.com/developerworks/oss/jikesrvm/

  17. Lamport, L.: The temporal logic of actions. ACM Trans. on Programming Languages and Systems 16(3), 872–923 (1994)

    Article  Google Scholar 

  18. Peyton-Jones, S., et al.: Glasgow Haskell Compiler, http://www.haskell.org/ghc

  19. Pugh, W.: The Omega Test: A fast practical integer programming algorithm for dependence analysis. Communications of the ACM 8, 102–114 (1992)

    Article  Google Scholar 

  20. Tofte, M., Talpin, J.: Region-based memory management. Information and Computation 132(2) (1997)

    Google Scholar 

  21. Xi, H., Pfenning, F.: Eliminating array bound checking through dependent types. In: ACM PLDI, June 1998. ACM Press, New York (1998)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Chin, WN., Nguyen, H.H., Qin, S., Rinard, M. (2005). Memory Usage Verification for OO Programs. In: Hankin, C., Siveroni, I. (eds) Static Analysis. SAS 2005. Lecture Notes in Computer Science, vol 3672. Springer, Berlin, Heidelberg. https://doi.org/10.1007/11547662_7

Download citation

  • DOI: https://doi.org/10.1007/11547662_7

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-28584-7

  • Online ISBN: 978-3-540-31971-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics