## Reasoning about Layered, Wildcard and Product Patterns (1994)

Venue: | ALP '94, volume 850 of LNCS |

Citations: | 3 - 2 self |

### BibTeX

@INPROCEEDINGS{Kesner94reasoningabout,

author = {Delia Kesner},

title = {Reasoning about Layered, Wildcard and Product Patterns},

booktitle = {ALP '94, volume 850 of LNCS},

year = {1994},

pages = {253--268},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

We study the extensional version of the simply typed -calculus with product types and fixpoints enriched with layered, wildcard and product patterns. Extensionality is expressed by the surjective pairing axiom and a generalization of the j-conversion to patterns. We obtain a confluent reduction system by turning the extensional axioms as expansion rules, and then adding some restrictions to these expansions in order to avoid reduction loops. Confluence is proved by composition of modular properties of the extensional and non-extensional subsystems of the reduction calculus. 1 Introduction Pattern-matching function definitions is one of the most popular features of functional languages, allowing to specify the behavior of functions by cases, according to the form of their arguments. Left-hand sides of function definitions are usually expressed using Layered, Wildcard and Product Patterns (LWPP), as for example the following Caml Light [ea93] program where the function cons new pair ta...

### Citations

537 | The Implementation of Functional Programming Languages - Jones - 1987 |

126 |
1971] Ideas and results in proof theory
- Prawitz
(Show Context)
Citation Context ...the previous diagram cannot be closed. This inconvenient can be fortunately overcome in the LWPP calculus by turning the extensional equalities into expansion rules. The idea was suggested by Prawitz =-=[Pra71]-=- in the field of proof theory, and further studied by Huet [Hue76] in the field of higher order unification, and by Mints [Min79] who was motivated by problems in category theory. But expansions seem ... |

66 | Pure pattern calculus
- Jay, Kesner
- 2006
(Show Context)
Citation Context ...h nested patterns can be found in [vO90, Jon87, How92, BTKP93]. In particular, the LWPP calculus can also be viewed as a sub-calculus of the Typed Pattern Calculus (TPC) that was recently proposed in =-=[BTKP93]-=-. More precisely, the LWPP calculus can be encoded in the TPC following standard techniques: this last one is designed in the spirit of the Curry-Howard isomorphism as a computational interpretation o... |

61 | Constructive logics. part i: A tutorial on proof systems and typed λ-calculi
- Gallier
- 1993
(Show Context)
Citation Context ...at the pattern P 0 only contain variables and product patterns. This is not very surprising because it corresponds to the fact that contraction and weakening rules are redundant in intuitionist logic =-=[Gal93]-=- and gives at the same time another possible reading: to remove at compile time wildcard and layered patterns from -abstractions using our reduction system, could lead to optimizations of programs whi... |

42 |
On Mints' reductions for ccc-calculus
- Akama
- 1993
(Show Context)
Citation Context ...tandard techniques for showing confluence of the typed -calculus will not work directly, because of the extensional expansions. To overcome this annoyance, we use a divide-and-conquer technique as in =-=[Aka93]: we sep-=-arate the reduction =) in two reduction relations: B =) denotes the relation =) generated only by fi;�� 1 ;�� 2 ;@;rec \Gamma! and E =) denotes the relation =) generated only by bj;sp \Gamma!.... |

36 | Eta-expansions in F - Ghani - 1997 |

27 | Lambda Calculus with Patterns - Oostrom - 1990 |

