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.
- L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994.]]Google Scholar
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- R. DeLine and M. F-ahndrich. Typestates for objects. In 18th ECOOP, 2004.]]Google ScholarCross Ref
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 Scholar
- N. Klarlund and M. I. Schwartzbach. Graph types. In Proc. 20th ACM POPL, Charleston, SC, 1993.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- P. Lam, V. Kuncak, and M. Rinard. On modular pluggable analyses using set interfaces. Technical Report 933, MIT CSAIL, 2003.]]Google Scholar
- A. Møller and M. I. Schwartzbach. The Pointer Assertion Logic Engine. In Proc. ACM PLDI, 2001.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- M. Sagiv, T. Reps, and R. Wilhelm. Parametric shape analysis via 3-valued logic. ACM TOPLAS, 24(3):217--298, 2002.]] Google ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
- 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 ScholarDigital Library
Recommendations
Typestate-like analysis of multiple interacting objects
This paper presents a static analysis of typestate-like temporal specifications of groups of interacting objects, which are expressed using tracematches. Whereas typestate expresses a temporal specification of one object, a tracematch state may change ...
Extending Typestate Checking Using Conditional Liveness Analysis
The authors present a practical extension to typestate checking, which is capable of proving programs free of uninitialized variable errors even when these programs contain conditionally initialized variables where the initialization of a variable ...
Typestate-like analysis of multiple interacting objects
OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applicationsThis paper presents a static analysis of typestate-like temporal specifications of groups of interacting objects, which are expressed using tracematches. Whereas typestate expresses a temporal specification of one object, a tracematch state may change ...
Comments