Practical Inference for Type-Based Termination in a Polymorphic Setting

  • Gilles Barthe
  • Benjamin Grégoire
  • Fernando Pastawski
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3461)


We introduce a polymorphic λ-calculus that features inductive types and that enforces termination of recursive definitions through typing. Then, we define a sound and complete type inference algorithm that computes a set of constraints to be satisfied for terms to be typable. In addition, we show that Subject Reduction fails in a naive use of typed-based termination for a λ-calculus à la Church, and we propose a general solution to this problem.


Constraint System Inference Algorithm Typing Rule Proof Assistant 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.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abel, A.: Termination checking with types. RAIRO– Theoretical Informatics and Applications 38, 277–320 (2004)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Amadio, R., Coupet-Grimal, S.: Analysis of a guard condition in type theory. In: Nivat, M. (ed.) FOSSACS 1998. LNCS, vol. 1378, pp. 48–62. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  3. 3.
    Bac, A.: Un algorithme d’inférence de types pour les types coinductifs. Master’s thesis, École Normale Supérieure de Lyon (1998)Google Scholar
  4. 4.
    Barras, B.: Auto-validation d’un système de preuves avec familles inductives. PhD thesis, Université Paris 7 (1999)Google Scholar
  5. 5.
    Barthe, G., Frade, M.J., Giménez, E., Pinto, L., Uustalu, T.: Type-based termination of recursive definitions. Mathematical Structures in Computer Science 14, 97–141 (2004)zbMATHCrossRefGoogle Scholar
  6. 6.
    Blanqui, F.: A type-based termination criterion for dependently-typed higher-order rewrite systems. In: van Oostrom, V. (ed.) RTA 2004. LNCS, vol. 3091, pp. 24–39. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  7. 7.
    Chin, W.-N., Khoo, S.-C.: Calculating sized types. Higher-Order and Symbolic Computation 14(2-3), 261–300 (2001)zbMATHCrossRefGoogle Scholar
  8. 8.
    Coq Development Team. The Coq Proof Assistant User’s Guide. Version 8.0 (January 2004)Google Scholar
  9. 9.
    Geuvers, H.: Inductive and coinductive types with iteration and recursion. In: Nordström, B., Pettersson, K., Plotkin, G. (eds.) Informal proceedings of Logical Frameworks 1992, pp. 193–217 (1992)Google Scholar
  10. 10.
    Giménez, E.: Un calcul de constructions infinies et son application à la vérification de systèmes communicants. PhD thesis, Ecole Normale Superieure de Lyon (1996)Google Scholar
  11. 11.
    Giménez, E.: Structural recursive definitions in Type Theory. In: Larsen, K.G., Skyum, S., Winskel, G. (eds.) ICALP 1998. LNCS, vol. 1443, pp. 397–408. Springer, Heidelberg (1998)CrossRefGoogle Scholar
  12. 12.
    Hughes, J., Pareto, L., Sabry, A.: Proving the correctness of reactive systems using sized types. In: Proceedings of POPL 1996, pp. 410–423. ACM Press, New York (1996)CrossRefGoogle Scholar
  13. 13.
    Mendler, N.P.: Inductive types and type constraints in the second-order lambda calculus. Annals of Pure and Applied Logic 51(1-2), 159–172 (1991)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Steffen, M.: Polarized Higher-order Subtyping. PhD thesis, Department of Computer Science, University of Erlangen (1997)Google Scholar
  15. 15.
    Werner, B.: Méta-théorie du Calcul des Constructions Inductives. PhD thesis, Université Paris 7 (1994)Google Scholar
  16. 16.
    Xi, H.: Dependent Types for Program Termination Verification. In: Proceedings of LICS 2001, pp. 231–242. IEEE Computer Society Press, Los Alamitos (2001)Google Scholar
  17. 17.
    Xi, H., Pfenning, F.: Dependent types in practical programming. In: Proceedings of POPL 1999, pp. 214–227. ACM Press, New York (1999)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Gilles Barthe
    • 1
  • Benjamin Grégoire
    • 1
  • Fernando Pastawski
    • 2
  1. 1.INRIA Sophia-AntipolisFrance
  2. 2.FaMAFUniv. Nacional de CórdobaArgentina

Personalised recommendations