Polymorphic Rewrite Rules: Confluence, Type Inference, and Instance Validation

We present a new framework of polymorphic rewrite rules having predicates to restrict their instances. It is suitable for formulating and analysing fundamental calculi of programming languages. A type inference algorithm and a criterion to check local confluence property of polymorphic rules are also given, with demonstration of the effectiveness of our methodology by examinination of sample program calculi. It includes the call-by-need \({\lambda }\)-calculus and Moggi’s computational lambda-calculus.

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

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

[3]  Makoto Hamana,et al.  Polymorphic Abstract Syntax via Grothendieck Construction , 2011, FoSSaCS.

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

[5]  Gerard Huet,et al.  Conflunt reductions: Abstract properties and applications to term rewriting systems , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

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

[7]  Henk Barendregt,et al.  The Lambda Calculus: Its Syntax and Semantics , 1985 .

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

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

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

[11]  Bertram Felgenhauer,et al.  CSI: New Evidence - A Progress Report , 2017, CADE.

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

[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 Universal Algebra for Termination of Higher-Order Rewriting , 2005, RTA.

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

[17]  Simon L. Peyton Jones,et al.  Template meta-programming for Haskell , 2002, Haskell '02.

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

[19]  Chung-Kil Hur,et al.  Second-Order Equational Logic (Extended Abstract) , 2010, CSL.

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

[21]  Nicole Stender Template Metaprogramming for Haskell , 2014 .

[22]  Philip Wadler,et al.  A reflection on call-by-value , 1997, TOPL.

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

[24]  HuetGérard Confluent Reductions: Abstract Properties and Applications to Term Rewriting Systems , 1980 .

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

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

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

[28]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.

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

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

[31]  T. Sheard Template Metaprogramming for Haskell , 2014 .

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

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

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

[35]  Ian Stark,et al.  Reducibility and TT-Lifting for Computation Types , 2005, TLCA.