Conference Paper

Linearity and recursion in a typed Lambda-calculus.

DOI: 10.1145/2003476.2003500 Conference: Proceedings of the 13th International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, July 20-22, 2011, Odense, Denmark
Source: DBLP

ABSTRACT We show that the full PCF language can be encoded in L_rec, a syntactically linear λ-calculus extended with numbers, pairs, and an unbounded recursor that preserves the syntactic linearity of the calculus. We give call-by-name and call-by-value evaluation strategies and discuss implementation techniques for L_rec, exploiting its linearity.

0 Bookmarks
 · 
70 Views
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: We present a name free ?-calculus with explicit substitutions, based on a generalised notion of director strings. Terms are annotated with information – directors – that indicate how substitutions should be propagated. We first present a calculus where we can simulate arbitrary ß-reduction steps, and then simplify the rules to model the evaluation of functional programs (reduction to weak head normal form). We also show that we can define the closed reduction strategy. This is a weak strategy which, in contrast with standard weak strategies, allows certain reductions to take place inside ?-abstractions thus offering more sharing. Our experimental results confirm that, for large combinator-based terms, our weak evaluation strategies out-perform standard evaluators. Moreover, we derive two abstract machines for strong reduction which inherit the efficiency of the weak evaluators.
    Applicable Algebra in Engineering Communication and Computing 01/2005; 15:393-437. · 0.76 Impact Factor
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: Recent work has shown that predicative recursion combined with a linear typing discipline gives rise to type systems which guarantee polynomial runtime of well-typed programs while allowing for higher-typed primitive recursion on inductive datatypes. Although these systems allow one to express all polynomial time functions they reject many natural formulations of obviously polynomial time algorithms. The reason is that under the predicativity regime a recursively defined function is not allowed to serve as step function of a subsequent recursive definition. However, in most functional programs involving inductive data structures such iterated recursion does occur. A typical example is insertion sort which involves iteration of a (already recursively defined) insertion function. A closer analysis of such examples reveals that the involved functions do not increase the size of their input and that this is why their repeated iteration does not lead beyond polynomial time. I...
    12/1998;
  • Source
    [Show abstract] [Hide abstract]
    ABSTRACT: We show that the full PCF language can be encoded in Lrec, a linear lambda-calculus extended with numbers, pairs and an unbounded recursor that preserves the syntactic linearity of the calculus. Thus, Lrec is a Turing complete extension of the linear lambda-calculus. We discuss evaluation strategies and implementation techniques for Lrec, exploiting the linearity of the system.
    Computing Research Repository - CORR. 01/2010;