## Escape Analysis: Correctness Proof, Implementation and Experimental Results (1998)

Venue: | In Conference Record of the 25th Annual ACM Symposium on Principles of Programming Languages |

Citations: | 61 - 2 self |

### BibTeX

@INPROCEEDINGS{Blanchet98escapeanalysis:,

author = {Bruno Blanchet},

title = {Escape Analysis: Correctness Proof, Implementation and Experimental Results},

booktitle = {In Conference Record of the 25th Annual ACM Symposium on Principles of Programming Languages},

year = {1998},

pages = {25--37},

publisher = {ACM Press}

}

### Years of Citing Articles

### OpenURL

### Abstract

We describe an escape analysis [32, 14], used to determine whether the lifetime of data exceeds its static scope. We give a new correctness proof starting directly from a semantics. Contrary to previous proofs, it takes into account all the features of functional languages, including imperative features and polymorphism. The analysis has been designed so that it can be implemented under the small complexity bound of O(n log 2 n) where n is the size of the analyzed program. We have included it in the Caml Special Light compiler (an implementation of ML), and applied it to very large programs. We plan to apply these techniques to the Java programming language. Escape analysis has been applied to stack allocation. We improve the optimization technique by determining minimal lifetime for stack allocated data, and using inlining. We manage to stack allocate 25% of data in the theorem prover Coq. We analyzed the effect of this optimization, and noticed that its main effect is to improve ...

### Citations

103 | A flexible approach to interprocedural data flow analysis and programs with recursive data structures
- Jones, Muchnick
- 1982
(Show Context)
Citation Context ...Hughes' is [25] by Inoue, Seki and Yagi, who only free the top of lists, but give experimental results. Alias analysis [13], reference counting [22, 19], storage use analysis [34] which is similar to =-=[26, 18, 12, 35]-=- can be applied to stack allocation though at a much higher cost. Another allocation optimization has been suggested in [38, 5, 2]: region allocation. All objects are allocated in heap regions whose s... |

87 |
Applications of path compression on balanced trees
- Tarjan
- 1979
(Show Context)
Citation Context ...tion and emit equations representing the above formula. The operation eval(n) computes the composition of operations labeling the edges on the path from the node n to the root, doing path compression =-=[37]-=-. We maintain the relation: Fk [[M ]]ae = t x2FV (M);n2ffi(x) ae[[x]] ffi eval(n) when analyzing M , where ffi(x) is the set of nodes representing occurrences of x. This enables us to compute Fk . We ... |

66 | Backwards analysis of functional programs - Hughes - 1988 |

64 |
A Generalization of Dijkstra’s Algorithm
- Knuth
- 1977
(Show Context)
Citation Context ...M , where ffi(x) is the set of nodes representing occurrences of x. This enables us to compute Fk . We solve the equations with a generalization of Dijkstra 's shortest paths algorithm given by Knuth =-=[28]-=-. It gives the least fixed point of an equations system Y = t i g i (X1 ; : : : ; Xk ) where g i are inferior functions: g i (x1 ; : : : ; xk )smin(x1 ; : : : ; xk ). However, the instantiation functi... |

60 | Lifetime analysis of dynamically allocated objects - Ruggieri, Murtagh - 1988 |

