Efficiency of lambda-encodings in total type theory
- 10 March 2016
- journal article
- research article
- Published by Cambridge University Press (CUP) in Journal of Functional Programming
- Vol. 26
Abstract
This paper proposes a new typed lambda-encoding for inductive types which, for Peano numerals, has the expected time complexities for basic operations like addition and multiplication, has a constant-time predecessor function, and requires only quadratic space to encode a numeral. This improves on the exponential space required by the Parigot encoding. Like the Parigot encoding, the new encoding is typable in System F-omega plus positive-recursive type definitions, a total type theory. The new encoding is compared with previous ones through a significant case study: mergesort using Braun trees. The practical runtime efficiency of the new encoding, and the Church and Parigot encodings, are compared by two translations, one to Racket and one to Haskell, on a small suite of benchmarks.Keywords
This publication has 6 references indexed in Scilit:
- Church Encoding of Data Types Considered Harmful for Implementations2014
- THEORETICAL PEARL Church numerals, twice!Journal of Functional Programming, 2004
- Three algorithms on Braun treesJournal of Functional Programming, 1997
- Parallel Implementations of Functional Programming LanguagesThe Computer Journal, 1989
- The Calculi of Lambda Conversion. (AM-6)1985
- Automatic synthesis of typed Λ-programs on term algebrasTheoretical Computer Science, 1985