## Correctness of a Region-Based Binding-Time Analysis (1997)

Venue: | Carnegie Mellon University, Elsevier Science BV |

Citations: | 6 - 5 self |

### BibTeX

@INPROCEEDINGS{Thiemann97correctnessof,

author = {Peter J. Thiemann},

title = {Correctness of a Region-Based Binding-Time Analysis},

booktitle = {Carnegie Mellon University, Elsevier Science BV},

year = {1997},

pages = {2--6}

}

### OpenURL

### Abstract

A binding-time analysis is the first pass of an offline partial evaluator. It determines which parts of a program may be executed at specialization time. Region-based binding-time analysis applies to higher-order programming languages with firstclass references. The consideration of effects in the determination of binding time properties makes it possible to have a partial evaluator perform assignments at specialization time. We present such a region-based binding-time analysis and prove its correctness with respect to a continuation-style semantics for an annotated call-by-value lambda calculus with ML-style references. We provide a relative correctness proof that relies on the correctness of region inference and on the correctness of a binding-time analysis for an applied lambda calculus. The main tool in the proof is a translation from terms with explicit region annotations to an extended continuation-passing store-passing style. The analysis is monovariant/monomorphic, however, ess...

### Citations

1184 |
The Lambda Calculus: Its Syntax and Semantics
- Barendregt
- 1984
(Show Context)
Citation Context ...adopt the standard notion of free variables in E for region variables (frv(E)), too. Bound region variables may be renamed so as to avoid name clashes, similar to ff-conversion in the lambda calculus =-=[2]-=-. We write letregion ae in E for letregion ae 1 in : : : letregion ae n in E. 3.3 Translation Source expressions and region expressions are connected via a translation that is guided by types and effe... |

667 |
Partial Evaluation and Automatic Program Generation
- Jones, Gomard, et al.
- 1993
(Show Context)
Citation Context ... to derive a polyvariant/polymorphic analysis. Key words: partial evaluation, state, continuations, region inference 1 Introduction Offline partial evaluation is a successful specialization technique =-=[16]-=-. Bindingtime analysis (BTA) is a necessary prerequisite for offline partial evaluation. It annotates all program points of a program as either static (executable at specialization time) or dynamic ad... |

564 | Program Analysis and Specialization for the C Programming Language
- Andersen
- 1994
(Show Context)
Citation Context ...is translation is even more fine-grained than the translation presented here: it models the store by a dynamically expanding tuple of contents of cells. Partial evaluation for languages with pointers =-=[1, 5]-=- has similar problems as discussed in this paper. An interesting related approach is put forward by Moura and others [22]. They propose a method for static analysis and specialization of imperative pr... |

457 | Computational lambda-calculus and monads
- Moggi
- 1989
(Show Context)
Citation Context ...scribe an offline partial evaluator for a language similar to the one treated in this paper. Dussart and others [10] describe a type specializer for an extension of Moggi's computational metalanguage =-=[20]-=- by first-class references and the operations thereof. Type specialization performs specialization by type inference and is thus able to overcome some limitations Thiemann of partial evaluators for ty... |

308 | Definitional interpreters for higher-order programming languages
- Reynolds
- 1972
(Show Context)
Citation Context ...e start from work on region and effect inference [30, 32] and show how to internalize the results of region inference using a translation to extended continuation-passing store-passing style (ECPSPS) =-=[27,29]-=-. The idea here is to structure the store according to the regions that are active at a given point of the program. The proposed analysis starts with the output of a region inference algorithm: a prog... |

251 | Polymorphic effect systems
- Lucassen, Gifford
- 1988
(Show Context)
Citation Context ...to the reference. The subeffecting rule ((does)) can be used whenever there is an effect mismatch in the rule ((set)) or in the application rule ((app)). The ((mask)) rule implements (effect) masking =-=[18]-=-. This rule makes it possible to delimit regions of memory and their lifetimes by masking out all effects on regions that are not observable anymore. It only retains those effects ffl that affect regi... |

220 |
Call-by-name, call-by-value, and the -calculus
- Plotkin
- 1975
(Show Context)
Citation Context ..." [32]. 4 Extended Continuation-Passing Store-Passing Style Now that we have made region information explicit, we can take the next step. Similar to the way the continuation-passing style transla=-=tion [26]-=- internalizes the evaluation order, a store-passing style translation translates imperative operations to explicit operations on a concrete representation of the store in an augmented lambda calculus ... |

192 | A general approach for run-time specialization and its application to C
- Consel, Noël
- 1996
(Show Context)
Citation Context ...is translation is even more fine-grained than the translation presented here: it models the store by a dynamically expanding tuple of contents of cells. Partial evaluation for languages with pointers =-=[1, 5]-=- has similar problems as discussed in this paper. An interesting related approach is put forward by Moura and others [22]. They propose a method for static analysis and specialization of imperative pr... |

