Hostname: page-component-586b7cd67f-t8hqh Total loading time: 0 Render date: 2024-11-22T23:08:50.822Z Has data issue: false hasContentIssue false

First-class patterns

Published online by Cambridge University Press:  01 March 2009

BARRY JAY
Affiliation:
University of Technology, Sydney, Australia (e-mail: [email protected])
DELIA KESNER
Affiliation:
PPS, CNRS and Université Paris Diderot, Paris, France (e-mail: [email protected])
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the ‘Save PDF’ action button.

Pure pattern calculus supports pattern-matching functions in which patterns are first-class citizens that can be passed as parameters, evaluated and returned as results. This new expressive power supports two new forms of polymorphism. Path polymorphism allows recursive functions to traverse arbitrary data structures. Pattern polymorphism allows patterns to be treated as parameters which may be collected from various sources or generated from training data. A general framework for pattern calculi is developed. It supports a proof of confluence that is parameterised by the nature of the matching algorithm, suitable for the pure pattern calculus and all other known pattern calculi.

Type
Articles
Copyright
Copyright © Cambridge University Press 2009

References

Baader, F. & Nipkow, T. (1998) Term Rewriting and All That. Cambridge: Cambridge University Press.CrossRefGoogle Scholar
Barendregt, H. (1984) The Lambda Calculus: Its Syntax and Semantics, vol. 103, Studies in Logic and the Foundations of Mathematics. Amsterdam: North-Holland.Google Scholar
Barthe, G., Cirstea, H., Kirchner, C. & Liquori, L. (2003) Pure pattern type systems. In Proceedings of the 30th Annual ACM Symposium on Principles of Programming Languages (POPL). Morrisett, Greg (ed), New Orleans, USA, New York: ACM Press, pp. 250261.Google Scholar
Bezem, M., Klop, J. W. & De Vrijer, R. (eds) (2003) Term Rewriting Systems – Terese, vol. 55, Cambridge Tracts in Theoretical Computer Science. Cambridge: Cambridge University Press.Google Scholar
Böhm, C., Piperno, A. & Guerrini, S. (1994) Lambda-definition of function(al)s by normal forms. In Proceedings of the 5th European Symposium on Programming (ESOP). Sannella, Donald (ed), Edinburgh, vol. 788, Lecture Notes in Computer Science, Berlin: Springer, pp. 135149.Google Scholar
Cirstea, H. & Faure, G. (2007) Confluence of pattern-based lambda-calculi. In Proceedings of the 18th International Conference on Rewriting Techniques and Applications (RTA). Baader, Franz (ed), Paris, vol. 4533, Lecture Notes in Computer Science, Berlin: Springer, pp. 7892.Google Scholar
Cirstea, H. & Kirchner, C. (2001) The rewriting calculus – Part I and II, Logic Journal of the IGPL, 9 (3), 427498.Google Scholar
De Nicola, R., Ferrari, G. L. & Pugliese, R. (1998) KLAIM: A kernel language for agents interaction and mobility. IEEE Trans. Software Engng 24 (5), 315330.CrossRefGoogle Scholar
Forest, J. & Kesner, D. (2003) Expression reduction systems with patterns. In Proceedings of the 14th International Conference on Rewriting Techniques and Applications (RTA). Nieuwenhuis, Robert (ed), Valencia, Spain, vol. 2706, Lecture Notes in Computer Science, Berlin: Springer, pp. 107122.CrossRefGoogle Scholar
Gelernter, D. (1985) Generative communication in Linda. 7(1), 80–112.CrossRefGoogle Scholar
Gorla, D. & Pugliese, R. (2003) Resource access and mobility control with dynamic privileges acquisition. In Proceedings of the 30th International Colloquium on Automata, Languages and Programming (ICALP). Baeten, Jos C. M., Lenstra, Jan Karel, Parrow, Joachim & Woeginger, Gerhard J. (eds), Eindhoven, The Netherlands, vol. 2719, Lecture Notes in Computer Science, Berlin: Springer, pp. 119132.CrossRefGoogle Scholar
Huang, F. Y., Jay, C. B. & Skillicorn, D. B. (2006a) Adaptiveness in well-typed java bytecode verification. In Proceedings of the 2006 conference of the Center for Advanced Studies on Collaborative research (CASCON). Lyons, Kelly & Couturier, Christian (eds), Toronto, Canada, New York: ACM Press, pp. 248262.Google Scholar
Huang, F. Y., Jay, C. B. & Skillicorn, D. B. (2006b) Programming with heterogeneous structures: Manipulating XML data using bondi. 29th Australasian Computer Science Conference (ACSC'06). Dobbie, Gill & Estivill-Castro, Vladimir (eds). ACM, pp. 287296.Google Scholar
Jay, B. (2009) Pattern Calculus: Computing with Functions and Structures. Berlin: Springer.CrossRefGoogle Scholar
Jay, B & Kesner, D. (2006) Pure pattern calculus. In Proceedings of the 15th European Symposium on Programming (ESOP). Sestoft, Peter (ed), Vienna, Austria, vol. 3924, Lecture Notes in Computer Science, Berlin: Springer, pp. 100114.Google Scholar
Jay, C. B. (2004) The pattern calculus. ACM Trans. Prog. Lang. Sys. 26 (6), 911937.CrossRefGoogle Scholar
Jay, C. B. & Kesner, D. (2006) Patterns as first-class citizens. Available at http://kern-1pt/hal.archives-ouvertes.fr/hal-00229331/fr/.Google Scholar
Kahl, W. (2004) Basic pattern matching calculi: A fresh view on matching failure. In Proceedings of the 7th International Symposium on Functional and Logic Programming (FLOPS). Kameyama, Yukiyoshi, Stuckey, Peter J. (eds), Nara, Japan, vol. 2998, Lecture Notes in Computer Science, Berlin: Springer, pp. 276290.CrossRefGoogle Scholar
Klop, J.-W. (1980) Combinatory Reduction Systems. Amsterdam: Mathematical Centre Tracts, CWI.Google Scholar
Klop, J.-W., van Oostrom, V. & de Vrijer, R. (2008) Lambda calculus with patterns. Theoret. Comp. Sci. 398 (1–3), 1631.CrossRefGoogle Scholar
Lämmel, R. & Peyton-Jones, S. (2003) Scrap your boilerplate: A practical design pattern for generic programming. In Proceedings of the ACM SIGPLAN Workshop on Types in Language Design and Implementation (TLDI). Lee, Peter (ed), New Orleans, USA, vol. 38, no. 3, SIGPLAN Notices, pp. 26–37.CrossRefGoogle Scholar
Paulson, L. C. (1994) Isabelle: A Generic Theorem-Prover, vol. 828, Lecture Notes in Computer Science. Springer.CrossRefGoogle Scholar
Peyton Jones, S. (1987) The Implementation of Functional Programming Languages. Prentice Hall.Google Scholar
Pfenning, F. & Paulin-Mohring, C. (1989) Inductively defined types in the calculus of constructions. In Proceedings of the 5th international conference on Mathematical Foundations of Programming Semantics (MFPS). Main, Michael G., Melton, Austin, Mislove, Michael W. & Schmidt, David A. (eds), New Orleans, USA, vol. 442, Lecture Notes in Computer Science, Berlin: Springer, pp. 209228.Google Scholar
Van Oostrom, V. (1990) Lambda Calculus with Patterns. Amsterdam: Vrije Universiteit.Google Scholar
Visser, E. (2004) Program transformation with Stratego/XT: Rules, strategies, tools, and systems in StrategoXT-0.9. In Domain-Specific Program Generation: Revised Papers, vol. 3016, Lecture Notes in Computer Science, Berlin: Springer pp. 216238.CrossRefGoogle Scholar
Submit a response

Discussions

No Discussions have been published for this article.