Optimizing optimal reduction: A type inference algorithm for elementary affine logic

We propose a type inference algorithm for lambda terms in elementary affine logic (EAL). The algorithm decorates the syntax tree of a simple typed lambda term and collects a set of linear constraints. The result is a parametric elementary type that can be instantiated with any solution of the set of collected constraints.We point out that the typeability of lambda terms in EAL has a practical counterpart, since it is possible to reduce any EAL-typeable lambda terms with the Lamping's abstract algorithm obtaining a substantial increase of performances.We show how to apply the same techniques to obtain decorations of intuitionistic proofs into linear logic proofs.

[1]  Vincent Danos,et al.  Linear logic and elementary time , 2003, Inf. Comput..

[2]  Jean-Yves Girard,et al.  Light Linear Logic , 1998, Inf. Comput..

[3]  Andrea Asperti,et al.  The optimal implementation of functional programming languages , 1998, Cambridge tracts in theoretical computer science.

[4]  Paolo Coppola,et al.  Principal Typing in Elementary Affine Logic , 2003, TLCA.

[5]  Paolo Coppola,et al.  Typing Lambda Terms in Elementary Logic with Linear Constraints , 2001, TLCA.

[6]  Nick Benton,et al.  A Term Calculus for Intuitionistic Linear Logic , 1993, TLCA.

[7]  W. V. Quine,et al.  Natural deduction , 2021, An Introduction to Proof Theory.

[8]  Patrick Baillot Checking Polynomial Time Complexity with Types , 2002, IFIP TCS.

[9]  A Asperti Light Aane Logic , 1998 .

[10]  Paolo Coppola,et al.  (Optimal) duplication is not elementary recursive , 2000, POPL '00.

[11]  H.A.J.M. Schellinx,et al.  The noble art of linear decorating , 1994 .

[12]  Ron Dinishak The optimal implementation of functional programming languages , 2000, SOEN.

[13]  Harry G. Mairson A Simple Proof of a Theorem of Statman , 1992, Theor. Comput. Sci..

[14]  Luca Roversi A Polymorphic Language Which Is Typable and Poly-step , 1998, ASIAN.

[15]  Andrea Asperti Light affine logic , 1998, Proceedings. Thirteenth Annual IEEE Symposium on Logic in Computer Science (Cat. No.98CB36226).

[16]  John Lamping An algorithm for optimal lambda calculus reduction , 1989, POPL '90.

[17]  Vinod Kathail,et al.  Optimal interpreters for lambda-calculus based functional languages , 1990 .

[18]  Vincent Danos,et al.  On the linear decoration of intuitionistic derivations , 1995, Arch. Math. Log..