Verifying a Decision Procedure for Pattern Completeness

René Thiemann 🌐 and Akihisa Yamada 📧

May 27, 2024

Abstract

Pattern completeness is the property that the left-hand sides of a functional program or term rewrite system cover all cases w.r.t. pattern matching. We verify a recent (abstract) decision procedure for pattern completeness that covers the general case, i.e., in particular without the usual restriction of left-linearity. In two refinement steps, we further develop an executable version of that abstract algorithm. On our example suite, this verified implementation is faster than other implementations that are based on alternative (unverified) approaches, including the complement algorithm, tree automata encodings, and even the pattern completeness check of the GHC Haskell compiler.

License

BSD License

History

November 5, 2025
added improved algorithm for pattern completeness and complexity results (revision e2b0c94f7898)

Topics

Related publications

  • Thiemann, R., & Yamada, A. (2024). A Verified Algorithm for Deciding Pattern Completeness. In J. Rehof (Ed.), LIPIcs, Volume 299, FSCD 2024 (No.27; Vol. 299, pp. 27:1–27:17). Schloss Dagstuhl – Leibniz-Zentrum für Informatik. https://doi.org/10.4230/LIPICS.FSCD.2024.27

Session Pattern_Completeness