Advertisement

Eliminating Dependent Pattern Matching

  • Healfdene Goguen
  • Conor McBride
  • James McKinna
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4060)

Abstract

This paper gives a reduction-preserving translation from Coquand’s dependent pattern matching [4] into a traditional type theory [11] with universes, inductive types and relations and the axiom K [22]. This translation serves as a proof of termination for structurally recursive pattern matching programs, provides an implementable compilation technique in the style of functional programming languages, and demonstrates the equivalence with a more easily understood type theory.

Keywords

Pattern Match Type Theory Recursive Call Logical Framework Inductive Type 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Augustsson, L.: Compiling Pattern Matching. In: Jouannaud, J.-P. (ed.) FPCA 1985. LNCS, vol. 201, Springer, Heidelberg (1985)Google Scholar
  2. 2.
    Brady, E., McBride, C., McKinna, J.: Inductive families need not store their indices. In: Berardi, S., Coppo, M., Damiani, F. (eds.) TYPES 2003. LNCS, vol. 3085, pp. 115–129. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  3. 3.
    Burstall, R.: Proving properties of programs by structural induction. Computer Journal 12(1), 41–48 (1969)zbMATHGoogle Scholar
  4. 4.
    Coquand, T.: Pattern Matching with Dependent Types. In: Nordström, B., Petersson, K., Plotkin, G. (eds.) Electronic Proceedings of the Third Annual BRA Workshop on Logical Frameworks, Båstad, Sweden (1992)Google Scholar
  5. 5.
    de Bruijn, N.G.: Telescopic Mappings in Typed Lambda-Calculus. Information and Computation 91, 189–204 (1991)zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    Dybjer, P.: Inductive Sets and Families in Martin-Löf’s Type Theory. In: Huet, G., Plotkin, G. (eds.) Logical Frameworks, CUP, Cambridge (1991)Google Scholar
  7. 7.
    Giménez, E.: Codifying guarded definitions with recursive schemes. In: Smith, J., Dybjer, P., Nordström, B. (eds.) TYPES 1994. LNCS, vol. 996, pp. 39–59. Springer, Heidelberg (1994)Google Scholar
  8. 8.
    Goguen, H.: A Typed Operational Semantics for Type Theory. Ph.D thesis, Laboratory for Foundations of Computer Science, University of Edinburgh (1994), Available from http://www.lfcs.informatics.ed.ac.uk/reports/94/ECS-LFCS-94-304/
  9. 9.
    Hofmann, M., Streicher, T.: A groupoid model refutes uniqueness of identity proofs. In: Proc. Ninth Annual Symposium on Logic in Computer Science (LICS) (Paris, France), pp. 208–212. IEEE Computer Society Press, Los Alamitos (1994)CrossRefGoogle Scholar
  10. 10.
    Jouannaud, J.-P., Kirchner, C.: Solving equations in abstract algebras: A rule-based survey of unification. In: Lassez, J.-L., Plotkin, G. (eds.) Computational Logic: Essays in Honor of Alan Robinson, pp. 257–321. MIT Press, Cambridge (1991)Google Scholar
  11. 11.
    Luo, Z.: Computation and Reasoning: A Type Theory for Computer Science. Oxford University Press, Oxford (1994)zbMATHGoogle Scholar
  12. 12.
    Luo, Z., Pollack, R.: LEGO Proof Development System: User’s Manual. Technical Report ECS-LFCS-92-211, Laboratory for Foundations of Computer Science, University of Edinburgh (1992)Google Scholar
  13. 13.
    Magnusson, L., Nordström, B.: The ALF proof editor and its proof engine. In: Barendregt, H., Nipkow, T. (eds.) TYPES 1993. LNCS, vol. 806, Springer, Heidelberg (1994)Google Scholar
  14. 14.
    Martin-Löf, P.: A theory of types (1971) (manuscript)Google Scholar
  15. 15.
    McBride, C.: Dependently Typed Functional Programs and their Proofs. Ph.D thesis, University of Edinburgh (1999), Available from http://www.lfcs.informatics.ed.ac.uk/reports/00/ECS-LFCS-00-419/
  16. 16.
    McBride, C.: Elimination with a Motive. In: Callaghan, P., Luo, Z., McKinna, J., Pollack, R. (eds.) TYPES 2000. LNCS, vol. 2277, p. 197. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  17. 17.
    McBride, C., Goguen, H., McKinna, J.: A few constructions on constructors. In: Filliâtre, J.-C., Paulin, C., Werner, B. (eds.) Types for Proofs and Programs. LNCS, vol. 2004, Springer, Heidelberg (2004)Google Scholar
  18. 18.
    McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1) (2004)Google Scholar
  19. 19.
    McBride, F.: Computer Aided Manipulation of Symbols. Ph.D thesis, Queen’s University of Belfast (1970)Google Scholar
  20. 20.
    Nordström, B., Petersson, K., Smith, J.: Programming in Martin-Löf’s type theory: an introduction. Oxford University Press, Oxford (1990)zbMATHGoogle Scholar
  21. 21.
    Schürmann, C., Pfenning, F.: A coverage checking algorithm for LF. In: Basin, D., Wolff, B. (eds.) TPHOLs 2003. LNCS, vol. 2758, pp. 120–135. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  22. 22.
    Streicher, T.: Investigations into intensional type theory. Habilitation Thesis, Ludwig Maximilian Universität (1993)Google Scholar
  23. 23.
    Walukiewicz-Chrzaszcz, D.: Termination of rewriting in the calculus of constructions. J. Funct. Program. 13(2), 339–414 (2003)zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Healfdene Goguen
    • 1
  • Conor McBride
    • 2
  • James McKinna
    • 3
  1. 1.GoogleNew York
  2. 2.School of Computer Science and Information TechnologyUniversity of Nottingham 
  3. 3.School of Computer ScienceUniversity of St Andrews 

Personalised recommendations