The binding of a program to a particular property or attribute is the choice of such property from a set of possible ones. In general, postponement of binding times gives greater flexibility to a language user, but can adversely affect run-time efficiency. An ideal processor for a language should have as one of its functions the task of determining the earliest binding times for a program which are consistent with its being correctly executed. This task is what we call binding time optimization.
This thesis deals with the storage management aspect of binding time optimization in strongly typed languages with dynamically allocated objects. Our optimization technique is based on the observation that while global heap allocation has generally been the only technique used to implement reference variables, most of the features necessary for the implementation of high-level data structures do not require that the heap be a global one. The only characteristic which demands a global heap is that object lifetimes are not tied to a particular procedure, and are therefore unknown at compile-time.
We present several memory allocation techniques that can be used in place of global heap allocation when the information about the lifetime of objects is available. We consider a broad class of structured objects, including recursive types. Our techniques are based on the concept of "local heaps" associated to procedure activation records on the stack.
To determine upper bounds on the lifetime of objects we first introduce a compile-time approximation of run-time objects, called sources. We then develop a flow analysis algorithm for the inter-procedural problem of determining how far in the call-graph of the program a source can propagate. This problem requires collecting information at two levels. At the inter-procedural level we provide an algorithm to propagate the names of the sources returned to a calling procedure. At the intra-procedural level we examine the flow of the sources within each procedure to determine which ones reach the exits. We present both algorithms using a formal data flow analysis framework model. Because the two levels are independent our algorithm handles recursive procedures without recomputing intra-procedural information.
Cited By
- Chase D, Wegman M and Zadeck F (2004). Analysis of pointers and structures, ACM SIGPLAN Notices, 39:4, (343-359), Online publication date: 1-Apr-2004.
- Sankaran N (1994). A bibliography on garbage collection and related topics, ACM SIGPLAN Notices, 29:9, (149-158), Online publication date: 1-Sep-1994.
- Baker H Unify and conquer Proceedings of the 1990 ACM conference on LISP and functional programming, (218-226)
- Chase D, Wegman M and Zadeck F Analysis of pointers and structures Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation, (296-310)
- Chase D, Wegman M and Zadeck F (1990). Analysis of pointers and structures, ACM SIGPLAN Notices, 25:6, (296-310), Online publication date: 1-Jun-1990.
- Chase D Safety consideration for storage allocation optimizations Proceedings of the ACM SIGPLAN 1988 conference on Programming language design and implementation, (1-10)
- Ruggieri C and Murtagh T Lifetime analysis of dynamically allocated objects Proceedings of the 15th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (285-293)
- Chase D (2019). Safety consideration for storage allocation optimizations, ACM SIGPLAN Notices, 23:7, (1-10), Online publication date: 1-Jul-1988.
Recommendations
An evaluation of automatic object inline allocation techniques
OOPSLA '98: Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsObject-oriented languages such as Java and Smalltalk provide a uniform object reference model, allowing objects to be conveniently shared. If implemented directly, these uniform reference models can suffer in efficiency due to additional memory ...
An evaluation of automatic object inline allocation techniques
Object-oriented languages such as Java and Smalltalk provide a uniform object reference model, allowing objects to be conveniently shared. If implemented directly, these uniform reference models can suffer in efficiency due to additional memory ...
On-demand dynamic summary-based points-to analysis
CGO '12: Proceedings of the Tenth International Symposium on Code Generation and OptimizationStatic analyses can be typically accelerated by reducing redundancies. Modern demand-driven points-to or alias analysis techniques rest on the foundation of Context-Free Language (CFL) reachability. These techniques achieve high precision efficiently ...