Type inference in intuitionistic linear logic

We study the type checking and type inference problems for intuitionistic linear logic: given a System F typed λ-term, (i) for an alleged linear logic type, determine whether there exists a corresponding typing derivation in linear logic (type checking) ii) provide a concise description of all possible corresponding linear logic typings (type inference). We solve these problems using a novel algorithmic type system for linear logic whose typing rules carry arithmetic side conditions describing essentially the nesting depth of (proof-net) boxes. By understanding these side conditions as unknowns we then reduce type inference to solving a system of arithmetic constraints. We show that these constraint systems fall into a tractable class hence leading to an efficient (polynomial-time) solution. There are two important restrictions: first, our source language is typed System F rather than untyped lambda calculus; this is necessary because type inference for System F is known to be undecidable. Second, we assume that sharing is made explicit in the input, thus we do not try to automatically infer opportunities for sharing identical subterms. Relieving the latter restriction is left as a challenge for future work.

[1]  Christer Bäckström,et al.  A Linear-Programming Approach to Temporal Reasoning , 1996, AAAI/IAAI, Vol. 2.

[2]  CoppolaPaolo,et al.  Optimizing optimal reduction , 2006 .

[3]  J. Gregory Morrisett,et al.  Linear Regions Are All You Need , 2006, ESOP.

[4]  Frank Pfenning,et al.  On a modal lambda calculus for S4 , 1995, MFPS.

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

[6]  M. Hofmann A Type System for Bounded Space and Functional In-Place Update , 2000, Nord. J. Comput..

[7]  Richard Sharp,et al.  Linear Types for Packet Processing , 2004, ESOP.

[8]  Philip Wadler,et al.  Is there a use for linear logic? , 1991, PEPM '91.

[9]  Andrea Masini,et al.  An Analysis of (Linear) Exponentials Based on Extended Sequents , 1998, Log. J. IGPL.

[10]  Ian Mackie,et al.  Lilac: a functional programming language based on linear logic , 1994, Journal of Functional Programming.

[11]  Andrea Masini,et al.  On the fine structure of the exponential rule , 1995 .

[12]  L. D. Moura,et al.  The YICES SMT Solver , 2006 .

[13]  Patrick Lincoln,et al.  Linear logic , 1992, SIGA.

[14]  Kazushige Terui,et al.  A Feasible Algorithm for Typing in Elementary Affine Logic , 2005, TLCA.

[15]  Kazushige Terui,et al.  Verification of Ptime Reducibility for system F Terms: Type Inference in Dual Light Affine Logic , 2007, Log. Methods Comput. Sci..

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

[17]  Paolo Coppola,et al.  Optimizing optimal reduction: A type inference algorithm for elementary affine logic , 2006, TOCL.

[18]  Paolo Coppola,et al.  Principal Typing for Lambda Calculus in Elementary Affine Logic , 2004, Fundam. Informaticae.

[19]  F. Pfenning,et al.  On a Modal λ-Calculus for S41 1This work is supported by NSF Grant CCR-9303383 and the Advanced Research Projects Agency under ARPA Order No. 8313. , 1995 .

[20]  WadlerPhilip Is there a use for linear logic , 1991 .

[21]  Erik Barendsen,et al.  Uniqueness Type Inference , 1995, PLILP.

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