## Efficient Type Inference for Higher-Order Binding-Time Analysis (1991)

### Cached

### Download Links

- [repository.readscheme.org]
- [www.diku.dk]
- [ftp.diku.dk]
- DBLP

### Other Repositories/Bibliography

Venue: | In Functional Programming and Computer Architecture |

Citations: | 91 - 4 self |

### BibTeX

@INPROCEEDINGS{Henglein91efficienttype,

author = {Fritz Henglein},

title = {Efficient Type Inference for Higher-Order Binding-Time Analysis},

booktitle = {In Functional Programming and Computer Architecture},

year = {1991},

pages = {448--472},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

Binding-time analysis determines when variables and expressions in a program can be bound to their values, distinguishing between early (compile-time) and late (run-time) binding. Binding-time information can be used by compilers to produce more efficient target programs by partially evaluating programs at compile-time. Binding-time analysis has been formulated in abstract interpretation contexts and more recently in a type-theoretic setting. In a type-theoretic setting binding-time analysis is a type inference problem: the problem of inferring a completion of a λ-term e with binding-time annotations such that e satisfies the typing rules. Nielson and Nielson and Schmidt have shown that every simply typed λ-term has a unique completion ê that minimizes late binding in TML, a monomorphic type system with explicit binding-time annotations, and they present exponential time algorithms for computing such minimal completions. 1 Gomard proves the same results for a variant of his two-level λ-calculus without a so-called “lifting ” rule. He presents another algorithm for inferring completions in this somewhat restricted type system and states that it can be implemented in time O(n 3). He conjectures that the completions computed are minimal.

### Citations

2438 |
The Design and Analysis of Computer Algorithms
- Aho, Hopcroft, et al.
- 1974
(Show Context)
Citation Context ...f (the representation of) G(C 0 ) is performed and for every nontrivial strongly connected component an element ff is taken and the pair (ff = ) added to the worklist. (Not described here; see, e.g., =-=[AHU74].) Phase 4-=-: Finally, the normalization of Phase 2 is performed again until a normal form is reached. The possibly cyclic "quasi-normal" form reached after Phase 2 could be interpreted, analogous to Th... |

992 | Depth first search and linear graph algorithms
- Tarjan
- 1972
(Show Context)
Citation Context ...Phase 1 takes linear time. Since the potential is never negative, the combined running times of Phases 2 and 4 is bounded by P 0 by our considerations above. Phase 3 can be implemented in linear time =-=[Tar72]-=-. Finally, using path compression and union by rank (or similar union/find heuristics; see [Tar83]) for Phase 2 we get the following theorem. Theorem 6 A constraint system can be normalized in time O(... |

332 | An efficient unification algorithm - Martelli, Montanari - 1982 |

218 |
Unification revisited
- Lassez, Maher, et al.
- 1986
(Show Context)
Citation Context ...t system C has a minimal solution. Proof: Interpret all inequalities in C as equations. Since C is a normal form constraint system, by Theorem 3, part 2, these equations have a most general unifier U =-=[LMM87]-=- . Let BS be the substitution that maps every type variable occurring in U(C) to B. Since neither U nor BS substitutessfor any type variable, all the dependency constraints in C are trivially satisfie... |

147 | Linear Unification - Paterson, Wegman - 1978 |

122 | An experiment in partial evaluation: The generation of a compiler generator - Jones, Sestoft, et al. - 1985 |

116 | MIX: a self-applicable partial evaluator for experiments - Jones, Sestoft, et al. - 1989 |

93 | A partial evaluator for the untyped lambda-calculus - Gomard, Jones - 1991 |

90 | Automatic autoprojection of higher order recursive equations - Bondorf - 1991 |

77 |
A simple algorithm and proof for type inference
- Wand
- 1987
(Show Context)
Citation Context ...r considerations can be applied to other type inference problems to derive systematically reductions to solvability of type constraint systems; in particular, the reductions of Mitchell [Mit84], Wand =-=[Wan87], Fuh and -=-Mishra [FM88], Stansifer [Sta88], Henglein [Hen88b] can be derived in this fashion. for solving these constraints as its "back end". We hope that, possibly after some suitable generalization... |

76 |
P.: Type inference with subtypes
- Fuh, Mishra
(Show Context)
Citation Context ...applied to other type inference problems to derive systematically reductions to solvability of type constraint systems; in particular, the reductions of Mitchell [Mit84], Wand [Wan87], Fuh and Mishra =-=[FM88], Stansife-=-r [Sta88], Henglein [Hen88b] can be derived in this fashion. for solving these constraints as its "back end". We hope that, possibly after some suitable generalization, our constraints are b... |

71 |
Coercion and type inference
- Mitchell
- 1984
(Show Context)
Citation Context ...hm(s) 5 Similar considerations can be applied to other type inference problems to derive systematically reductions to solvability of type constraint systems; in particular, the reductions of Mitchell =-=[Mit84], Wand [Wa-=-n87], Fuh and Mishra [FM88], Stansifer [Sta88], Henglein [Hen88b] can be derived in this fashion. for solving these constraints as its "back end". We hope that, possibly after some suitable ... |

67 |
Binding time analysis for higher order untyped functional languages
- Consel
- 1990
(Show Context)
Citation Context ...ted itself to first-order languages [JSS85,JSS89,Jon87, Mog89,Rom87,Lau87,Lau90], but, more recently, higher-order languages have also been analyzed: Mogensen [Mog89], Bondorf [Bon90a,Bon90b], Consel =-=[Con90]-=- and Hunt and Sands [HS91] describe higher-order binding time analysis in an abstract interpretation framework; Nielson and Nielson [NN88a], Schmidt [Sch87] and Gomard [Gom89,Gom90,GJ91] formalize it ... |

50 |
Self-Applicable Partial Evaluation
- Bondorf
- 1990
(Show Context)
Citation Context ...lymorphic system? What are its properties? ffl In our system "lifting" is restricted to first-order values. But higher-order lifting is both possible and useful in practice, as exemplified i=-=n Similix [Bon90b]. What hap-=-pens when lifting for static functions and "induced" lifting for arbitrary partially static structures and functions are also permitted? Acknowledgments I would like to express my thanks: to... |

49 |
Partial type inference for untyped functional programs (extended abstract
- Gomard
- 1990
(Show Context)
Citation Context ... is that in Nielson's work the represented -terms are also typed, which is reflected in a more complex type structure for (two-level) -terms denoting such unevaluated "object terms". Nielson=-= and 2 In [Gom90] the typestype is ac-=-tually called "untyped"; and in [Gom89] it is referred to as "code" because of its intended interpretation in the two-level -calculus. Nielson [NN88a] and Schmidt [Sch87] have show... |

48 | Automatic program specialization: a re-examination from basic principles - Jones - 1988 |

47 | Projection Factorisation in Partial Evaluation - Launchbury - 1990 |

45 | Partially static structures in a self-applicable partial evaluator - Mogensen - 1987 |

36 | Dynamic typing
- Henglein
- 1992
(Show Context)
Citation Context ...rest since they can be used to solve other analyses; in particular, we have applied it successfully to the description and design an efficient type inference algorithm for a dynamic typing discipline =-=[Hen91]-=-. Several problems might be addressed as a continuation of this work: • Binding-time analysis has been cast in different conceptual frameworks: abstract interpretation, projection analysis, and type i... |

35 | New insights into partial evaluation: the Schism experiment - Consel - 1988 |

34 | Binding Time Analysis: A New PERspective
- Hunt, Sands
- 1991
(Show Context)
Citation Context ...anguages [JSS85,JSS89,Jon87, Mog89,Rom87,Lau87,Lau90], but, more recently, higher-order languages have also been analyzed: Mogensen [Mog89], Bondorf [Bon90a,Bon90b], Consel [Con90] and Hunt and Sands =-=[HS91]-=- describe higher-order binding time analysis in an abstract interpretation framework; Nielson and Nielson [NN88a], Schmidt [Sch87] and Gomard [Gom89,Gom90,GJ91] formalize it as a type inference (or ty... |

29 |
Two-level semantics and code generation
- Nielson, Nielson
- 1988
(Show Context)
Citation Context ...ctic operator (such as @, ) is indicated by underscoring it (e.g., @; ) whereas its early-binding counterpart has no underscore. The main difference to the original two-level -calculus TML of Nielson =-=[NN88b] is that i-=-n Nielson's work the represented -terms are also typed, which is reflected in a more complex type structure for (two-level) -terms denoting such unevaluated "object terms". Nielson and 2 In ... |

27 | Résolution d’équations dans des langages d’ordre 1,2,...,ω. Thèse de doctorat d’état, Université Paris VII - Huet - 1976 |

26 |
Type inference with subtypes
- Stansifer
- 1988
(Show Context)
Citation Context ...ype inference problems to derive systematically reductions to solvability of type constraint systems; in particular, the reductions of Mitchell [Mit84], Wand [Wan87], Fuh and Mishra [FM88], Stansifer =-=[Sta88], Henglein-=- [Hen88b] can be derived in this fashion. for solving these constraints as its "back end". We hope that, possibly after some suitable generalization, our constraints are both expressive enou... |

25 | Polymorphic Type Inference and Semi-Unification
- Henglein
- 1989
(Show Context)
Citation Context ...lems to derive systematically reductions to solvability of type constraint systems; in particular, the reductions of Mitchell [Mit84], Wand [Wan87], Fuh and Mishra [FM88], Stansifer [Sta88], Henglein =-=[Hen88b] can be de-=-rived in this fashion. for solving these constraints as its "back end". We hope that, possibly after some suitable generalization, our constraints are both expressive enough to capture many ... |

23 | A Compiler Generator Produced by a Self-Applicable Specializer Can Have a Surprisingly Natural and Understandable Structure. 445--463. Partial Evaluation and Mixed - Romanenko - 1988 |

20 | An algorithm for testing the equivalence of finite automata - Hopcroft, Karp - 1971 |

19 |
Binding Time Analysis for Polymorphically Typed Higher Order Languages
- Mogensen
- 1989
(Show Context)
Citation Context ...ly. Early binding-time analysis work limited itself to first-order languages [JSS85,JSS89,Jon87, Mog89,Rom87,Lau87,Lau90], but, more recently, higher-order languages have also been analyzed: Mogensen =-=[Mog89]-=-, Bondorf [Bon90a,Bon90b], Consel [Con90] and Hunt and Sands [HS91] describe higher-order binding time analysis in an abstract interpretation framework; Nielson and Nielson [NN88a], Schmidt [Sch87] an... |

16 |
Data Structures and Network Flow Algorithms. Volume CMBS
- Tarjan
- 1983
(Show Context)
Citation Context ... ecr's n; n 0 , is a procedure that merges the equivalence classes of n and n 0 and returns an ecr of the merged equivalence class. An analysis of efficient union/find data structures can be found in =-=[Tar83]-=-. Our notation uses standard control structure dictions and some special operations, which are explained in Figure 3. All primitive operations, apart from union and find, can easily be implemented to ... |

15 | Projections for specialisation - Launchbury - 1987 |

14 |
Higher order partial evaluation – hope for the lambda calculus
- Gomard
- 1989
(Show Context)
Citation Context ...typed, which is reflected in a more complex type structure for (two-level) -terms denoting such unevaluated "object terms". Nielson and 2 In [Gom90] the typestype is actually called "un=-=typed"; and in [Gom89] it is ref-=-erred to as "code" because of its intended interpretation in the two-level -calculus. Nielson [NN88a] and Schmidt [Sch87] have shown that every simply typed -term has a minimal completionse ... |

14 |
Binding Time Analysis and the Taming of SelfApplication
- Bondorf, Jones, et al.
- 1988
(Show Context)
Citation Context ...ays an especially important role in the generation of compilers from self-applicable partial evaluators [JSS85,JSS89,Con88,Rom87,JGB*90,Bon90a,GJ91] as a preprocessing phase to program specialization =-=[BJMS88]-=-. In the early work on partial evaluators a simple dichotomy static/dynamic was used (e.g., [Ses85]). This was generally too conservative for compound data types such as lists, and rewriting of a prog... |

12 | Binding time optimization in programming languages: some thoughts toward the design of the ideal language - Jones, Muchnick - 1976 |

12 | Compiler generation from denotational semantics - Jones, Schmidt - 1980 |

12 | A selfapplicable partial evaluator for the lambda calculus - Jones, Gomard, et al. - 1990 |

8 |
Static properties of partial evaluation
- Schmidt
- 1987
(Show Context)
Citation Context ...en [Mog89], Bondorf [Bon90a,Bon90b], Consel [Con90] and Hunt and Sands [HS91] describe higher-order binding time analysis in an abstract interpretation framework; Nielson and Nielson [NN88a], Schmidt =-=[Sch87]-=- and Gomard [Gom89,Gom90,GJ91] formalize it as a type inference (or type annotation) problem within two-level typed -calculus. A two-level type system has an early-binding and a late-binding variant o... |

7 | Semantics directed compiling for functional languages - Nielson, Nielson - 1986 |

6 | TEMPO: A Unified Treatment of Binding Time and Parameter Passing Concepts in Programming Languages, volume 66 - Jones, Muchnick - 1978 |

4 | Reprinted with corrections - Aho, Sethi, et al. - 1986 |

4 | Simple Type Inference and Unification - Henglein - 1988 |

4 |
Automatic binding time analysis for a typed lambda calculus. Science of Computer Programming
- Nielson, Nielson
- 1988
(Show Context)
Citation Context ... analyzed: Mogensen [Mog89], Bondorf [Bon90a,Bon90b], Consel [Con90] and Hunt and Sands [HS91] describe higher-order binding time analysis in an abstract interpretation framework; Nielson and Nielson =-=[NN88a]-=-, Schmidt [Sch87] and Gomard [Gom89,Gom90,GJ91] formalize it as a type inference (or type annotation) problem within two-level typed -calculus. A two-level type system has an early-binding and a late-... |

1 |
Binding time analysis and the taming of self-application. To appear
- Bondorf, Jones, et al.
- 1988
(Show Context)
Citation Context ...s an especially important role in the generation of compilers from self-applicable partial evaluators [JSS85,JSS89,Con88,Rom87,JGB + 90,Bon90a,GJ91] as a preprocessing phase to program specialization =-=[BJMS88]-=-. In the early work on partial evaluators a simple dichotomy static/dynamic was used (e.g., [Ses85]). This was generally too conservative for compound data types such as lists, and rewriting of a prog... |

1 |
Dynamic typing. Semantique Note 90
- Henglein
- 1991
(Show Context)
Citation Context ...rest since they can be used to solve other analyses; in particular, we have applied it successfully to the description and design an efficient type inference algorithm for a dynamic typing discipline =-=[Hen91]-=-. Several problems might be addressed as a continuation of this work: ffl Binding-time analysis has been cast in different conceptual frameworks: abstract interpretation, projection analysis, and type... |

1 | Static-Scope-Lisp: Splitting an interpreter into compiler and run-time system - Kroeger - 1981 |

1 |
The structure of a self-applicable partial partial evaluator
- Sestoft
- 1985
(Show Context)
Citation Context ...s [JSS85,JSS89,Con88,Rom87,JGB + 90,Bon90a,GJ91] as a preprocessing phase to program specialization [BJMS88]. In the early work on partial evaluators a simple dichotomy static/dynamic was used (e.g., =-=[Ses85]-=-). This was generally too conservative for compound data types such as lists, and rewriting of a program was required to recover more static binding information. This was remedied by using more refine... |

1 | Reprinted with corrections - Principles, Techniques, et al. - 1986 |

1 | Static-Scope-Lisp: splitting an interpreter into compiler and run-time system - Kröger - 1981 |

1 | Mit84] [MM82 - Kauffman - 1987 |

1 | Theory and Practice of Software Development (TAPSOFT - Conf - 1989 |

1 | A compiler generator produced by a self-applicable specializer can have a surprisingly natural and understandable structure - J - 1978 |