Annotated structure shape graphs for abstract analysis of Prolog

  • Geoffrey Weyer
  • William Winsborough
Progam Analysis
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1140)


The paper presents an abstract interpretation of Prolog that derives information about the shape and sharing of structures to which variables are bound at runtime. The purpose is to support analysis of live structures, which in turn supports compile-time memory reuse. The abstract domain consists of graphs that use shared subgraphs to represent shared substructure in the heap. This sharing in the abstract representation is not new, though we are the first to use it in a context where unification must be modeled. The principal contribution is a system of annotations that increases the precision of the sharing information and the efficiency of the analysis.


Abstract Analysis Structure Shape Graph Unify Set Compile-Time Garbage Collection Update-In-Place Type Graph Aliasing Sharing Structure Sharing Liveness 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [BGW92]
    B. Burton, G. Gudjonsson, and W. Winsborough. An algorithm for computing alternating closure. Technical Report CS-92-15, Penn State, June 1992.Google Scholar
  2. [CBC93]
    J.D. Choi, M.G. Burke, and P. Carini. Efficient flow-sensitive interprocedural computation of pointer-induced aliases and side-effects. POPL, pages 232–245, January 1993.Google Scholar
  3. [CWZ90]
    D.R. Chase, M. Wegman, and F.K. Zadeck. Analysis of pointers and structures. PLDI, pages 20–22, June 1990.Google Scholar
  4. [Deu94]
    A. Deutsch. Interprocedural may-alias analysis for pointers: Beyond k-limiting. PLDI, pages 230–241, June 1994.Google Scholar
  5. [GW93]
    G. Gudjonsson and W. Winsborough. Update in place: Overview of the siva project. In Dale Miller, editor, ILPS, pages 94–113. MIT Press, 1993.Google Scholar
  6. [Hei92]
    N. Heintze. Practical aspects of set based analysis. In Krzysztok Apt, editor, JICSLP, pages 765–779. MIT Press, 1992.Google Scholar
  7. [JB92]
    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, July 1992.Google Scholar
  8. [JM81]
    N.D. Jones and S. Muchnick. Flow analysis and optimzation of lisp-like structures. In S. Muchnick and N.D. Jones, editors, Program Flow Analysis: Theory and Applications, pages 102–131. Prentice-Hall, 1981.Google Scholar
  9. [JM82]
    N.D. Jones and S. Muchnick. A flexible approach to interprocedural data flow analysis and programs with recursive data structures. POPL, pages 66–74, 1982.Google Scholar
  10. [Kag93]
    A. Kagedal. Improvements in compile-time analysis for ground prolog. In M. Bruynooghe, J. Penjam, editors, PLILP. LNCS 714, Springer-Verlag, August 1993.Google Scholar
  11. [Klu88]
    F. Kluźniak. Compile-time garbage collection for ground Prolog. In R. A. Kowalski and K. A. Bowen, editors, ICSLP, pages 1490–1505. MIT Press, August 1988.Google Scholar
  12. [LH88]
    J. R. Larus and P. N. Hilfinger. Detecting conflicts between structure accesses. PLDI, pages 21–34, July 1988.Google Scholar
  13. [LV92]
    B. Le Charlier and P. Van Hentenryck. Experimental evaluation of a generic abstract interpretation algorithm for prolog (extended abstract). Fourth IEEE International Conference on Computer Languages, April 1992.Google Scholar
  14. [MJMB89]
    A. Marien, G. Janssens, A. Mulkers, and M. Bruynooghe. The impact of abstract interpretation: An experiment in code generation. In G. Levi and M. Martelli, editors, ICLP. MIT Press, 1989.Google Scholar
  15. [MWB90]
    A. Mulkers, W. Winsborough, and M. Bruynooghe. Analysis of shared data structures for compile-time garbage collection in logic programs. In D. H. D. Warren and P. Szeredi, editors, ICLP. MIT Press, 1990.Google Scholar
  16. [MWB94]
    A. Mulkers, W. Winsborough, and M. Bruynooghe. Live-structure dataflow analysis for Prolog. TOPLAS, 16, 1994.Google Scholar
  17. [PW78]
    M. S. Patterson and M. N. Wegman. Linear unification. Journal of computer and system sciences, 16:158–167, 1978.Google Scholar
  18. [VCL94]
    P. Van Hentenryck, A. Cortesi, and B. Le Charlier. Type analysis of prolog using type graphs. PLDI, 1994.Google Scholar
  19. [Wey96]
    G. Weyer. Structure shape graphs with explicit sharing for prolog-like languages. Master's thesis, Dept of Computer Science and Engineering, Penn State, May 1996.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Geoffrey Weyer
    • 1
  • William Winsborough
    • 2
  1. 1.Dept. of Comp. Sci. and Eng., Penn StateUniversity Park
  2. 2.Transarc Corp.Pittsburgh

Personalised recommendations