59 | Escape analysis on lists
- Park, Goldberg
- 1992
(Show Context)
Citation Context ...e analysis is precisely to determine, thanks to abstract interpretation [10, 11], which data can be stack allocated. 1.1 Related Work Escape analysis on lists has been introduced by Park and Goldberg =-=[32]-=-, and Deutsch [14] has much improved the complexity of their analysis, reducing it to O(n log 2 n), with exactly the same results for first-order expressions (there is E-mail: Bruno.Blanchet@ens.fr. A... |

50 | Finding dominators in directed graphs - TARJAN - 1972 |

32 |
Analysis of functional programs to detect run-time garbage cells
- Inoue, Seki, et al.
- 1988
(Show Context)
Citation Context ...ls to represent the escaping part of data. He does not perform stack allocation, but keeps in memory addresses of data to be deallocated in order to avoid using the GC. The work closest to Hughes' is =-=[25]-=- by Inoue, Seki and Yagi, who only free the top of lists, but give experimental results. Alias analysis [13], reference counting [22, 19], storage use analysis [34] which is similar to [26, 18, 12, 35... |

27 | Storage use analysis and its applications
- Serrano, Feeley
- 1996
(Show Context)
Citation Context ... GC. The work closest to Hughes' is [25] by Inoue, Seki and Yagi, who only free the top of lists, but give experimental results. Alias analysis [13], reference counting [22, 19], storage use analysis =-=[34]-=- which is similar to [26, 18, 12, 35] can be applied to stack allocation though at a much higher cost. Another allocation optimization has been suggested in [38, 5, 2]: region allocation. All objects ... |

26 |
A semantic model of reference counting and its abstraction (detailed summary
- Hudak
- 1986
(Show Context)
Citation Context ...ted in order to avoid using the GC. The work closest to Hughes' is [25] by Inoue, Seki and Yagi, who only free the top of lists, but give experimental results. Alias analysis [13], reference counting =-=[22, 19]-=-, storage use analysis [34] which is similar to [26, 18, 12, 35] can be applied to stack allocation though at a much higher cost. Another allocation optimization has been suggested in [38, 5, 2]: regi... |

24 | Experiences with Compiler-Directed Storage Reclamation”. In: FPCA ’93 - Hicks - 1993 |

24 | A theory of stack allocation in polymorphically typed languages
- Tofte, Talpin
- 1993
(Show Context)
Citation Context ...ounting [22, 19], storage use analysis [34] which is similar to [26, 18, 12, 35] can be applied to stack allocation though at a much higher cost. Another allocation optimization has been suggested in =-=[38, 5, 2]-=-: region allocation. All objects are allocated in heap regions whose size is not known statically in general, but for which we know when they can be deallocated. Regions can therefore be deallocated w... |

14 |
Compile-time garbage collection for higher-order functional languages
- Hughes
- 1992
(Show Context)
Citation Context ...so suggested many extensions. Mohnen [30, 29] describes a similar analysis, but its complexity is quadratic and the analyzed language is first order and does not contain imperative operations. Hughes =-=[24]-=- already introduces integer levels to represent the escaping part of data. He does not perform stack allocation, but keeps in memory addresses of data to be deallocated in order to avoid using the GC.... |

14 | Efficient compile-time garbage collection for arbitrary data structures
- Mohnen
- 1995
(Show Context)
Citation Context ...permission and/or fee. POPL 98 San Diego CA USA Copyright 1998 ACM 0-89791-979-3/98/01..$3.50 an unavoidable loss of precision in the higher-order case). He has also suggested many extensions. Mohnen =-=[30, 29]-=- describes a similar analysis, but its complexity is quadratic and the analyzed language is first order and does not contain imperative operations. Hughes [24] already introduces integer levels to rep... |

10 |
Some Properties of Predicate Transformers
- Hoare
- 1978
(Show Context)
Citation Context ...remember the history of its changes, but we also consider a store as a function which maps every location to its contents: Store = Loc ! SV . This is similar to Hoare's definition of execution traces =-=[21]-=- as sequences of tests and assignments. In environments, we memorize not only the value but also the store in which it has been created. 3 Escape Analysis on Paths The following analysis can be applie... |

10 | A.J.Demers. Computation of aliases and support sets - Neirynck - 1987 |

7 | Efficient Closure Utilisation by HigherOrder Inheritance Analysis
- Mohnen
- 1995
(Show Context)
Citation Context ...permission and/or fee. POPL 98 San Diego CA USA Copyright 1998 ACM 0-89791-979-3/98/01..$3.50 an unavoidable loss of precision in the higher-order case). He has also suggested many extensions. Mohnen =-=[30, 29]-=- describes a similar analysis, but its complexity is quadratic and the analyzed language is first order and does not contain imperative operations. Hughes [24] already introduces integer levels to rep... |

5 |
Control Flow Analysis
- Shivers
- 1988
(Show Context)
Citation Context ...Hughes' is [25] by Inoue, Seki and Yagi, who only free the top of lists, but give experimental results. Alias analysis [13], reference counting [22, 19], storage use analysis [34] which is similar to =-=[26, 18, 12, 35]-=- can be applied to stack allocation though at a much higher cost. Another allocation optimization has been suggested in [38, 5, 2]: region allocation. All objects are allocated in heap regions whose s... |

1 |
Is compile time garbage collection worth the effort
- Jones, White
- 1990
(Show Context)
Citation Context ... give two results: the speedup does not depend on the GC parameters (GC ratio, minor heap size), and the speedup due to the GC represents a minor part of the total speedup (Figure 19), which confirms =-=[27]-=-. This can be explained as we mainly stack allocate short lived data, which have no cost for the GC, since they are not scanned by minor GCs. So most of the speedup is due to a better data locality, a... |