Advertisement

Abstract

Object models capture key properties of object-oriented architectures, and they can highlight relationships between types, occurrences of sharing, and object encapsulation. We present a dynamic analysis to extract object models from legacy code bases. Our analysis reconstructs each intermediate heap from a log of object allocations and field writes, applies a sequence of abstraction-based operations to each heap, and combines the results into a single object model that conservatively approximates all observed heaps from the program’s execution. The resulting object models reflect many interesting and useful architectural properties.

Keywords

Object Model Abstract Graph Abstract Syntax Tree Abstraction Function Concretization Function 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Aldrich, J.: Using types to enforce architectural structure (2006), available at: http://www.cs.cmu.edu/~aldrich/papers/
  2. 2.
    Aldrich, J., Chambers, C.: Ownership domains: Separating aliasing policy from mechanism. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 1–25. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  3. 3.
    Aldrich, J., Kostadinov, V., Chambers, C.: Alias annotations for program understanding. In: ACM Conference Object-Oriented Programming, Systems, Languages and Applications, pp. 311–330 (2002)Google Scholar
  4. 4.
    Ammons, G., Bodik, R., Larus, J.R.: Mining specifications. In: ACM Symposium on the Principles of Programming Languages, pp. 4–16 (2002)Google Scholar
  5. 5.
  6. 6.
    Byte Code Engineering Library (2006), http://jakarta.apache.org/bcel/
  7. 7.
    Booch, G., Rumbaugh, J., Jacobson, I.: The Unified Modeling Language User Guide, 2nd edn. Addison-Wesley, Reading (2005)Google Scholar
  8. 8.
    Boyapati, C., Liskov, B., Shrira, L.: Ownership types for object encapsulation. In: ACM Symposium on the Principles of Programming Languages, pp. 213–223 (2003)Google Scholar
  9. 9.
    Chase, D.R., Wegman, M.N., Zadeck, F.K.: Analysis of pointers and structures. In: ACM Conference on Programming Language Design and Implementation, pp. 296–310 (1990)Google Scholar
  10. 10.
    Clarke, D.G., Noble, J., Potter, J.: Simple ownership types for object containment. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 53–76. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  11. 11.
    Clarke, D.G., Potter, J., Noble, J.: Ownership types for flexible alias protection. In: ACM Conference Object-Oriented Programming, Systems, Languages and Applications, pp. 48–64 (1998)Google Scholar
  12. 12.
    Cousot, P., Cousot, R.: Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: ACM Symposium on the Principles of Programming Languages, pp. 238–252 (1977)Google Scholar
  13. 13.
    Ernst, M.D., Cockrell, J., Griswold, W.G., Notkin, D.: Dynamically discovering likely program invariants to support program evolution. IEEE Transactions on Software Engineering 27(2), 99–123 (2001)CrossRefGoogle Scholar
  14. 14.
    Ernst, M.D., Griswold, W.G., Kataoka, Y., Notkin, D.: Dynamically discovering pointer-based program invariants. Technical Report UW-CSE-99-11-02, University of Washington Department of Computer Science and Engineering, Seattle, WA (1999)Google Scholar
  15. 15.
    Flanagan, C., Leino, K.R.M., Lillibridge, M., Nelson, G., Saxe, J.B., Stata, R.: Extended static checking for Java. In: ACM Conference on Programming Language Design and Implementation, pp. 234–245 (2002)Google Scholar
  16. 16.
    Gansner, E.R., North, S.C.: An open graph visualization system and its applications to software engineering. Software Practice Experience 30(11), 1203–1233 (2000)MATHCrossRefGoogle Scholar
  17. 17.
    Ghiya, R., Hendren, L.J.: Is it a tree, a dag, or a cyclic graph? A shape analysis for heap-directed pointers in C. In: ACM Symposium on the Principles of Programming Languages, pp. 1–15 (1996)Google Scholar
  18. 18.
    Guéhéneuc, Y.G.: A reverse engineering tool for precise class diagrams. In: Conference of the Centre for Advanced Studies on Collaborative Research, pp. 28–41 (2004)Google Scholar
  19. 19.
    Hackett, B., Aiken, A.: How is aliasing used in systems software (2006), available at: http://glide.stanford.edu/saturn/
  20. 20.
    Henkel, J., Diwan, A.: Discovering algebraic specifications from Java classes. In: European Conference on Object-Oriented Programming, pp. 431–456 (2003)Google Scholar
  21. 21.
    Hill, T., Noble, J., Potter, J.: Scalable visualizations of object-oriented systems with ownership trees. J. Vis. Lang. Comput. 13(3), 319–339 (2002)CrossRefGoogle Scholar
  22. 22.
    Hirzel, M., Henkel, J., Diwan, A., Hind, M.: Understanding the connectivity of heap objects. In: MSP/ISMM, pp. 143–156 (2002)Google Scholar
  23. 23.
    Jackson, D., Waingold, A.: Lightweight extraction of object models from bytecode. In: International Conference on Software Engineering, pp. 194–202 (1999)Google Scholar
  24. 24.
    Jones, N.D., Muchnick, S.S.: A flexible approach to interprocedural data flow analysis and programs with recursive data structures. In: ACM Symposium on the Principles of Programming Languages, pp. 66–74 (1982)Google Scholar
  25. 25.
    Malloy, B.A., Power, J.F.: Exploiting UML dynamic object modeling for the visualization of C++ programs. In: ACM Symposium on Software Visualization, pp. 105–114 (2005)Google Scholar
  26. 26.
    Milanova, A.: Precise identification of composition relationships for UML class diagrams. In: Automated Software Engineering, pp. 76–85 (2005)Google Scholar
  27. 27.
    Mitchell, N.: The runtime structure of object ownership. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 74–98. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  28. 28.
    Noble, J.: Visualising objects: Abstraction, encapsulation, aliasing, and ownership. In: Diehl, S. (ed.) Dagstuhl Seminar 2001. LNCS, vol. 2269, pp. 58–72. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  29. 29.
    Printezis, T., Jones, R.: GCspy: An adaptable heap visualisation framework. In: ACM Conference Object-Oriented Programming, Systems, Languages and Applications, pp. 343–358 (2002)Google Scholar
  30. 30.
    Rayside, D., Mendel, L., Jackson, D.: A dynamic analysis for revealing object ownership and sharing. In: Workshop on Dynamic Analysis (2006)Google Scholar
  31. 31.
    Sagiv, S., Reps, T.W., Wilhelm, R.: Solving shape-analysis problems in languages with destructive updating. ACM Transactions on Programming Languages and Systems 20(1), 1–50 (1998)CrossRefGoogle Scholar
  32. 32.
    Sagiv, S., Reps, T.W., Wilhelm, R.: Parametric shape analysis via 3-valued logic. In: ACM Symposium on the Principles of Programming Languages, pp. 105–118 (1999)Google Scholar
  33. 33.
    Vitek, J., Bokowski, B.: Confined types in Java. Software– Practice and Experience 31(6), 507–532 (2001)MATHCrossRefGoogle Scholar
  34. 34.
    Waingold, A.: Automatic extraction of abstract object models. Masters thesis, Department of Electrical Engineering and Computer Science. MIT (2001)Google Scholar
  35. 35.
    Whaley, J., Martin, M.C., Lam, M.S.: Automatic extraction of object-oriented component interfaces. In: ACM International Symposium on Software Testing and Analysis, pp. 218–228 (2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Cormac Flanagan
    • 1
  • Stephen N. Freund
    • 2
  1. 1.Dept. of Computer ScienceUniversity of California at Santa CruzSanta CruzUSA
  2. 2.Dept. of Computer ScienceWilliams CollegeWilliamstownUSA

Personalised recommendations