skip to main content
article

Generalized typestate checking using set interfaces and pluggable analyses

Authors Info & Claims
Published:01 March 2004Publication History
Skip Abstract Section

Abstract

We present a generalization of standard typestate systems in which the typestate of each object is determined by its membership in a collection of abstract typestate sets. This generalization supports typestates that model participation in abstract data types, composite typestates that correspond to membership in multiple sets, and hierarchical typestates. Because membership in typestate sets corresponds directly to participation in data structures, our typestate system characterizes global sharing patterns.In our approach, each module encapsulates a data structure and uses membership in abstract sets to characterize how objects participate in its data structure. Each analysis verifies that the implementation of the module 1) preserves important internal data structure representation invariants and 2) conforms to a specification that uses formulas in a set algebra to characterize the effects of operations on the data structure. The analyses use the common set abstraction to 1) characterize how objects participate in multiple data structures and to 2) enable the inter-analysis communication required to verify properties that depend on multiple modules analyzed by different analyses.

References

  1. L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994.]]Google ScholarGoogle Scholar
  2. B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Mine, D. Monniaux, and X. Rival. Design and implementation of a special-purpose static program analyzer for safety-critical real-time embedded software. In Essays Dedicated to Neil D. Jones, volume 2566 of LNCS, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. L. Burdy, Y. Cheon, D. Cok, M. D. Ernst, J. Kiniry, G. T. Leavens, K. R. M. Leino, and E. Poll. An overview of jml tools and applications. Technical Report NII-R0309, Computing Science Institute, Univ. of Nijmegen, March 2003.]]Google ScholarGoogle Scholar
  4. D. Chase, M. Wegman, and F. Zadek. Analysis of pointers and structures. In Proceedings of the SIGPLAN '90 Conference on Program Language Design and Implementation, pages 296--310, White Plains, NY, June 1990. ACM, New York.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. R. Cheriton and M. E. Wolf. Extensions for multi-module records in conventional programming languages. In Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, pages 296--306. ACM Press, 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. R. DeLine and M. Fähndrich. Enforcing high-level protocols in low-level software. In Proceedings of the SIGPLAN '01 Conference on Program Language Design and Implementation, Snowbird, UT, June 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. DeLine and M. F-ahndrich. Typestates for objects. In 18th ECOOP, 2004.]]Google ScholarGoogle ScholarCross RefCross Ref
  8. M. Emami, R. Ghiya, and L. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of the SIGPLAN '94 Conference on Program Language Design and Implementation, pages 242--256, Orlando, FL, June 1994. ACM, New York.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Fahndrich and R. DeLine. Adoption and focus: Practical linear types for imperative programming. In Proceedings of the SIGPLAN '02 Conference on Program Language Design and Implementation, Berlin, Germany, June 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. M. Fahndrich and R. Leino. Heap monotonic typestates. In Proceedings of the first international workshop on alias confinement and ownership (IWACO 03), Darmstadt, Germany, July 2003.]]Google ScholarGoogle Scholar
  11. C. Flanagan, K. R. M. Leino, M. Lilibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended Static Checking for Java. In Proc. ACM PLDI, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. R. Ghiya and L. Hendren. Is it a tree, a DAG or a cyclic graph? a shape analysis for heap-directed pointers in C. In Proceedings of the 23rd Annual ACM Symposium on the Principles of Programming Languages, pages 1--15, Jan. 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. B. P. F. Jacobs and E. Poll. Java program verification at nijmegen: Developments and perspective. Technical Report NIII-R0318, Nijmegen Institute of Computing and Information Sciences, September 2003.]]Google ScholarGoogle Scholar
  14. N. Klarlund and M. I. Schwartzbach. Graph types. In Proc. 20th ACM POPL, Charleston, SC, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. V. Kuncak, P. Lam, and M. Rinard. Role analysis. In Proceedings of the 29th Annual ACM Symposium on the Principles of Programming Languages, Portland, OR, Jan. 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. P. Lam, V. Kuncak, and M. Rinard. On modular pluggable analyses using set interfaces. Technical Report 933, MIT CSAIL, 2003.]]Google ScholarGoogle Scholar
  17. A. Møller and M. I. Schwartzbach. The Pointer Assertion Logic Engine. In Proc. ACM PLDI, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. P. O'Hearn, J. Reynolds, and H. Yang. Local reasoning about programs that alter data structures. In Proceedings of CSL'01, Paris, France, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. M. Sagiv, T. Reps, and R. Wilhelm. Parametric shape analysis via 3-valued logic. ACM TOPLAS, 24(3):217--298, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. B. Steensgaard. Points-to analysis in almost linear time. In Proceedings of the 23rd Annual ACM Symposium on the Principles of Programming Languages, St. Petersburg Beach, FL, Jan. 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. R. Strom and S. Yemini. Typestate: A programming language concept for enh ancing software reliability. IEEE Transactions on Software Engineering, 12(1), Jan. 1986.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. R. Wilson and M. Lam. Efficient context-sensitive pointer analysis for C programs. In Proceedings of the SIGPLAN '95 Conference on Program Language Design and Implementation, La Jolla, CA, June 1995. ACM, New York.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 39, Issue 3
    March 2004
    47 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/981009
    Issue’s Table of Contents

    Copyright © 2004 Authors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 1 March 2004

    Check for updates

    Qualifiers

    • article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader