skip to main content
research-article

Pattern minimization problems over recursive data types

Published:20 September 2008Publication History
Skip Abstract Section

Abstract

In the context of program verification in an interactive theorem prover, we study the problem of transforming function definitions with ML-style (possibly overlapping) pattern matching into minimal sets of independent equations. Since independent equations are valid unconditionally, they are better suited for the equational proof style using induction and rewriting, which is often found in proofs in theorem provers or on paper.

We relate the problem to the well-known minimization problem for propositional DNF formulas and show that it is £P/2-complete. We then develop a concrete algorithm to compute minimal patterns, which naturally generalizes the standard Quine-McCluskey procedure to the domain of term patterns.

Skip Supplemental Material Section

Supplemental Material

Video

References

  1. Lennart Augustsson. Compiling pattern matching. In FPCA'85, pages 368--381, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Marianne Baudinet and David MacQueen. Tree pattern matching for ML. URL http://www.smlnj.org/compiler-notes/85-note-baudinet.ps. Unpublished, 1985.Google ScholarGoogle Scholar
  3. R. K. Brayton, G. D. Hachtel, C. T. McMullen, and A. L. Sangiovanni-Vincentelli. Logic Minimization Algorithms for VLSI Synthesis. Kluwer Academic Publishers, Boston, MA, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Amine Chaieb. Verifying mixed real-integer quantifier elimination. In Ulrich Furbach and Natarajan Shankar, editors, Automated Reasoning, Third International Joint Conference, LNAI 4130, pages 528--540. Springer, 2006. ISBN 3-540-37187-7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Amine Chaieb. Automated methods for formal proofs in simple arithmetics and algebra. D thesis, Technische Universität München, Germany, April 2008.Google ScholarGoogle Scholar
  6. Fabrice Le Fessant and Luc Maranget. Optimizing pattern matching. In ICFP, pages 26--37, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Michael Gordon and Tom Melham, editors. Introduction to HOL: A theorem proving environment for higher order logic. Cambridge University Press, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Gérard Huet. Confluent reductions: Abstract properties and applications to term rewriting systems. J. ACM, 27 (4): 797--821, 1980. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. John Hughes. The Design of a Pretty-printing Library. In J. Jeuring and E. Meijer, editors, Advanced Functional Programming, volume 925 of LNCS. Springer Verlag, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Randy H. Katz and Gaetano Borriello. Contemporary Logic Design. Prentice Hall, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. E. J. McCluskey. Logic Design Principles. Prentice Hall, 1986.Google ScholarGoogle Scholar
  12. E. J. McCluskey. Minimization of boolean formulas. Bell Lab. Tech. J., 35 (6): 1417--1444, Nov 1956.Google ScholarGoogle ScholarCross RefCross Ref
  13. Tobias Nipkow, Lawrence C. Paulson, and Markus Wenzel. Isabelle/HOL - A Proof Assistant for Higher-Order Logic. LNCS 2283. Springer, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Chris Okasaki. Red-black trees in a functional setting. J. Funct. Program., 9 (4): 471--477, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Christos H. Papadimitriou. Computational Complexity. Addison-Wesley, New York, 1994.Google ScholarGoogle Scholar
  16. Markus Schaefer and Christopher Umans. Completeness in the polynomial-time hierarchy: Part I: A compendium. SIGACTN: SIGACT News (ACM Special Interest Group on Automata and Computability Theory), 33, 2002.Google ScholarGoogle Scholar
  17. Konrad Slind. Reasoning About Terminating Functional Programs. D thesis, Institut für Informatik, TU München, 1999.Google ScholarGoogle Scholar
  18. Tadeusz Strzemecki. Polynomial-time algorithms for generation of prime implicants. J. Complexity, 8 (1): 37--63, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Simon Thompson. Haskell: The Craft of Functional Programming (2nd Edition). Addison-Wesley, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Christopher Umans. Approximability and completeness in the polynomial hierarchy. D thesis, University of California, Berkeley, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Christopher Umans, Tiziano Villa, and Alberto L. Sangiovanni-Vincentelli. Complexity of two-level logic minimization. IEEE Trans. on CAD of Integrated Circuits and Systems, 25 (7): 1230--1246, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Philip Wadler. Efficient compilation of pattern-matching. In S. L. Peyton Jones, The Implementation of Functional Programming Languages, chapter 5. Prentice-Hall International, 1987.Google ScholarGoogle Scholar
  23. Lyndon While and Tony Field. Optimising parallel pattern-matching by source-level program transformation. In Vladimir Estivill-Castro, editor, ACSC, volume 38 of CRPIT, pages 239--248. Australian Computer Society, 2005. ISBN 1-920682-20-1. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Pattern minimization problems over recursive data types

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 43, Issue 9
      ICFP '08
      September 2008
      399 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1411203
      Issue’s Table of Contents
      • cover image ACM Conferences
        ICFP '08: Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
        September 2008
        422 pages
        ISBN:9781595939197
        DOI:10.1145/1411204

      Copyright © 2008 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 20 September 2008

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!