Browsing by Author "Westbrook, Edwin"
Now showing 1 - 2 of 2
Results Per Page
Sort Options
Item Multi-stage Programming for Mainstream Languages(2009-07-27) Abdelatif, Tamer; Inoue, Jun; Ricken, Mathias; Taha, Walid; Westbrook, Edwin; Yao, YilongMulti-stage programming (MSP) provides a disciplined approach to run-time code generation. In the purely functional setting, it has been shown how MSP can be used to reduce the overhead of abstractions, allowing clean, maintainable code without paying performance penalties. Unfortunately, MSP is difficult to combine with imperative features, which are prevalent in mainstream languages. The central difficulty is scope extrusion, wherein free variables can inadvertently be moved outside the scopes of their binders. This paper proposes a new approach to combining MSP with imperative features that occupies a “sweet spot” in the design space in terms of how well useful MSP applications can be expressed and how easy it is for programmers to understand. The key insight is that escapes (or “anti-quotes”) must be weakly separable from the rest of the code, i.e. the computational effects occurring inside an escape that are visible outside the escape are guaranteed to not contain code. To demonstrate the feasibility of this approach, we formalize a type system based on Lightweight Java which we prove sound, and we also provide an implementation, called Mint, to validate both the expressivity of the type system and the effect of staging on the performance of Java programs.Item Uniform Logical Relations(2011-04-01) Westbrook, EdwinStrong Normalization (SN) is an important property for intensional constructive type theories such as the Calculus of Inductive Constructions (CiC), the basis for the Coq theorem prover. Not only does SN imply consistency, but it also ensures that type-checking is decidable, and further, it provides a straightforward model, the term model, for a theory. Unfortunately, although SN has been proved for fragments of CiC, it is not known how to prove SN for CiC in its entirety, including eliminations for large inductive types as well as higher predicative universes. In this work, we show how to prove SN for full CiC. They key insight given here is that terms must be interpreted in a uniform manner, meaning that the form of the interpretation of a term must not depend on whether the term is a type. We introduce a new technique called Uniform Logical Relations, With uniformity as a guiding principle, and we show that this technique can then be used to prove SN for CiC. An important property of our technique is that it does not rely on Confluence, and thus it could potentially be used for extensions of CiC with added computation rules, such as Extensionality, for which Confluence relies on SN.