skip to main content
10.1145/1449764.1449792acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Typestate-like analysis of multiple interacting objects

Published:19 October 2008Publication History

ABSTRACT

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 due to operations on any of a set of related objects bound by the tracematch. The paper proposes a lattice-based operational semantics equivalent to the original tracematch semantics but better suited to static analysis. The paper defines a static analysis that computes precise local points-to sets and tracks the flow of individual objects, thereby enabling strong updates of the tracematch state. The analysis has been proved sound with respect to the semantics. A context-sensitive version of the analysis has been implemented as instances of the IFDS and IDE algorithms. The analysis was evaluated on tracematches used in earlier work and found to be very precise. Remaining imprecisions could be eliminated with more precise modeling of references from the heap and of exceptional control flow.

References

  1. C. Allan, P. Avgustinov, A. Christensen, L. Hendren, S. Kuzins, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. Adding trace matching with free variables to AspectJ. OOPSLA '05: Proceedings of the 20th ACM SIGPLAN Conference on Object Oriented Programming Systems and Applications, pages 345--364, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. P. Avgustinov, A. Christensen, L. Hendren, S. Kuzins, J. Lhoták, O. Lhoták, O. de Moor, D. Sereni, G. Sittampalam, and J. Tibble. abc : An extensible AspectJ compiler. Transactions on Aspect-Oriented Software Development I, pages 293--334. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. P. Avgustinov, E. Hajiyev, N. Ongkingco, O. de Moor, D. Sereni, J. Tibble, and M. Verbaere. Semantics of static pointcuts in AspectJ. POPL '07: Proceedings of the 34th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 11--23, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. P. Avgustinov, J. Tibble, and O. de Moor. Making trace monitors feasible. OOPSLA '07: Proceedings of the 22nd ACM SIGPLAN Conference on Object Oriented Programming Systems and Applications, pages 589--608, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. K. Bierhoff and J. Aldrich. Lightweight object specification with typestates. ESEC/FSE 2005: Proceedings of the Joint 10th European Software Engineering Conference (ESEC) and the 13th ACM SIGSOFT Symposium on the Foundations of Software Engineering (FSE-13), pages 217--226, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. K. Bierhoff and J. Aldrich. Modular typestate checking of aliased objects. OOPSLA '07: Proceedings of the 22nd ACM SIGPLAN Conference on Object Oriented Programming Systems and Applications, pages 301--320, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. Blackburn, R. Garner, C. Hoffman, A. Khan, K. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, E. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. OOPSLA '06: Proceedings of the 21st ACM SIGPLAN Conference on Object Oriented Programming Systems and Applications, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. E. Bodden, L. Hendren, and O. Lhoták. A staged static program analysis to improve the performance of runtime monitoring. ECOOP '07: Proceedings of the 21st European Conference on Object-Oriented Programming, pages 525--549, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. E. Bodden, P. Lam, and L. Hendren. Finding programming errors earlier by evaluating runtime monitors ahead-of-time. FSE 2008: ACM SIGSOFT International Symposium on the Foundations of Software Engineering, Nov. 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. F. Chen and G. Roşu. Mop: an efficient and generic runtime verification framework. OOPSLA '07: Proceedings of the 22nd ACM SIGPLAN Conference on Object Oriented Programming Systems and Applications, pages 569--588, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. S. Cherem and R. Rugina. Compile--time deallocation of individual objects. ISMM '06: Proceedings of the 2006 International Symposium on Memory Management, pages 138--149, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. R. DeLine and M. Fahndrich. Enforcing high-level protocols in low-level software. PLDI '01: Proceedings of the 2001 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 59--69, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. DeLine and M. Fahndrich. Typestates for objects. ECOOP '04: Proceedings of the 18th European Conference on Object-Oriented Programming, pages 465--490, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  14. A. Deutsch. A storeless model of aliasing and its abstractions using finite representations of right--regular equivalence relations. ICCL '92: Proceedings of the 4th IEEE International Conference on Computer Languages, pages 2--13, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  15. B. Dufour. Objective quantification of program behaviour using dynamic metrics. Master's thesis, McGill University, 2004.Google ScholarGoogle Scholar
  16. M. B. Dwyer and R. Purandare. Residual dynamic typestate analysis: exploiting static analysis results to reformulate and reduce the cost of dynamic analysis. ASE '07: Proceedings of the twenty-second IEEE/ACM International Conference on Automated Software Engineering, pages 124--133, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Fink, E. Yahav, N. Dor, G. Ramalingam, and E. Geay. Effective typestate verification in the presence of aliasing. ISSTA '06: Proceedings of the International Symposium on Software Testing and Analysis, pages 133--144, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S. J. Fink, E. Yahav, N. Dor, G. Ramalingam, and E. Geay. Effective typestate verification in the presence of aliasing. ACM Trans. Softw. Eng. Methodol., 17(2):1--34, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. J. Foster, T. Terauchi, and A. Aiken. Flow--sensitive type qualifiers. PLDI '02: Proceedings of the 2002 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 1--12, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. S. Goldsmith, R. O'Callahan, and A. Aiken. Relational queries over program traces. OOPSLA '05: Proceedings of the 20th ACM SIGPLAN Conference on Object Oriented Programming Systems and Applications, pages 385--402, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. S. Guyer and C. Lin. Client-driven pointer analysis. SAS '03: Proceedings of the 10th Annual International Static Analysis Symposium, pages 214--236, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. Guyer and C. Lin. Error checking with client-driven pointer analysis. Sci. Comput. Program., 58(1--2):83--114, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. B. Hackett and R. Rugina. Region-based shape analysis with tracked locations. POPL '05: Proceedings of the 32nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 310--323, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. S. Hallem, B. Chelf, Y. Xie, and D. Engler. A system and language for building system-specific, static analyses. PLDI '02: Proceedings of the 2002 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 69--82, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. C. Jaspan and J. Aldrich. Checking semantic usage of frameworks. Library Centric Software Design Symposium, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. C. Jaspan and J. Aldrich. Checking temporal relations between multiple objects. Technical Report CMU-ISR-08-119, Carnegie Mellon University, Dec. 2008.Google ScholarGoogle ScholarCross RefCross Ref
  27. H. Jonkers. Abstract storage structures. de Bakker and van Vliet, editors, Algorithmic Languages, pages 321--343, 1981.Google ScholarGoogle Scholar
  28. O. Lhoták. Comparing call graphs. PASTE '07: Proceedings of the 7th ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 37--42, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. M. Martin, B. Livshits, and M. S. Lam. Finding application errors and security flaws using PQL: a program query language. OOPSLA '05: Proceedings of the 20th ACM SIGPLAN Conference on Object Oriented Programming Systems and Applications, pages 365--383, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. N. Naeem and O. Lhoták. Extending typestate analysis to multiple interacting objects. Technical Report CS-2008-04, University of Waterloo, 2008. http://www.cs.uwaterloo.ca/research/tr/2008/CS-2008-04.pdf.Google ScholarGoogle Scholar
  31. G. Ramalingam, A. Warshavsky, J. Field, D. Goyal, and M. Sagiv. Deriving specialized program analyses for certifying component-client conformance. PLDI '02: Proceedings of the 2002 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 83--94, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. POPL '95: Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 49--61, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. Sagiv, T. Reps, and S. Horwitz. Precise interprocedural dataflow analysis with applications to constant propagation. Theoretical Computer Science, 167(1--2):131--170, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. M. Sagiv, T. Reps, and R. Wilhelm. Solving shape--analysis problems in languages with destructive updating. ACM TOPLAS, 20(1):1--50, Jan. 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. R. E. Strom and S. Yemini. Typestate: A programming language concept for enhancing software reliability. IEEE Trans. Softw. Eng., 12(1):157--171, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Typestate-like analysis of multiple interacting objects

            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
            • Published in

              cover image ACM Conferences
              OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applications
              October 2008
              654 pages
              ISBN:9781605582153
              DOI:10.1145/1449764
              • cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 43, Issue 10
                September 2008
                613 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/1449955
                Issue’s Table of Contents

              Copyright © 2008 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 19 October 2008

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate268of1,244submissions,22%

              Upcoming Conference

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader