2014 · 12 citations · 25 references
ComputingComputer ScienceProgramming LanguagesSyntaxTheory Of ComputationRecursion TheoryType CheckingType SystemsInfinite RegressInterpretersPolymorphic Type SystemsPolymorphic TypesStatic Type CheckingType PolymorphismType TheoryTyped Lambda Calculus
In 1991, Pfenning and Lee studied whether System F could support a typed self-interpreter. They concluded that typed self-representation for System F "seems to be impossible", but were able to represent System F in Fω. Further, they found that the representation of Fω requires kind polymorphism, which is outside Fω. In 2009, Rendel, Ostermann and Hofer conjectured that the representation of kind-polymorphic terms would require another, higher form of polymorphism. Is this a case of infinite regress? We show that it is not and present a typed self-representation for Girard's System U, the first for a λ-calculus with decidable type checking. System U extends System Fω with kind polymorphic terms and types. We show that kind polymorphic types (i.e. types that depend on kinds) are sufficient to "tie the knot" -- they enable representations of kind polymorphic terms without introducing another form of polymorphism. Our self-representation supports operations that iterate over a term, each of which can be applied to a representation of itself. We present three typed self-applicable operations: a self-interpreter that recovers a term from its representation, a predicate that tests the intensional structure of a term, and a typed continuation-passing-style (CPS) transformation -- the first typed self-applicable CPS transformation. Our techniques could have applications from verifiably type-preserving metaprograms, to growable typed languages, to more efficient self-interpreters.
25
Definitional interpreters for higher-order programming languages
John Reynolds · 1972 · 668 citations
From system F to typed assembly language
Greg Morrisett, David Walker, Karl Crary et al. · ACM Transactions on Programming Languages and Systems · 1999 · 587 citations · Full text
λ-definability and recursiveness
S. C. Kleene · Duke Mathematical Journal · 1936 · 264 citations