125 | Polymorphic Type, Region and Effect Inference
- Talpin, Jouvelot
- 1992
(Show Context)
Citation Context ...nd interpreters that implement laziness using updatable closures. Type information alone is not enough to specify a BTA for such a partial evaluator. We start from work on region and effect inference =-=[30, 32]-=- and show how to internalize the results of region inference using a translation to extended continuation-passing store-passing style (ECPSPS) [27,29]. The idea here is to structure the store accordin... |

118 | Danvy “Automatic autoprojection of recursive equations with global variables and abstract data types
- Bondorf, O
- 1991
(Show Context)
Citation Context ...static because its scope does not interfere with a dynamic abstraction. d y:letregion s ae in let s x = (new s 5 at ae) in lift (get s x at ae) + d y Other BTAs for languages with comparable features =-=[3]-=- annotate all expressions as dynamic. 3 Region Inference 3.1 Source Language Figure 1 shows the grammar of source language expressions e 2s(cf. [30]). The dynamic semantics is identical to the one use... |

107 | Danvy and Andrzej Filinski. Representing control: a study of the CPS transformation - Olivier - 1992 |

78 | Elf: a language for logic definition and verified metaprogram- ming
- Pfenning
- 1989
(Show Context)
Citation Context ...mantics for the two-level lambda calculus, and by Wand [33] for Mogensen's specializer for the lambda calculus [19]. Hatcliff [13] specifies and proves correct a BTA and specializer for PCF using ELF =-=[25]-=-. The specializer is again given by an operational semantics. Hatcliff and Danvy [14] give a correctness proof for a BTA with respect to a specializer based on Moggi's computational metalanguage [20].... |

59 | For a better support of static data flow
- Consel, Danvy
- 1991
(Show Context)
Citation Context ...oncrete representation of the store in an augmented lambda calculus [28]. Since we are also interested in exploiting the beneficial impact of continuation-passing style on the binding-time properties =-=[4]-=-, we develop a translation to continuation-passing store-passing style, similar to that used in the definitional interpreters of Reynolds [27]. Our translation differs from these approaches [27,28] in... |

57 | Danvy and Andrzej Filinski. Abstracting control - Olivier |

38 | Polymorphic binding-time analysis - Henglein, Mossin |

35 |
A self-applicable partial evaluator for the lambda calculus: Correctness and pragmatics
- Gomard
- 1992
(Show Context)
Citation Context ...tended specification of the specializer is presented elsewhere [11]. The correctness of BTA for a lambda calculus has been considered by Nielson [23] using small-step operational semantics, by Gomard =-=[12]-=- on the basis of a denotational specification of the specializer, by Palsberg [24] for a reduction semantics for the two-level lambda calculus, and by Wand [33] for Mogensen's specializer for the lamb... |

34 | The essence of eta-expansion in partial evaluation - Danvy, Malmkjr, et al. - 1995 |

34 | A computational formalization for partial evaluation
- Hatcliff, Danvy
- 1997
(Show Context)
Citation Context ...r for the lambda calculus [19]. Hatcliff [13] specifies and proves correct a BTA and specializer for PCF using ELF [25]. The specializer is again given by an operational semantics. Hatcliff and Danvy =-=[14]-=- give a correctness proof for a BTA with respect to a specializer based on Moggi's computational metalanguage [20]. 9 Conclusion Region inference provides a solid basis for a BTA for a higher-order im... |

28 | Polymorphic recursion and subtype qualifications: Polymorphic binding-time analysis in polynomial time
- Dussart, Henglein, et al.
- 1995
(Show Context)
Citation Context ...ns and its region-inference derivation. Similar to type-based BTA regions, types, and expressions get binding-time annotations. The well-known well-formedness criteria for bindingtime annotated types =-=[9,31]-=- are refined to take into account the annotations of regions. The RBTA (region-based BTA) computes an annotation that fulfills the extended well-formedness criteria. Furthermore the annotation is mini... |

27 | Partial evaluation for higher-order languages with state. Available from http://www.informatik.uni-freiburg.de/̃thiemann/papers/index.html
- Thiemann, Dussart
- 1999
(Show Context)
Citation Context ...some depth [12--14, 23, 24, 33]. With the advent of offline partial evaluators for functional languages with state the correctness issue of BTA comes up again. The novelty of these partial evaluators =-=[11]-=- is their ability to perform operations on first-class references at specialization time. This facility greatly enhances the power of partial evaluation, which now applies to programs in message-passi... |

