ABSTRACT
In this paper, we show how pattern matching can be seen to arise from a proof term assignment for the focused sequent calculus. This use of the Curry-Howard correspondence allows us to give a novel coverage checking algorithm, and makes it possible to give a rigorous correctness proof for the classical pattern compilation strategy of building decision trees via matrices of patterns.
References
- J.M. Andreoli. Logic Programming with Focusing Proofs in Linear Logic. Journal of Logic and Computation, 2 (3): 297, 1992.Google Scholar
Cross Ref
- L. Augustsson. Compiling pattern matching. Proc. of a conference on Functional Programming Languages and Computer Architecture, pages 368--381, 1985. Google Scholar
Digital Library
- Luca Cardelli. Compiling a functional language. In LFP '84: Proceedings of the 1984 ACM Symposium on LISP and Functional Programming, pages 208--217, New York, NY, USA, 1984. ACM Press. ISBN 0-89791-142-3. http://doi.acm.org/10.1145/800055.802037. Google Scholar
Digital Library
- S. Cerrito and D. Kesner. Pattern matching as cut elimination. Theoretical Computer Science, 323 (1-3): 71--127, 2004. Google Scholar
Digital Library
- H. Cirstea and C. Kirchner. The rewriting calculus -- Part I. Logic Journal of the IGPL, 9(3): 2001.Google Scholar
- T. Coquand. Pattern matching with dependent types. Proceedings of the Workshop on Types for Proofs and Programs, pages 71--83, 1992.Google Scholar
- M. Dummett. The Logical Basis of Metaphysics. Duckworth, 1991.Google Scholar
- Fabrice Le Fessant and Luc Maranget. Optimizing pattern matching. In ICFP '01: Proceedings of the sixth ACM SIGPLAN International Conference on Functional Programming, pages 26--37, New York, NY, USA, 2001. ACM Press. ISBN 1-58113-415-0. http://doi.acm.org/10.1145/507635.507641. Google Scholar
Digital Library
- J.Y. Girard. Locus Solum: From the rules of logic to the logic of rules. Mathematical Structures in Computer Science, 11 (03): 301--506, 2001. Google Scholar
Digital Library
- C. B. Jay. The pattern calculus. Transactions on Programming Languages and Systems 26(6):911--937, 2004. Google Scholar
Digital Library
- S.P. Jones, D. Vytiniotis, S. Weirich, and G. Washburn. Simple unification-based type inference for GADTs. Proceedings of the eleventh ACM SIGPLAN International Conference on Functional Programming, pages 50--61, 2006. Google Scholar
Digital Library
- D. Kesner, L. Puel, and V. Tannen. A Typed Pattern Calculus. Information and Computation, 124 (1): 32--61, 1996. Google Scholar
Digital Library
- Chuck Liang and Dale Miller. Focusing and polarization in intuitionistic logic. In 16th EACSL Annual Conference on Computer Science and Logic. Springer-Verlag, 2007. URL http://www.cs.hofstra.edu/~cscccl/focusil.pdf. Google Scholar
Digital Library
- Luc Maranget. Warnings for pattern matching. Journal of Functional Programming, 2007.Google Scholar
Cross Ref
- C. McBride. Epigram. Types for Proofs and Programs, 3085: 115--129, 2003.Google Scholar
- Dale Miller, Gopalan Nadathur, Frank Pfenning, and Andre Scedrov. Uniform proofs as a foundation for logic programming. Ann. Pure Appl. Logic, 51 (1-2): 125--157, 1991.Google Scholar
Cross Ref
- R.R. Milner, Mads Tofte, Robert Harper, and David McQueen. The Definition of Standard ML:(revised). MIT Press, 1997. Google Scholar
Digital Library
- Mikael Pettersson. A term pattern-match compiler inspired by finite automata theory. In Uwe Kastens and Peter Pfahler, editors, CC, volume 641 of phLecture Notes in Computer Science, pages 258--270. Springer, 1992. ISBN 3-540-55984-1. Google Scholar
Digital Library
- F. Pfenning. Structural Cut Elimination I. Intuitionistic and Classical Logic. Information and Computation, 157 (1-2): 84--141, 2000. Google Scholar
Digital Library
- P. Sestoft. ML pattern match compilation and partial evaluation. Lecture Notes in Computer Science, 1110: 446, 1996. URL citeseer.ist.psu.edu/sestoft96ml.html.Google Scholar
Cross Ref
- Vincent Simonet and Francois Pottier. A constraint-based approach to guarded algebraic data types. Transactions on Programming Languages and Systems 29(1), 2007. Google Scholar
Digital Library
- K. Watkins, I. Cervesato, F. Pfenning, and D. Walker. A concurrent logical framework: The propositional fragment. Types for Proofs and Programs, pages 355--377, 2004.Google Scholar
- H. Xi. Dependently Typed Pattern Matching. Journal of Universal Computer Science, 9 (8): 851--872, 2003.Google Scholar
- Noam Zeilberger. The logical basis of evaluation order. Thesis proposal, May 2007. Carnegie Mellon, Pittsburgh, Pennsylvania. Available at http://www.cs.cmu.edu/~noam/research/proposal.pdf., 2007.Google Scholar
- Noam Zeilberger. Focusing and higher-order abstract syntax. In George C. Necula and Philip Wadler, editors, POPL, pages 359--369. ACM, 2008. ISBN 978-1-59593-689-9. Google Scholar
Digital Library
Index Terms
Focusing on pattern matching






Comments