Type Directed Partial Evaluation for Level-1 Shift and Reset

  title={Type Directed Partial Evaluation for Level-1 Shift and Reset},
  author={Danko Ilik},
  • Danko Ilik
  • Published 7 October 2012
  • Computer Science
We present an implementation in the Coq proof assistant of type directed partial evaluation (TDPE) algorithms for call-by-name and call-by-value versions of shift and reset delimited control operators, and in presence of strong sum types. We prove that the algorithm transforms well-typed programs to ones in normal form. These normal forms can not always be arrived at using the so far known equational theories. The typing system does not allow answer-type modification for function types and… 
3 Citations

Figures and Tables from this paper

Proofs in continuation-passing style: normalization of Gödel's System T extended with sums and delimited control operators: Distilled Tutorial

This tutorial will guide the participants on how to use the Agda proof assistant to write a normalization by evaluation (NBE) algorithm in CPS, starting with simply typed lambda calculus and ending with Gödel's System T extended with delimited control operators.

The Exp-Log Normal Form of Types and Canonical Terms for Lambda Calculus with Sums

This paper isolates a type normal form, ENF, generalizing the usual disjunctive normal form to handle exponentials, and shows that the eta-long beta-normal form of terms at ENF type is canonical, when the etA axiom for sums is expressed via evaluation contexts.

Perspectives for proof unwinding by programming languages techniques

This scientific essay, written for the audience of proof theorists as well as the working mathematician, is not a survey of the field, but rather a personal view of the author who hopes that it may inspire future and fellow researchers.



Context-based proofs of termination for typed delimited-control operators

From the normalization proofs, call-by-value and call- by-name evaluators in continuation-passing style with two layers of continuations are extracted; by construction, these evaluator are instances of normalization by evaluation.

Continuation-passing style models complete for intuitionistic logic

  • Danko Ilik
  • Computer Science
    Ann. Pure Appl. Log.
  • 2013

Towards Type-Directed Partial Evaluation for Shift and Reset

This paper reports on the ongoing work to extend type-directed partial evaluation (TDPE) to cope with delimited-control operators, shift and reset. By examining call-by-value TDPE of CPS expressions

Equational axiomatization of call-by-name delimited control

Control operators for delimited continuations are useful in various fields such as partial evaluation, CPS translation, and representation of monadic effects. While many works in the literature study

Type-directed partial evaluation

This paper bridges partial evaluation and ¿-calculus normalization through higher-order abstract syntax, and touches upon parametricity, proof theory, and type theory (including subtyping and coercions), compiler optimization, and rut-time code generation (including decompilation).

Online partial evaluation for shift and reset

  • K. Asai
  • Computer Science
    PEPM '02
  • 2002
This paper gives the semantics of the delimited continuation constructs in two ways: one by writing a continuation passing style (CPS) interpreter and the other by transforming them into CPS which produces the result in CPS.

A compiled implementation of strong reduction

This work develops and proves correct a strong reducer and ß-equivalence checker for the λ-calculus with products, sums, and guarded fixpoints and demonstrates important speed-ups compared with the original interpreter-based implementation of strong reduction in Coq.

An inverse of the evaluation functional for typed lambda -calculus

A functional p to e (procedure to expression) that inverts the evaluation functional for typed lambda -terms in any model of typedlambda -calculus containing some basic arithmetic is defined and is used to normalize (the lambda -representations of) natural deduction proofs of (higher order) arithmetic.

A Functional Abstraction of Typed Contexts

Making functional control abstractions first-class offers a new area in programming which this paper explores, and an extension towards gaining control over embedding contexts is extended.

Normalization by Evaluation for the Computational Lambda-Calculus

A suitable residualizing interpretation of base types, constants, and computational effects allows us to extract a syntactic normal form from a term's denotation, leading directly to a practical normalization algorithm.