Modular Termination for Second-Order Computation Rules and Application to Algebraic Effect Handlers.

We present a new modular proof method of termination for second-order computation, and report its implementation SOL. The proof method is useful for proving termination of higher-order foundational calculi. To establish the method, we use a variation of semantic labelling translation and Blanqui's General Schema: a syntactic criterion of strong normalisation. As an application, we apply this method to show termination of a variant of call-by-push-value calculus with algebraic effects and effect handlers. We also show that our tool SOLl is effective to solve higher-order termination problems.

[1]  Frédéric Blanqui Definitions by rewriting in the Calculus of Constructions , 2005, Math. Struct. Comput. Sci..

[2]  Sam Staton,et al.  Instances of Computational Effects: An Algebraic Perspective , 2013, 2013 28th Annual ACM/IEEE Symposium on Logic in Computer Science.

[3]  Hans Zantema,et al.  Transforming Termination by Self-Labelling , 1996, CADE.

[4]  Keiichirou Kusakari,et al.  Static Dependency Pair Method in Functional Programs , 2018, IEICE Trans. Inf. Syst..

[5]  Keiichirou Kusakari,et al.  Argument filterings and usable rules in higher-order rewrite systems , 2011, ArXiv.

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

[7]  M.R.K. Kr ishna Rao,et al.  Modular Proofs for Completeness of Hierarchical Term Rewriting Systems , 1995, Theor. Comput. Sci..

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

[9]  Paul Blain Levy,et al.  Call-by-push-value: Decomposing call-by-value and call-by-name , 2006, High. Order Symb. Comput..

[10]  Gordon D. Plotkin,et al.  Handling Algebraic Effects , 2013, Log. Methods Comput. Sci..

[11]  Herman Geuvers,et al.  Modularity of strong normalization in the algebraic-λ-cube , 1997, Journal of Functional Programming.

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

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

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

[15]  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.

[16]  Mitsuhiro Okada,et al.  Strong normalizability for the combined system of the typed lmbda calculus and an arbitrary convergent term rewrite system , 1989, ISSAC '89.

[17]  Ohad Kammar,et al.  On the expressive power of user-defined effects: Effect handlers, monadic reflection, delimited control , 2019, J. Funct. Program..

[18]  Jürgen Giesl,et al.  Analyzing Program Termination and Complexity Automatically with AProVE , 2016, Journal of Automated Reasoning.

[19]  Olivier Hermant,et al.  Dependency Pairs Termination in Dependent Type Theory Modulo Rewriting , 2019, FSCD.

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

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

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

[23]  Carsten Fuhs,et al.  Harnessing First Order Termination Provers Using Higher Order Dependency Pairs , 2011, FroCoS.

[24]  Makoto Hamana,et al.  Polymorphic Rewrite Rules: Confluence, Type Inference, and Instance Validation , 2018, FLOPS.

[25]  Albert Rubio,et al.  The computability path ordering , 2015, Log. Methods Comput. Sci..

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

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

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

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

[30]  Azuma Ohuchi,et al.  Modularity of Simple Termination of Term Rewriting Systems with Shared Constructors , 1992, Theor. Comput. Sci..

[31]  J. V. D. Pol,et al.  Termination of higher-order rewrite systems , 1996 .

[32]  Makoto Hamana,et al.  Polymorphic computation systems: Theory and practice of confluence with call-by-value , 2020, Sci. Comput. Program..

[33]  Masahiko Sakai,et al.  Static Dependency Pair Method Based on Strong Computability for Higher-Order Rewrite Systems , 2009, IEICE Trans. Inf. Syst..

[34]  Albert Rubio,et al.  Polymorphic higher-order recursive path orderings , 2007, JACM.

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

[36]  Sam Staton,et al.  Substitution, jumps, and algebraic effects , 2014, CSL-LICS.

[37]  Makoto Hamana,et al.  How to prove decidability of equational theories with second-order computation analyser SOL , 2019, Journal of Functional Programming.

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

[39]  Albert Rubio,et al.  Normal Higher-Order Termination , 2015, ACM Trans. Comput. Log..

[40]  Keiichirou Kusakari,et al.  Static Dependency Pair Method in Rewriting Systems for Functional Programs with Product, Algebraic Data, and ML-Polymorphic Types , 2012, IEICE Trans. Inf. Syst..

[41]  Enno Ohlebusch,et al.  On the Modularity of Termination of Term Rewriting Systems , 1994, Theor. Comput. Sci..

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

[43]  Val Tannen,et al.  Polymorphic Rewriting Conserves Algebraic Strong Normalization , 1991, Theor. Comput. Sci..

[44]  Yoshihito Toyama,et al.  Counterexamples to Termination for the Direct Sum of Term Rewriting Systems , 1987, Inf. Process. Lett..

[45]  Jürgen Giesl,et al.  Termination of term rewriting using dependency pairs , 2000, Theor. Comput. Sci..

[46]  Ohad Kammar,et al.  Handlers in action , 2013, ICFP.

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

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

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

[50]  Enno Ohlebusch,et al.  Modular Termination Proofs for Rewriting Using Dependency Pairs , 2002, J. Symb. Comput..

[51]  Hans Zantema,et al.  Termination of Term Rewriting by Semantic Labelling , 1995, Fundam. Informaticae.

[52]  Jean-Pierre Jouannaud,et al.  Inductive-data-type systems , 2002, Theor. Comput. Sci..

[53]  Marcelo P. Fiore,et al.  Second-Order Algebraic Theories - (Extended Abstract) , 2010, MFCS.

[54]  Bernhard Gramlich,et al.  Generalized sufficient conditions for modular termination of rewriting , 1992, Applicable Algebra in Engineering, Communication and Computing.

[55]  Jürgen Giesl,et al.  Termination of Constructor Systems , 1996, RTA.

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

[57]  Makoto Hamana,et al.  How to prove your calculus is decidable: practical applications of second-order algebraic theories and computation , 2017, Proc. ACM Program. Lang..

[58]  Hendrik Pieter Barendregt,et al.  Termination for direct sums of left-linear complete term rewriting systems , 1995, JACM.