Normalisation for Dynamic Pattern Calculi

The Pure Pattern Calculus (PPC) [10, 11] extends the -calculus, as well as the family of algebraic pattern calculi [20, 6, 12], with first-class patterns i.e. patterns can be passed as arguments, evaluated and returned as results. The notion of matching failure of PPC in [11] not only provides a mechanism to define functions by pattern matching on cases but also supplies PPC with parallelor-like, non-sequential behaviour. Therefore, devising normalising strategies for PPC to obtain well-behaved implementations turns out to be challenging. This paper focuses on normalising reduction strategies for PPC. We define a (multistep) strategy and show that it is normalising. The strategy generalises the leftmost-outermost strategy for -calculus and is strictly finer than parallel-outermost. The normalisation proof is based on the notion of necessary set of redexes, a generalisation of the notion of needed redex encompassing non-sequential reduction systems.

[1]  Thibaut Balabonski,et al.  Optimality for Dynamic Patterns Extended Abstract , 2010 .

[2]  Paul-André Melliès Axiomatic rewriting theory II: the λσ-calculus enjoys finite normalisation cones , 2000, J. Log. Comput..

[3]  Vincent van Oostrom,et al.  Lambda calculus with patterns , 2008, Theor. Comput. Sci..

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

[5]  Simon L. Peyton Jones,et al.  The Implementation of Functional Programming Languages , 1987 .

[6]  Hendrik Pieter Barendregt,et al.  Needed Reduction and Spine Strategies for the Lambda Calculus , 1987, Inf. Comput..

[7]  Thibaut Balabonski,et al.  On the Implementation of Dynamic Patterns , 2011, HOR.

[8]  John R. W. Glauert,et al.  Stable results and relative normalization , 2000, J. Log. Comput..

[9]  Aart Middeldorp,et al.  A Sequential Reduction Strategy , 1994, ALP.

[10]  Jan Willem Klop,et al.  Combinatory reduction systems , 1980 .

[11]  Delia Kesner,et al.  Pure Pattern Calculus , 2006, ESOP.

[12]  Delia Kesner,et al.  First-class patterns , 2009, Journal of Functional Programming.

[13]  Barry Jay Pattern Calculus - Computing with Functions and Structures , 2009 .

[14]  Claude Kirchner,et al.  The rewriting calculus - Part I , 2001, Log. J. IGPL.

[15]  Michael J. O'Donnell,et al.  Computing in systems described by equations , 1977, Lecture Notes in Computer Science.

[16]  Wolfram Kahl,et al.  Basic Pattern Matching Calculi: a Fresh View on Matching Failure , 2004, FLOPS.

[17]  Vincent van Oostrom,et al.  Normalisation in Weakly Orthogonal Rewriting , 1999, RTA.

[18]  Tobias Nipkow,et al.  Term rewriting and all that , 1998 .

[19]  Femke van Raamsdonk,et al.  Outermost-Fair Rewriting , 1997, TLCA.