Advertisement

Distinctness and Sharing Domains for Static Analysis of Java Programs

  • Isabelle Pollet
  • Baudouin Le Charlier
  • Agostino Cortesi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2072)

Abstract

The application field of static analysis techniques for objectoriented programming is getting broader, ranging from compiler optimizations to security issues. This leads to the need of methodologies that support reusability not only at the code level but also at higher (semantic) levels, in order to minimize the effort of proving correctness of the analyses. Abstract interpretation may be the most appropriate approach in that respect. This paper is a contribution towards the design of a general framework for abstract interpretation of Java programs. We introduce two generic abstract domains that express type, structural, and sharing information about dynamically created objects. These generic domains can be instantiated to get specific analyses either for optimization or verification issues. The semantics of the domains are precisely defined by means of concretization functions based on mappings between concrete and abstract locations. The main abstract operations, i.e., upper bound and assignment, are discussed. An application of the domains to source-to-source program specialization is sketched to illustrate the effectiveness of the analysis.

Keywords

Abstract Interpretation Static Analysis Type Analysis Program Specialization 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    O. Agesen. Constrained-based type inference and parametric polymorphism. In B. Le Charlier, editor, Proceedings of the First International Symposium on Static Analysis (SAS’94), number 864 in LNCS, Namur, September 1994. Springer-Verlag.Google Scholar
  2. [2]
    P. S. Almeida. Balloon Types: Controlling Sharing of State in Data Types. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP’97), 1997.Google Scholar
  3. [3]
    B. Blanchet. Escape analysis for object oriented languages. application to java. In Proceedings of the Conference on Object-Oriented Programming, Systems, Languages and Applications Static Analysis (OOPSLA’99), November 1999.Google Scholar
  4. [4]
    M. Bruynooghe. A practical framework for the abstract interpretation of logic programs. Journal of Logic Programming, 10(2):91–124, February 1991.CrossRefzbMATHMathSciNetGoogle Scholar
  5. [5]
    C. Chambers, J. Dean, and D. Grove. Whole-Program Optimization of Object-Oriented Languages. Technical report, Department of Computer Science and Engineering, University of Washington, Box 352350, Seattle, Washington 98195-2350 USA.Google Scholar
  6. [6]
    D. R. Chase, M. Wegman, and F. K. Zadeck. Analysis of Pointer and Structures. In Proceedings of the ACM SIGPLAN’90 Conference on Programming Language and Implementation, White-Plains, New-York, June 1990.Google Scholar
  7. [7]
    A. Cortesi, B. Le Charlier, and P. Van Hentenryck. Combination of abstract domains for logic programming. In Proceedings of the 21th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’94), Portland, Oregon, January 1994.Google Scholar
  8. [8]
    A. Cortesi, B. Le Charlier, and P. Van Hentenryck. Type analysis of prolog using type graphs. Journal of Logic Programming, 23(3):237–278, June 1995.zbMATHCrossRefMathSciNetGoogle Scholar
  9. [9]
    P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Conference Record of Fourth ACM Symposium on Programming Languages (POPL’77), pages 238–252, Los Angeles, California, January 1977.Google Scholar
  10. [10]
    P. Cousot and R. Cousot. Systematic design of program analysis frameworks. In Conference Record of Sixth ACM Symposium on Programming Languages (POPL’79), pages 269–282, Los Angeles, California, January 1979.Google Scholar
  11. [11]
    A. Deutsch. A storeless model of aliasing and its abstraction using finite representations of right-regular equivalence relations. In Proceedings of the 1992 International Conference on Computer Languages, pages 2–13, Oakland, California, April 1992. IEEE Computer Society Press, Los Alamitos, California.CrossRefGoogle Scholar
  12. [12]
    A. Deutsch. Interprocedural May-Alias Analysis for Pointers: Beyond k-Limiting. In Proceedings of the ACM SIGPLAN’94 Conference on Programming Language and Implementation, pages 230–241, Orlando, Florida, June 1994.Google Scholar
  13. [13]
    A. Deutsch. Semantic models and abstract interpretation for inductive data structures and pointers. In Proceedings of the ACM Symposium on Partial Evaluation and Semantics-Based program Manipulation(PEPM’95), pages 226–228, New-York, June 1995.Google Scholar
  14. [14]
    N. Dor, M. Rodeh, and M. Sagiv. Checking cleanness in linked lists. In Proceedings of the Seventh International Symposium on Static Analysis (SAS’2000), LNCS. Springer-Verlag, September 2000.Google Scholar
  15. [15]
    V. Englebert, B. Le Charlier, D. Roland, and P. Van Hentenryck. Generic abstract interpretation algorithms for prolog: Two optimization techniques and their experimental evaluation. Software Practice and Experience, 23(4):419–459, April 1993.CrossRefGoogle Scholar
  16. [16]
    D. Evans. Static detection of dynamic memory errors. In Proceedings of the ACM SIGPLAN’96 Conference on Programming Language and Implementation, 1996.Google Scholar
  17. [17]
    P. Fradet, R. Gaugne, and D. Le Métayer. Static detection of pointer errors: an axiomatisation and a checking algorithm. In Proceedings of the European Symposium on Programming (ESOP’96), LNCS, 1996.Google Scholar
  18. [18]
    G. Janssens and M. Bruynooghe. Deriving descriptions of possible values of program variables by means of abstract interpretation. Journal of Logic Programming, 13(2-3):205–258, 1992.zbMATHCrossRefMathSciNetGoogle Scholar
  19. [19]
    B. Le Charlier and P. Van Hentenryck. Experimental Evaluation of a Generic Abstract Interpretation Algorithm for Prolog. ACM Transactions on Programming Languages and Systems (TOPLAS), 16(1):35–101, January 1994.CrossRefGoogle Scholar
  20. [20]
    K. Musumbu. Interprétation Abstraite de Programmes Prolog. PhD thesis, Institute of Computer Science, University of Namur, Belgium, September 1990. In French.Google Scholar
  21. [21]
    F. Nielson, H. R. Nielson, and C. Hankin. Principles of Program Analysis. Springer-Verlag, 1999.Google Scholar
  22. [22]
    I. Pollet. Smantiques opérationnelles et domaines abstraits pour l’analyse statique de Java. DEA thesis, University of Namur, Belgium, September 1999.Google Scholar
  23. [23]
    I. Pollet, B. Le Charlier, and A. Cortesi. Distinctness and Sharing Domains for Static Analysis of Java Programs. Research Paper RP-01-003, Institute of Computer Science, University of Namur, Belgium, 2001.Google Scholar
  24. [24]
    M. Sagiv, T. Reps, and R. Wilhelm. Parametric shape analysis via 3-valued logic. In Proceedings of the 26th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’99), San Antonio, January 1999.Google Scholar
  25. [25]
    M. Sagiv, T. Reps, and R. Wilhem. Solving shape-analysis problems in languages with destructive updating. ACM Transactions on Programming Languages and Systems (TOPLAS), 20(1):1–50, January 1998.CrossRefGoogle Scholar
  26. [26]
    U. Schultz, J. Lawall, C. Consel, and G. Muller. Towards automatic specialization of Java programs. In Proceedings of ECOOP’99, pages 367–390, 1999.Google Scholar
  27. [27]
    J. Stransky. A Lattice for Abstract Interpretation of Dynamic (lisp-like) Structure. Information and Computation, 101:70–102, 1992.zbMATHCrossRefMathSciNetGoogle Scholar
  28. [28]
    P. Van Hentenryck, A. Cortesi, and B. Le Charlier. Evaluation of Prop. Journal of Logic Programming, 23(3):237–278, June 1995.zbMATHGoogle Scholar
  29. [29]
    E. Yahav. Verifying Safety Properties of Concurrent Java Programs Using 3-Valued Logic. In Proc. of the 28 th ACM Symposium on Principles of Programming Languages (POPL’2001), January 2001.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Isabelle Pollet
    • 1
  • Baudouin Le Charlier
    • 1
  • Agostino Cortesi
    • 2
  1. 1.University of NamurBelgium
  2. 2.Ca’ Foscari UniversityItaly

Personalised recommendations