24 | E±cient self-interpretations in lambda calculus
- Mogensen
- 1992
(Show Context)
Citation Context ...s of a denotational specification of the specializer, by Palsberg [24] for a reduction semantics for the two-level lambda calculus, and by Wand [33] for Mogensen's specializer for the lambda calculus =-=[19]-=-. Hatcliff [13] specifies and proves correct a BTA and specializer for PCF using ELF [25]. The specializer is again given by an operational semantics. Hatcliff and Danvy [14] give a correctness proof ... |

17 | Correctness of binding-time analysis
- Palsberg
- 1993
(Show Context)
Citation Context ... never builds residual code which contains a static function. This property is quite similar to type safety. The correctness of BTAs for functional languages has already been considered in some depth =-=[12--14, 23, 24, 33]-=-. With the advent of offline partial evaluators for functional languages with state the correctness issue of BTA comes up again. The novelty of these partial evaluators [11] is their ability to perfor... |

12 | Mechanically verifying the correctness of an offline partial evaluator (extended version
- Hatcliff
- 1995
(Show Context)
Citation Context ...onal specification of the specializer, by Palsberg [24] for a reduction semantics for the two-level lambda calculus, and by Wand [33] for Mogensen's specializer for the lambda calculus [19]. Hatcliff =-=[13]-=- specifies and proves correct a BTA and specializer for PCF using ELF [25]. The specializer is again given by an operational semantics. Hatcliff and Danvy [14] give a correctness proof for a BTA with ... |

12 | Reasoning about explicit and implicit representations of state
- Sabry, Field
- 1993
(Show Context)
Citation Context ... internalizes the evaluation order, a store-passing style translation translates imperative operations to explicit operations on a concrete representation of the store in an augmented lambda calculus =-=[28]-=-. Since we are also interested in exploiting the beneficial impact of continuation-passing style on the binding-time properties [4], we develop a translation to continuation-passing store-passing styl... |

9 | Type specialisation for imperative languages
- Dussart, Hughes, et al.
- 1997
(Show Context)
Citation Context ... specialization time have received some attention recently. Dussart and Thiemann [11] describe an offline partial evaluator for a language similar to the one treated in this paper. Dussart and others =-=[10]-=- describe a type specializer for an extension of Moggi's computational metalanguage [20] by first-class references and the operations thereof. Type specialization performs specialization by type infer... |

8 |
A Formal Type System for Comparing Partial Evaluators
- Nielson
- 1988
(Show Context)
Citation Context ... never builds residual code which contains a static function. This property is quite similar to type safety. The correctness of BTAs for functional languages has already been considered in some depth =-=[12--14, 23, 24, 33]-=-. With the advent of offline partial evaluators for functional languages with state the correctness issue of BTA comes up again. The novelty of these partial evaluators [11] is their ability to perfor... |

7 | A unified framework for binding-time analysis
- Thiemann
(Show Context)
Citation Context ...g "with binding-time assumption R and type assumption \Gamma the annotatedssto -expression E has annotated type �� and effect ffl." Annotated target expressions and their annotated types=-= are standard [9, 31]. Fo-=-r completeness, we define them here again: t ::= x j t@ b t jsb x:t j rec b f(x):t j (t; : : : ; t) b j �� b (n;i) (t) j ffl b j fnew b t t j fget b t t j fupd b t t t The annotated type language:... |

6 |
Denotational semantics, volume B of Handbook of Theoretical
- Mosses
- 1990
(Show Context)
Citation Context ...e heap t 1 at location t 2 with the value of t 3 . It passes the updated heap to its continuation. Lower level definitions of these operations may be found in standard texts on denotational semantics =-=[21, 29]-=-. For example, they can be easily defined in Thiemann terms ofssto extended with numbers. We will make use of a pattern matching notation for abstractions, e.g. (x; y):t, in order simplify the decompo... |

6 |
Bridging the gap between functional and imperative languages
- Moura
- 1997
(Show Context)
Citation Context ...g tuple of contents of cells. Partial evaluation for languages with pointers [1, 5] has similar problems as discussed in this paper. An interesting related approach is put forward by Moura and others =-=[22]-=-. They propose a method for static analysis and specialization of imperative programs (the source language is C) via a translation to static single assignment form and a sophisticated variant of a tra... |

3 |
Denotational Semantics, A Methodology for Software Development
- Schmidt
- 1986
(Show Context)
Citation Context ...e start from work on region and effect inference [30, 32] and show how to internalize the results of region inference using a translation to extended continuation-passing store-passing style (ECPSPS) =-=[27,29]-=-. The idea here is to structure the store according to the regions that are active at a given point of the program. The proposed analysis starts with the output of a region inference algorithm: a prog... |