Pure Pattern Calculus

  • Barry Jay
  • Delia Kesner
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3924)


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.


Free Variable Functional Programming Match Rule Binding Variable Parallel Reduction 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. [Bar84]
    Barendregt, H.: The Lambda Calculus: Its Syntax and Semantics. Studies in Logic and the Foundations of Mathematics, vol. 103. North-Holland, Amsterdam (1984) (Revised Edition)Google Scholar
  2. [BCKL03]
    Barthe, G., Cirstea, H., Kirchner, C., Liquori, L.: Pure Pattern Type Systems. In: Proceedings of the 30th Annual ACM Symposium on Principles of Programming Languages (POPL), pp. 250–261. ACM, New York (2003)Google Scholar
  3. [BdMH96]
    Bird, R., de Moor, O., Hoogendijk, P.: Generic functional programming with types and relations. Journal of Functional Programming 6(1), 1–28 (1996)MathSciNetCrossRefMATHGoogle Scholar
  4. [Bur69]
    Burstall, R.M.: Proving properties of programs by structural induction. The Computer Journal (1969)Google Scholar
  5. [CK98]
    Cirstea, H., Kirchner, C.: ρ-calculus, the rewriting calculus. In: 5th International Workshop on Constraints in Computational Logics, CCL (1998)Google Scholar
  6. [CK99]
    Cerrito, S., Kesner, D.: Pattern matching as cut elimination. In: Longo, G. (ed.) 14th Annual IEEE Symposium on Logic in Computer Science (LICS), pp. 98–108. IEEE Computer Society Press, Los Alamitos (1999)Google Scholar
  7. [FK03]
    Forest, J., Kesner, D.: Expression reduction systems with patterns. In: Nieuwenhuis, R. (ed.) RTA 2003. LNCS, vol. 2706, pp. 107–122. Springer, Heidelberg (2003)Google Scholar
  8. [For02]
    Forest, J.: A weak calculus with explicit operators for pattern matching and substitution. In: Tison, S. (ed.) RTA 2002. LNCS, vol. 2378, pp. 174–191. Springer, Heidelberg (2002)Google Scholar
  9. [GJ03]
    Gibbons, J., Jeuring, J. (eds.): Generic Programming: IFIP TC2/WG2.1 Working Conference on Generic Programming, Dagstuhl, Germany, July 11-12, 2002. Kluwer Academic Publishers, Dordrecht (2003)Google Scholar
  10. [Has]
    The Haskell language,
  11. [HJS05a]
    Huang, F.Y., Jay, C.B., Skillicorn, D.B.: Dealing with complex patterns in XML processing. Technical Report 2005-497, Queen’s University School of Computing (2005)Google Scholar
  12. [HJS05b]
    Huang, F.Y., Jay, C.B., Skillicorn, D.B.: Programming with heterogeneous structures: Manipulating XML data using bondi. Technical Report 2005-494, Queen’s University School of Computing (2005) (to appear in ACSW 2006)Google Scholar
  13. [Jan00]
    Jansson, P.: Functional Polytypic Programming. PhD thesis, Computing Science, Chalmers University of Technology and Göteborg University, Sweden (May 2000)Google Scholar
  14. [Jay04a]
    Jay, C.B.: Higher-order patterns (2004), Available as
  15. [Jay04a]
    Jay, C.B.: Methods as pattern-matching functions. In: Drossopoulou, S. (ed.) Proc. of the 11th International Workshop on Foundations of Object-Oriented Languages (2004), available as
  16. [Jay04c]
    Jay, C.B.: The pattern calculus. ACM Transactions on Programming Languages and Systems (TOPLAS) 26(6), 911–937 (2004)Google Scholar
  17. [JBM98]
    Jay, C.B., Bell‘e, G., Moggi, E.: Functorial ML. Journal of Functional Programming 8(6), 573–619 (1998)Google Scholar
  18. [Kah03]
    Kahl, W.: Basic pattern matching calculi: Syntax, reduction, confluence, and normalisation. Technical Report 16, Software Quality Research Laboratory, McMaster Univ. (2003)Google Scholar
  19. [JC94]
    Jay, C.B., Cockett, J.R.B.: Shapely types and shape polymorphism. In: Sannella, D. (ed.) ESOP 1994. LNCS, vol. 788, pp. 302–316. Springer, Heidelberg (1994)Google Scholar
  20. [Kes97]
    Kesner, D.: Reasoning about redundant patterns. Journal of Functional and Logic Programming 1997(4) (June 1997)Google Scholar
  21. [Klo80]
    Klop, J.-W.: Combinatory Reduction Systems. PhD thesis, Mathematical Centre Tracts 127, CWI, Amsterdam (1980)Google Scholar
  22. [KPT96]
    Kesner, D., Puel, L., Tannen, V.: A Typed Pattern Calculus. Information and Computation 124(1), 32–61 (1996)MathSciNetCrossRefMATHGoogle Scholar
  23. [Oca]
    The Objective Caml language,
  24. [SML]

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Barry Jay
    • 1
  • Delia Kesner
    • 2
  1. 1.University of TechnologySydney
  2. 2.PPS

Personalised recommendations