Finally tagless, partially evaluated tagless staged interpreters for simpler typed languages

Jacques Carette, Oleg Kiselyov, Chung Chieh Shan

Research output: Chapter in Book/Report/Conference proceedingConference contribution

21 Citations (Scopus)

Abstract

We have built the first family of tagless interpretations for a higher-order typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically type-preserving interpretations include an evaluator, a compiler (or staged evaluator), a partial evaluator, and call-by-name and call-by-value CPS transformers. Our main idea is to encode HOAS using cogen functions rather than data constructors. In other words, we represent object terms not in an initial algebra but using the coalgebraic structure of the A-calculus. Our representation also simulates inductive maps from types to types, which are required for typed partial evaluation and CPS transformations. Our encoding of an object term abstracts over the various ways to interpret it, yet statically assures that the interpreters never get stuck. To achieve self-interpretation and show Jones-optimality, we relate this exemplar of higher-rank and higher-kind polymorphism to plugging a term into a context of let-polymorphic bindings.

Original languageEnglish
Title of host publicationProgramming Languages and Systems - 5th Asian Symposium, APLAS 2007, Proceedings
Pages222-238
Number of pages17
Publication statusPublished - 2007 Dec 1
Externally publishedYes
Event5th Asian Symposium on Programming Languages and Systems, APLAS 2007 - Singapore, Singapore
Duration: 2007 Nov 292007 Dec 1

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume4807 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Other

Other5th Asian Symposium on Programming Languages and Systems, APLAS 2007
CountrySingapore
CitySingapore
Period07/11/2907/12/1

ASJC Scopus subject areas

  • Theoretical Computer Science
  • Computer Science(all)

Fingerprint Dive into the research topics of 'Finally tagless, partially evaluated tagless staged interpreters for simpler typed languages'. Together they form a unique fingerprint.

  • Cite this

    Carette, J., Kiselyov, O., & Shan, C. C. (2007). Finally tagless, partially evaluated tagless staged interpreters for simpler typed languages. In Programming Languages and Systems - 5th Asian Symposium, APLAS 2007, Proceedings (pp. 222-238). (Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics); Vol. 4807 LNCS).