Abstract
Coverage checking is the problem of deciding whether any closed term of a given type is an instance of at least one of a given set of patterns. It can be used to verify if a function defined by pattern matching covers all possible cases. This problem has a straightforward solution for the first-order, simply-typed case, but is in general undecidable in the presence of dependent types. In this paper we present a terminating algorithm for verifying coverage of higher-order, dependently typed patterns. It either succeeds or presents a set of counterexamples with free variables, some of which may not have closed instances (a question which is undecidable). Our algorithm, together with strictness and termination checking, can be used to certify the correctness of numerous proofs of properties of deductive systems encoded in a system for reasoning about LF signatures.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Coquand, T.: An algorithm for testing conversion in type theory. In: Huet, G., Plotkin, G. (eds.) Logical Frameworks, pp. 255–279. Cambridge University Press, Cambridge (1991)
Coquand, T.: Pattern matching with dependent types. In: Proceedings of the Workshop on Types for Proofs and Programs, Båstad, Sweden, pp. 71–83 (1992)
Crary, K.: Toward a foundational typed assembly language. In: Morrisett, G. (ed.) Proceedings of the 30th Annual Symposium on Principles of Programming Languages, New Orleans, Louisiana, January 2003, pp. 198–212. ACM Press, New York (2003)
Dowek, G., Hardin, T., Kirchner, C., Pfenning, F.: Unification via explicit substitutions: The case of higher-order patterns. In: Maher, M. (ed.) Proceedings of the Joint International Conference and Symposium on Logic Programming, Bonn, Germany, September 1996, pp. 259–273. MIT Press, Cambridge (1996)
Elliott, C.M.: Extensions and Applications of Higher-Order Unification. PhD thesis, School of Computer Science, Carnegie Mellon University, Available as Technical Report CMU-CS-90-134 (May 1990)
Eriksson, L.-H.: Finitary Partial Inductive Definitions and General Logic. PhD thesis, Department of Computer and System Sciences, Royal Institute of Technology, Stockholm (1993)
Hallnäs, L.: Partial inductive definitions. Theoretical Computer Science 87(1), 115–142 (1991)
Harper, R., Honsell, F., Plotkin, G.: A framework for defining logics. Journal of the Association for Computing Machinery 40(1), 143–184 (1993)
Hofmann, M., Streicher, T.: The groupoid model refutes uniqueness of identity proofs. In: Proceedings of the 9th Annual Symposium on Logic in Computer Science (LICS 1994), Paris, France, pp. 208–212. IEEE Computer Society Press, Los Alamitos (1994)
Huet, G.: A unification algorithm for typed λ-calculus. Theoretical Computer Science 1, 27–57 (1975)
INRIA. The Coq Proof Assistant, version 7.4 edition, Reference Manual (February 2003)
McBride, C.: Dependently Typed Functional Programs and their Proofs. PhD thesis, University of Edinburgh (1999), Available as Technical Report ECS-LFCS-00-419
Miller, D.: A logic programming language with lambda-abstraction, function variables, and simple unification. Journal of Logic and Computation 1(4), 497–536 (1991)
Pfenning, F.: Logical frameworks. In: Robinson, A., Voronkov, A. (eds.) Handbook of Automated Reasoning. ch. 17, pp. 1063–1147. Elsevier Science and MIT Press (2001)
Pfenning, F., Schürmann, C.: Algorithms for equality and unification in the presence of notational definitions. In: Altenkirch, T., Naraschewski, W., Reus, B. (eds.) TYPES 1998. LNCS, vol. 1657, pp. 179–193. Springer, Heidelberg (1999)
Pfenning, F., Schürmann, C.: System description: Twelf — a meta-logical framework for deductive systems. In: Ganzinger, H. (ed.) CADE 1999. LNCS (LNAI), vol. 1632, pp. 202–206. Springer, Heidelberg (1999)
Pientka, B.: Termination and reduction checking for higher-order logic programs. In: Goré, R.P., Leitsch, A., Nipkow, T. (eds.) IJCAR 2001. LNCS (LNAI), vol. 2083, pp. 401–415. Springer, Heidelberg (2001)
Pientka, B., Pfenning, F.: Optimizing higher-order pattern unification. In: Baader, F. (ed.) CADE 2003. LNCS (LNAI), vol. 2741, pp. 473–487. Springer, Heidelberg (2003) (to appear)
Rohwedder, E., Pfenning, F.: Mode and termination checking for higher-order logic programs. In: Riis Nielson, H. (ed.) ESOP 1996. LNCS, vol. 1058, pp. 296–310. Springer, Heidelberg (1996)
Schroeder-Heister, P.: Rules of definitional reflection. In: Vardi, M. (ed.) Proceedings of the Eighth Annual IEEE Symposium on Logic in Computer Science, Montreal, Canada, June 1993, pp. 222–232 (1993)
Schürmann, C.: Automating the Meta Theory of Deductive Systems. PhD thesis, Department of Computer Science, Carnegie Mellon University, Available as Technical Report CMU-CS-00-146 (August 2000)
Schürmann, C., Fontana, R., Liao, Y.: Delphin: Functional programming with deductive systems. Draft
Virga, R.: Higher-Order Rewriting with Dependent Types. PhD thesis, Department of Mathematical Sciences, Carnegie Mellon University, Available as Technical Report CMU-CS-99-167 (September 1999)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Schürmann, C., Pfenning, F. (2003). A Coverage Checking Algorithm for LF. In: Basin, D., Wolff, B. (eds) Theorem Proving in Higher Order Logics. TPHOLs 2003. Lecture Notes in Computer Science, vol 2758. Springer, Berlin, Heidelberg. https://doi.org/10.1007/10930755_8
Download citation
DOI: https://doi.org/10.1007/10930755_8
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40664-8
Online ISBN: 978-3-540-45130-3
eBook Packages: Springer Book Archive