A tutorial on computational classical logic and the sequent calculus

We present a model of computation that heavily emphasizes the concept of duality and the interaction between opposites–production interacts with consumption. The symmetry of this framework naturally explains more complicated features of programming languages through relatively familiar concepts. For example, binding a value to a variable is dual to manipulating the flow of control in a program. By looking at the computational interpretation of the sequent calculus, we find a language that lets us speak about duality, control flow, and evaluation order in programs as first-class concepts. We begin by reviewing Gentzen's LK sequent calculus and show how the Curry–Howard isomorphism still applies to give us a different basis for expressing computation. We then illustrate how the fundamental dilemma of computation in the sequent calculus gives rise to a duality between evaluation strategies : strict languages are dual to lazy languages. Finally, we discuss how the concept of focusing , developed in the setting of proof search, is related to the idea of type safety for computation expressed in the sequent calculus. In this regard, we compare and contrast two different methods of focusing that have appeared in the literature, static and dynamic focusing, and illustrate how they are two means to the same end.

[1]  Alexis Saurin,et al.  Classical Call-by-Need and Duality , 2011, TLCA.

[2]  Simon L. Peyton Jones,et al.  Sequent calculus as a compiler intermediate language , 2016, ICFP.

[3]  Olivier Laurent,et al.  Étude de la polarisation en logique , 2001 .

[4]  Philip Wadler,et al.  Call-by-value is dual to call-by-name , 2003, ACM SIGPLAN International Conference on Functional Programming.

[5]  A. Church A Set of Postulates for the Foundation of Logic , 1932 .

[6]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[7]  Andrew Kennedy,et al.  Compiling with continuations, continued , 2007, ICFP '07.

[8]  Matthias Felleisen,et al.  A call-by-need lambda calculus , 1995, POPL '95.

[9]  Jean-Yves Girard,et al.  A new constructive logic: classic logic , 1991, Mathematical Structures in Computer Science.

[10]  Philip Wadler Call-by-Value Is Dual to Call-by-Name - Reloaded , 2005, RTA.

[11]  Hugo Herbelin,et al.  Minimal Classical Logic and Control Operators , 2003, ICALP.

[12]  Gabriel Scherer,et al.  Polarised Intermediate Representation of Lambda Calculus with Sums , 2015, LICS.

[13]  Simon Peyton Jones,et al.  Playing by the rules: rewriting as a practical optimisation technique in GHC , 2001 .

[14]  John C. Reynolds,et al.  The discoveries of continuations , 1993, LISP Symb. Comput..

[15]  Matthias Felleisen,et al.  A Syntactic Approach to Type Soundness , 1994, Inf. Comput..

[16]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[17]  Jean-Louis Krivine,et al.  A call-by-name lambda-calculus machine , 2007, High. Order Symb. Comput..

[18]  Hugo Herbelin,et al.  The duality of computation , 2000, ICFP '00.

[19]  Zena M. Ariola,et al.  The Duality of Construction , 2014, ESOP.

[20]  G. Gentzen Untersuchungen über das logische Schließen. I , 1935 .

[21]  Noam Zeilberger,et al.  The logical basis of evaluation order and pattern-matching , 2009 .

[22]  Jean-Yves Girard Locus Solum: From the Rules of Logic to the Logic of Rules , 2001, CSL.

[23]  Pierre-Louis Curien,et al.  The Duality of Computation under Focus , 2010, IFIP TCS.

[24]  Gabriel Scherer Which types have a unique inhabitant? : Focusing on pure program equivalence. (Quels types ont un habitant unique ? / Quels types ont un habitant unique ? : Focalisons-nous sur l'équivalence de programmes) , 2016 .

[25]  Mark N. Wegman,et al.  Efficiently computing static single assignment form and the control dependence graph , 1991, TOPL.

[26]  Atsushi Ohori,et al.  The Logical Abstract Machine: A Curry-Howard Isomorphism for Machine Code , 1999, Fuji International Symposium on Functional and Logic Programming.

[27]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[28]  R. Kent Dybvig,et al.  Revised5 Report on the Algorithmic Language Scheme , 1986, SIGP.

[29]  Andrzej Filinski Declarative Continuations and Categorical Duality , 1989 .

[30]  Emmanuel Polonovski Subsitutions explicites, logique et normalisation. (Explicit substitutions, logic and normalization) , 2004 .

[31]  J. Girard,et al.  Proofs and types , 1989 .

[32]  Amr Sabry,et al.  Sequent calculi and abstract machines , 2009, TOPL.

[33]  Peter Selinger,et al.  Control categories and duality: on the categorical semantics of the lambda-mu calculus , 2001, Mathematical Structures in Computer Science.

[34]  William A. Howard,et al.  The formulae-as-types notion of construction , 1969 .

[35]  Michel Parigot,et al.  Lambda-Mu-Calculus: An Algorithmic Interpretation of Classical Natural Deduction , 1992, LPAR.

[36]  Hugo Herbelin Séquents qu'on calcule: de l'interprétation du calcul des séquents comme calcul de lambda-termes et comme calcul de stratégies gagnantes. (Computing with sequents: on the interpretation of sequent calculus as a calculus of lambda-terms and as a calculus of winning strategies) , 1995 .

[37]  Matthias Felleisen,et al.  Control operators, the SECD-machine, and the λ-calculus , 1987, Formal Description of Programming Concepts.

[38]  Atsushi Ohori Register Allocation by Proof Transformation , 2003, ESOP.

[39]  de Ng Dick Bruijn Automath A Language for Mathematics , 1973 .

[40]  Andrew W. Appel,et al.  Compiling with Continuations , 1991 .

[41]  Jean-Yves Girard,et al.  Linear Logic , 1987, Theor. Comput. Sci..

[42]  Guillaume Munch-Maccagnoni Focalisation and Classical Realisability , 2009, CSL.

[43]  JEAN-MARC ANDREOLI,et al.  Logic Programming with Focusing Proofs in Linear Logic , 1992, J. Log. Comput..

[44]  Zena M. Ariola,et al.  Structures for structural recursion , 2015, ICFP.

[45]  Timothy G. Griffin,et al.  A formulae-as-type notion of control , 1989, POPL '90.

[46]  Jean-Yves Girard,et al.  On the Unity of Logic , 1993, Ann. Pure Appl. Log..