How to prove your calculus is decidable: practical applications of second-order algebraic theories and computation

We present a general methodology of proving the decidability of equational theory of programming language concepts in the framework of second-order algebraic theories. We propose a Haskell-based analysis tool SOL, Second-Order Laboratory, which assists the proofs of confluence and strong normalisation of computation rules derived from second-order algebraic theories. To cover various examples in programming language theory, we combine and extend both syntactical and semantical results of second-order computation in a non-trivial manner. We demonstrate how to prove decidability of various algebraic theories in the literature. It includes the equational theories of monad and lambda-calculi, Plotkin and Power's theory of states, and Stark's theory of pi-calculus.

[1]  Gordon D. Plotkin,et al.  Notions of Computation Determine Monads , 2002, FoSSaCS.

[2]  S. Lindley Reducibility and > >-lifting for Computation Types , 2004 .

[3]  Frédéric Blanqui,et al.  Termination of rewrite relations on λ-terms based on Girard's notion of reducibility , 2015, Theor. Comput. Sci..

[4]  D. Knuth,et al.  Simple Word Problems in Universal Algebras , 1983 .

[5]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[6]  Chung-Kil Hur,et al.  Second-order equational logic , 2010, CSL 2010.

[7]  Christian Prehofer,et al.  Solving higher order equations: from logic to programming , 2012 .

[8]  E. Moggi,et al.  A fully-abstract model for the /spl pi/-calculus , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[9]  Nick Benton,et al.  Traced Premonoidal Categories , 2003, RAIRO Theor. Informatics Appl..

[10]  Makoto Hamana Free S-Monoids: A Higher-Order Syntax with Metavariables , 2004, APLAS.

[11]  Philip Wadler,et al.  Comprehending monads , 1990, Mathematical Structures in Computer Science.

[12]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[13]  Marcelo P. Fiore,et al.  Semantic analysis of normalisation by evaluation for typed lambda calculus , 2002, PPDP '02.

[14]  Frank Pfenning,et al.  Higher-order abstract syntax , 1988, PLDI '88.

[15]  Davide Sangiorgi,et al.  Communicating and Mobile Systems: the π-calculus, , 2000 .

[16]  HU Zhenjiang,et al.  Deterministic Second-order Patterns in Program Transformation , 2003 .

[17]  Makoto Hamana,et al.  Multiversal Polymorphic Algebraic Theories: Syntax, Semantics, Translations, and Equational Logic , 2013, 2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science.

[18]  Richard S. Bird,et al.  Algebra of programming , 1997, Prentice Hall International series in computer science.

[19]  Makoto Hamana Strongly Normalising Cyclic Data Computation by Iteration Categories of Second-Order Algebraic Theories , 2016, FSCD.

[20]  Makoto Hamana,et al.  Semantic Labelling for Proving Termination of Combinatory Reduction Systems , 2009, WFLP.

[21]  Thierry Coquand,et al.  Pattern Matching with Dependent Types , 1992 .

[22]  Masahito Hasegawa,et al.  Classical linear logic of implications , 2002, Mathematical Structures in Computer Science.

[23]  Makoto Hamana Higher-order semantic labelling for inductive datatype systems , 2007, PPDP '07.

[24]  Lewis Denver Baxter The complexity of unification. , 1976 .

[25]  Dale Miller,et al.  Functions-as-Constructors Higher-Order Unification , 2016, FSCD.

[26]  Paul-André Melliès,et al.  Segal Condition Meets Computational Effects , 2010, 2010 25th Annual IEEE Symposium on Logic in Computer Science.

[27]  Sam Staton,et al.  An Algebraic Presentation of Predicate Logic - (Extended Abstract) , 2013, FoSSaCS.

[28]  Dale Miller,et al.  A Logic Programming Language with Lambda-Abstraction, Function Variables, and Simple Unification , 1991, J. Log. Comput..

[29]  I. Stark,et al.  A fully abstract domain model for the /spl pi/-calculus , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[30]  D. Prawitz Ideas and Results in Proof Theory , 1971 .

[31]  Sam Staton,et al.  Two Cotensors in One: Presentations of Algebraic Theories for Local State and Fresh Names , 2009, MFPS.

[32]  Ralf Hinze,et al.  Just do it: simple monadic equational reasoning , 2011, ICFP.

[33]  Ola Mahmoud,et al.  Second-order algebraic theories , 2011 .

[34]  Makoto Hamana Universal Algebra for Termination of Higher-Order Rewriting , 2005, RTA.

[35]  I. Stark Free-Algebra Models for the π-Calculus , 1997 .

[36]  Tobias Nipkow,et al.  Higher-Order Rewrite Systems and Their Confluence , 1998, Theor. Comput. Sci..

[37]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

[38]  Masahito Hasegawa,et al.  A Terminating and Confluent Linear Lambda Calculus , 2006, RTA.

[39]  Gérard P. Huet,et al.  A Unification Algorithm for Typed lambda-Calculus , 1975, Theor. Comput. Sci..

[40]  Simon L. Peyton Jones,et al.  Associated types with class , 2005, POPL '05.

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

[42]  Frédéric Blanqui,et al.  Termination and Confluence of Higher-Order Rewrite Systems , 2000, RTA.

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

[44]  Robin Milner Semantic ideas in computing , 1997 .

[45]  Jaco van de Pol,et al.  Termination Proofs for Higher-order Rewrite Systems , 1993, HOA.

[46]  Simon L. Peyton Jones,et al.  Associated type synonyms , 2005, ICFP '05.

[47]  Tobias Nipkow,et al.  Higher-order critical pairs , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[48]  Marcelo P. Fiore,et al.  Second-Order and Dependently-Sorted Abstract Syntax , 2008, 2008 23rd Annual IEEE Symposium on Logic in Computer Science.

[49]  Masato Takeichi,et al.  Deterministic second-order patterns , 2004, Inf. Process. Lett..

[50]  Gérard P. Huet,et al.  Confluent Reductions: Abstract Properties and Applications to Term Rewriting Systems , 1980, J. ACM.

[51]  Sam Staton,et al.  Algebraic Effects, Linearity, and Quantum Programming Languages , 2015, POPL.

[52]  Chang Liu,et al.  Term rewriting and all that , 2000, SOEN.

[53]  Gordon D. Plotkin,et al.  Abstract syntax and variable binding , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[54]  Nick Benton,et al.  Computational types from a logical perspective , 1998, Journal of Functional Programming.

[55]  Masato Takeichi,et al.  Deterministic Higher-Order Patterns for Program Transformation , 2003, LOPSTR.