CPS Translations and Applications: The Cube and Beyond

  • Authors:
  • Gilles Barthe;John Hatcliff;Morten Heine B. Sørensen

  • Affiliations:
  • Departamento de Informática, Universidade do Minho, 4709 Braga Codex, Portugal. gilles@di.uminho.pt;Department of Computing and Information Sciences, Kansas State University, Manhattan, KS, USA, 66506. hatcliff@cis.ksu.edu;DIKU, Universitetsparken 1, DK-2100 Copenhagen, Denmark. rambo@diku.dk

  • Venue:
  • Higher-Order and Symbolic Computation
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

Continuation passing style (CPS) translations of typedλ-calculi have numerous applications. However, the range ofthese applications has been confined by the fact that CPStranslations are known for non-dependent type systems only,thus excluding well-known systems like the calculus of constructions(CC) and the logical frameworks (LF). This paper presents techniquesfor CPS translating systems with dependent types, with an emphasis onpure type-theoretical applications.In the first part of the paper we review several lines of workin which the need for CPS translations of dependent type systems hasarisen, and discuss the difficulties involved with CPS translatingsuch systems. One way of overcoming these difficulties is to workwith so-called domain-free type systems. Thus, instead ofBarendregt‘s λ-cube we shall consider the domain-freeλ-cube, and instead of traditional pure type systems,we shall consider domain-free pure type systems.We therefore begin the second part by reviewing the domain-freeλ-cube, which includes domain-free versions of CC and LF, andthen present CPS translations for all the systems of the domain-freeλ-cube. We also introduce Direct Style (DS) (i.e., inverseCPS) translations for all the systems of the domain-freeλ-cube; such DS translations, which have been used in anumber of applications, were previously formulated for untyped andsimply-typed languages only.In the third part we review domain-free pure type systems andgeneralize the CPS translations of the domain-free λ-cube toa large class of domain-free pure type systems which includes most ofthe systems that appear in the literature, including those of thedomain-free λ-cube. Many translations that appear in theliterature arise as special cases of ours.In the fourth part of the paper we present two approaches toCPS translations of traditional pure type systems. The first,indirect, technique lifts the CPS translation of domain-free puretype systems to the analogous class of traditional pure type systemsby using results that relate derivations in domain-free andtraditional pure type systems. The second, direct, approachtranslates derivations, requiring a certain order on derivations tobe well-founded. Both techniques yield translations for most of thesystems that appear in the literature, including those ofBarendregt‘s λ-cube.