## Effective Flow Analysis for Avoiding Run-Time Checks (1995)

### Cached

### Download Links

- [www.cs.purdue.edu]
- [www.daimi.aau.dk]
- [www.neci.nj.nec.com]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proceedings of the 1995 International Static Analysis Symposium |

Citations: | 50 - 5 self |

### BibTeX

@INPROCEEDINGS{Jagannathan95effectiveflow,

author = {Suresh Jagannathan and Andrew Wright},

title = {Effective Flow Analysis for Avoiding Run-Time Checks},

booktitle = {In Proceedings of the 1995 International Static Analysis Symposium},

year = {1995},

pages = {207--224},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

. This paper describes a general purpose program analysis that computes global control-flow and data-flow information for higher-order, call-by-value programs. This information can be used to drive global program optimizations such as inlining and run-time check elimination, as well as optimizations like constant folding and loop invariant code motion that are typically based on special-purpose local analyses. The analysis employs a novel approximation technique called polymorphic splitting that uses let-expressions as syntactic clues to gain precision. Polymorphic splitting borrows ideas from Hindley-Milner polymorphic type inference systems to create an analog to polymorphism for flow analysis. Experimental results derived from an implementation of the analysis for Scheme indicate that the analysis is extremely precise and has reasonable cost. In particular, it eliminates significantly more run-time checks than simple flow analyses (i.e. 0CFA) or analyses based on type ...

### Citations

1619 | The definition of Standard ML
- Milner, Tofte, et al.
- 1997
(Show Context)
Citation Context ...ar, it eliminates significantly more run-time checks than simple flow analyses (i.e. 0CFA) or analyses based on type inference. 1 Introduction Advanced programming languages such as Scheme [3] and ML =-=[13]-=- encourage a programming style that makes extensive use of data and procedural abstraction. Higher degrees of abstraction generally entail higher run-time overheads; hence, sophisticated compiler opti... |

978 | A theory of type polymorphism in programming
- Milner
- 1978
(Show Context)
Citation Context ...ectly disambiguating the two calls to (lambda (x) x) made via the two calls to g requires a 2CFA analysis that preserves two levels of call history. In contrast, polymorphic type inference algorithms =-=[12, 22]-=- correctly infer the proper type for f without requiring such tuning. Polymorphic type systems disambiguate different calls to a polymorphic procedure by effectively duplicating the procedure wherever... |

378 | Principal type-schemes for functional programs - Damas, Milner - 1982 |

359 |
The Rapid EValuation of Potential, Fields in Particle Systems
- Greengard
- 1988
(Show Context)
Citation Context ... This program makes extensive use of mutation and vectors. Boyer is a term-rewriting theorem prover that allocates heavily. N-Body is a Scheme implementation [23] of the Greengard multipole algorithm =-=[6]-=- for computing gravitational forces on point-masses distributed uniformly in a cube. Dynamic is an implementation of a tagging optimization algorithm [8] for Scheme. Nucleic is a constraint satisfacti... |

317 | Control-4ow analysis of higher-order languages
- Shivers
- 1991
(Show Context)
Citation Context ...framework is parameterized over different approximations of exact values to abstract values, and hence can be used to construct a spectrum of analyses with different cost and accuracy characteristics =-=[10, 20]-=-. In particular, we study a novel approximation technique called polymorphic splitting that uses letexpressions as syntactic clues to gain precision. Polymorphic splitting borrows ideas from Hindley-M... |

209 | Flow analysis and optimization of LISPlike structures
- Jones, Muchnick
- 1979
(Show Context)
Citation Context ...level languages efficiently. Run-time check elimination is one such example that is relevant in the context of languages such as Scheme or ML. Although the flow analysis problem has been well-studied =-=[11]-=-, and although parameterizable systems have been investigated elsewhere [10, 20], the applicability of such frameworks for optimizing realistic programs has enjoyed relatively little examination. When... |

196 | Introduction to lambda calculus
- Barendregt
- 1988
(Show Context)
Citation Context ...2 Const are constants, x 2 Var are variables, and l 2 Label are labels. Constants include simple values like 0; 1; true, and false. Free variables (FV ) and bound variables (BV ) are defined as usual =-=[2]-=-, except that a subscripted variablesx l [l 0 ] must be bound by a let-expression with label l 0 , and an unsubscripted variable x l must be bound by a -expression. A program e l 0 0 is an expression ... |

191 | Soft typing with conditional types
- Aiken, Wimmers, et al.
- 1994
(Show Context)
Citation Context ...ates both dynamic typing and static typing in one framework. A soft type checker infers types for identifiers and inserts run-time checks to transform untypable programs to typable form. Aiken et al. =-=[1]-=- describe a more sophisticated soft type system for a functional language. This system uses conditional types in a more powerful type language that should yield more a precise analysis than Soft Schem... |

178 |
Call-by-name, call-by-value, and the lambda-calculus. Theoret
- Plotkin
- 1975
(Show Context)
Citation Context ...e every subexpression of a program to have a unique label, and occasionally omit labels from expressions to avoid clutter. The exact semantics for this language is an ordinary call-by-value semantics =-=[18]-=-. Recursive procedures can be constructed with the call-by-value Y combinator. Our analysis yields sets of abstract values. Abstract values are defined as follows: v 2 Value = Label + Closure hl; ae; ... |

149 |
The Principal Type-Scheme of an Object in Combinatory Logic
- Hindley
- 1969
(Show Context)
Citation Context ...or these programs in the absence of any run-time check optimization, and analysis times under polymorphic splitting, soft typing, 0CFA, and 1CFA. is based on a Hindley-Milner type inference framework =-=[9, 12]-=-, the body of a -expression is evaluated only once. Applications unify the type signature for a procedure's arguments with the type inferred for the formal, and thus do not require re-analysis of the ... |

117 |
Set-based analysis of ML programs
- Heintze
(Show Context)
Citation Context ...ation is not readily apparent for a given optimization. For example, consider the following Scheme expression: (let ((f (lambda (x) x))) (f 1)) Simple control-flow analyses [20] or set-based analyses =-=[7]-=- determine that the application of f to 1 produces 1 as the result. These simple low-order polynomialtime analyses effectively determine all potential call sites for all procedures, but merge the valu... |

113 | A Practical Soft Type System for Scheme
- Wright, Cartwright
- 1997
(Show Context)
Citation Context ...emely precise and has reasonable cost. The analysis eliminates significantly more run-time checks than comparable simple analyses (e.g. 0CFA [19]) or type-inference based techniques (e.g. soft typing =-=[22]-=-). While the computational cost of our analysis appears to be higher than that of typeinference based methods, analysis times are still within reason for including the analysis in an optimizing compil... |

89 | A type system equivalent to flow analysis
- Palsberg, O’Keefe
- 1995
(Show Context)
Citation Context ...is analysis yields a more precise result. 3.2 Comparison to Type Inference For several important idioms, polymorphic-splitting results in finer precision than Hindley-Milner typing or safety analysis =-=[16]-=- as embodied by a 0CFA analysis. As a simple illustration, consider the expression: 2 2 The examples in this section use natural extensions for begin and primitive operators. hl 1 ; 0 l 0i 7! fhl11 ; ... |

75 | A uni treatment of flow analysis in higher-order languages
- Jagannathan, Weeks
- 1995
(Show Context)
Citation Context ...framework is parameterized over different approximations of exact values to abstract values, and hence can be used to construct a spectrum of analyses with different cost and accuracy characteristics =-=[10, 20]-=-. In particular, we study a novel approximation technique called polymorphic splitting that uses letexpressions as syntactic clues to gain precision. Polymorphic splitting borrows ideas from Hindley-M... |

73 |
The Scheme Programming Language
- Dybvig
- 2003
(Show Context)
Citation Context ...dd hl 2 ; i ; hx;s0 i add hl b ;s0 i ; hl; i Fig. 4. The procedure Flow builds a flow graph corresponding to the least flow analysis of a program. 5 Performance Our implementation runs on top of Chez =-=[4]-=-, a commercially available implementation of Scheme. At optimize-level 3, Chez eliminates almost all run-time checks, making no safety guarantees. By feeding the output of our analysis to a procedure ... |

52 | Global tagging optimization by type inference
- Henglein
- 1992
(Show Context)
Citation Context ...tion [23] of the Greengard multipole algorithm [6] for computing gravitational forces on point-masses distributed uniformly in a cube. Dynamic is an implementation of a tagging optimization algorithm =-=[8]-=- for Scheme. Nucleic is a constraint satisfaction algorithm used to determine the three-dimensional structure of nucleic acids [5]. It is floating-point intensive and uses an object package implemente... |

42 | An O(n) algorithm for three-dimensional N-body simulations - Zhao - 1987 |

39 | Safety analysis versus type inference
- Palsberg, Schwartzbach
- 1992
(Show Context)
Citation Context ...or optimizing realistic programs has enjoyed relatively little examination. When viewed in the context of run-time check elimination, flow analysis bears an interesting relationship to type inference =-=[17]-=-. However, there has been little work on extending the relation to polymorphism or to understand its implications on implementations. One important kind of run-time check optimization is elimination o... |

34 |
Data Flow Analysis and Type Recovery in Scheme
- Shivers
- 1991
(Show Context)
Citation Context ...Scheme programs indicate that polymorphic splitting is extremely precise and has reasonable cost. The analysis eliminates significantly more run-time checks than comparable simple analyses (e.g. 0CFA =-=[19]-=-) or type-inference based techniques (e.g. soft typing [22]). While the computational cost of our analysis appears to be higher than that of typeinference based methods, analysis times are still withi... |

13 | Using Multilisp for solving constraint satisfaction problems: an application to nucleic acid 3D structure determination. Lisp and symbolic computation
- Feeley, Turcotte, et al.
- 1994
(Show Context)
Citation Context ...ube. Dynamic is an implementation of a tagging optimization algorithm [8] for Scheme. Nucleic is a constraint satisfaction algorithm used to determine the three-dimensional structure of nucleic acids =-=[5]-=-. It is floating-point intensive and uses an object package implemented using macros and vectors. Nucleic2 is a modified version of Nucleic described below. For several of the benchmarks, the analysis... |

12 |
Global program analysis in constraint form
- Palsberg
- 1994
(Show Context)
Citation Context ...heme's type system, but no implementation is available for a realistic programming language. Besides type inference and abstract interpretation, there has been recent work on using constraint systems =-=[7, 15]-=- to analyze high-level programs. These systems are based on an operational semantics that ignores all inter-variable dependencies. Consequently, while efficient implementations of these analyses can b... |

7 | Infer: A Statically-typed Dialect of Scheme
- Haynes
- 1995
(Show Context)
Citation Context ...es not consider polymorphism or union types, and uses a coarse type approximation that is significantly more imprecise than control-flow analysis via polymorphic splitting. Soft typing [24] and Infer =-=[8]-=- are two other type systems implemented for Scheme that employ traditional type inference techniques to derive type information which can be then used to eliminate or obviate run-time checks. Infer is... |

3 |
Handbook of Theoretical Computer Science: Volume B, Chapter Type Systems for Programming Languages
- Mitchell
- 1990
(Show Context)
Citation Context ...iated with bindings of other applications of f in the let-body. It is well-known that quantification rules for type variables can be discarded in favor of a substitution rule on polymorphic variables =-=[14]-=-. Polymorphic splitting captures the essence of polymorphism by incorporating this observation into a flow-analysis framework. Like polymorphic type inference, polymorphic splitting relies only on lex... |

3 |
Tags and Type Checking in Lisp
- Steenkiste, Hennessy
- 1987
(Show Context)
Citation Context ...here has been little work on extending the relation to polymorphism or to understand its implications on implementations. One important kind of run-time check optimization is elimination of type tags =-=[21]-=-. Shivers [19] used the term type recovery to describe a type-tag elimination optimization based on flow analysis. Because this framework relies on callstring abstractions, and did not study the possi... |