22 |
R'esolution d"equations dans les langages d'ordre 1,2. . . !. Th`ese de doctorat d"etat, Universit'e de Paris VII
- Huet
- 1976
(Show Context)
Citation Context ...rtunately overcome in the LWPP calculus by turning the extensional equalities into expansion rules. The idea was suggested by Prawitz [Pra71] in the field of proof theory, and further studied by Huet =-=[Hue76]-=- in the field of higher order unification, and by Mints [Min79] who was motivated by problems in category theory. But expansions seem however to have passed unnoticed for a long time, until these last... |

20 | Some lambda calculi with categorical sums and products - Dougherty - 1993 |

16 | Combining first order algebraic rewriting systems, recursion and extensional lambda calculi
- Cosmo, Kesner
- 1994
(Show Context)
Citation Context ...lied to many other calculi with expansionary rules: for example, the weak extensionality for the sum type as in [DCK93b] or combinations of algebraic rewriting systems with extensional lambda calculi =-=[DCK94]-=-. We also believe that polymorphic calculi like Girard's Systems F can be handled within an expansionary interpretation of extensional rules. Acknowledgements I would like to thank Roberto Di Cosmo fo... |

14 | Fixed Points and Extensionality in Typed Functional Programming Languages - Howard - 1992 |

14 |
Teorija categorii i teoria dokazatelstv.I. Aktualnye problemy logiki i metodologii nauky
- Mints
- 1979
(Show Context)
Citation Context ...nal equalities into expansion rules. The idea was suggested by Prawitz [Pra71] in the field of proof theory, and further studied by Huet [Hue76] in the field of higher order unification, and by Mints =-=[Min79]-=- who was motivated by problems in category theory. But expansions seem however to have passed unnoticed for a long time, until these last two years, where many extensional -calculi (without patterns) ... |

11 | On free CCC. Distributed on the types mailing list - Cubric - 1992 |

9 |
Résultats de confluence pour les règles fortes de la logique combinatoire catégorique et liens avec les lambda-calculs. Thèse de doctorat, Université de Paris VII
- Hardin
- 1987
(Show Context)
Citation Context ... and strongly normalizing 3. 8M;N M B =) N implies M E B =) + N E , where M E and N E are respectively the E-normal forms of M and N then the relation E =) [ B =) is confluent. Proof. See for example =-=[Har87]-=-. 2 Next sections discuss the techniques to prove the three properties required by the previous lemma: confluence of the relation B =), confluence and strong normalization of the relation E =), and th... |

8 |
Simulating expansions without expansions
- Cosmo, Kesner
- 1994
(Show Context)
Citation Context ...ce of patterns of sum type. It is also important to remark that this approach can be applied to many other calculi with expansionary rules: for example, the weak extensionality for the sum type as in =-=[DCK93b]-=- or combinations of algebraic rewriting systems with extensional lambda calculi [DCK94]. We also believe that polymorphic calculi like Girard's Systems F can be handled within an expansionary interpre... |

6 | Long fij normal forms and confluence (revised - Jay - 1992 |

6 |
d'efinition de fonctions par cas `a l'aide de motifs dans des langages applicatifs. Th`ese de Doctorat, Universit'e de Paris-Sud
- La
- 1993
(Show Context)
Citation Context ...ropositional logic, and so the application and projection constructors of the LWPP calculus are encoded in the TPC following the usual translation of natural deduction proofs into sequent proofs. See =-=[Kes93]-=- for details. There is anyway something else that one likes to do with programs modeled by -calculi besides using -terms as programs to be computed: one would like to reason about programs, to prove t... |

6 |
The Church Rosser Theorem for the Typed lambda-calculus with Surjective Pairing
- Pottinger
- 1981
(Show Context)
Citation Context ...r. The (j) and the (sp) axioms have traditionally been turned into contractions carrying the same name. Such an interpretation is well behaved in the simply typed -calculus as it preserves confluence =-=[Pot81]-=-. But surprisingly, recursion together with the (sp)-axiom oriented as contraction causes confluence to fail [Nes89]. Moreover, the contractive interpretation of the (b j)-axiom for patterns breaks co... |

4 |
A confluent reduction for the extensional typed \Gammacalculus with pairs, sums, recursion and terminal object
- Cosmo, Kesner
- 1993
(Show Context)
Citation Context ...not. This is due to the fact that each occurrence of z in hz; zi is reducible by sp =) but the pair hz; zi is not reducible at the root position. 1 To differentiate with the expansor terms defined in =-=[DCK93a]-=- On the other hand, expansor contexts must be carefully defined to correctly represent not only the expansion step arising from a redex already present in M , but also all the expansion sequences that... |

4 | An application of Klop's counterexample to a higher-order rewrite system
- Nesmith
- 1989
(Show Context)
Citation Context ...rpretation is well behaved in the simply typed -calculus as it preserves confluence [Pot81]. But surprisingly, recursion together with the (sp)-axiom oriented as contraction causes confluence to fail =-=[Nes89]-=-. Moreover, the contractive interpretation of the (b j)-axiom for patterns breaks confluence, as the following example shows: Example 1.2 hx; yi : A \Theta B:hx; yi fi /\Gamma hx; yi : A \Theta B:(z :... |

3 |
Combinateurs cat'egoriques et impl'ementation des langages fonctionnels
- Cousineau, Curien, et al.
- 1986
(Show Context)
Citation Context ...rovided x is not free in M Now, the existence of patterns in the scope of lambda abstractions suggests a natural extension of the (j)-axiom in order to express equalities between pattern abstractions =-=[CCMS86]-=-. The new axiom is called (b j)-axiom: (b j) P : A:MP = M provided ( P contains only variables and pairs the variables of P are not free in M On the other hand, there is also an extensional rule for p... |

2 |
et al. The Caml Light system, release 0.6. Software and documentation distributed by anonymous FTP on ftp.inria.fr
- Leroy
- 1993
(Show Context)
Citation Context ...s, according to the form of their arguments. Left-hand sides of function definitions are usually expressed using Layered, Wildcard and Product Patterns (LWPP), as for example the following Caml Light =-=[ea93]-=- program where the function cons new pair takes any pair (m 1 ; m 2 ) of type 'a * 'b and yields the pair (m 1 ; (m 1 ; m 2 )): # let consnewpair = function (y,) as z -? (y,z) ;; consnewpair : 'a * 'b... |