Patterns as first-class citizens - Archive ouverte HAL Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2006

Patterns as first-class citizens

Résumé

The pure pattern calculus generalises the pure lambda-calculus by basing computation on pattern-matching instead of beta-reduction. The simplicity and power of the calculus derive from allowing any term to be a pattern. As well as supporting a uniform approach to functions, it supports a uniform approach to data structures which underpins two new forms of polymorphism. Path polymorphism supports searches or queries along all paths through an arbitrary data structure. Pattern polymorphism supports the dynamic creation and evaluation of patterns, so that queries can be customised in reaction to new information about the structures to be encountered. In combination, these features provide a natural account of tasks such as programming with XML paths. As the variables used in matching can now be eliminated by reduction it is necessary to separate them from the binding variables used to control scope. Then standard techniques suffice to ensure that reduction progresses and to establish confluence of reduction.
Fichier principal
Vignette du fichier
technical-report-31-1-08.pdf (176.69 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-00229331 , version 1 (31-01-2008)

Identifiants

  • HAL Id : hal-00229331 , version 1

Citer

C. Barry Jay, Delia Kesner. Patterns as first-class citizens. 2006. ⟨hal-00229331⟩
153 Consultations
375 Téléchargements

Partager

Gmail Facebook X LinkedIn More