Semi-continuous Sized Types and Termination

  • Andreas Abel
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4207)


A type-based approach to termination uses sized types: an ordinal bound for the size of a data structure is stored in its type. A recursive function over a sized type is accepted if it is visible in the type system that recursive calls occur just at a smaller size. This approach is only sound if the type of the recursive function is admissible, i.e., depends on the size index in a certain way. To explore the space of admissible functions in the presence of higher-kinded data types and impredicative polymorphism, a semantics is developed where sized types are interpreted as functions from ordinals into sets of strongly normalizing terms. It is shown that upper semi-continuity of such functions is a sufficient semantical criterion for admissibility. To provide a syntactical criterion, a calculus for semi-continuous function is developed.


Recursive Function Recursive Call Size Index Recursion Operator 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 and guardedness checking with continuous types. In: Hofmann, M.O. (ed.) TLCA 2003. LNCS, vol. 2701, pp. 1–15. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  2. 2.
    Abel, A.: Termination checking with types. RAIRO – Theoretical Informatics and Applications 38, 277–319 (2004) (Special Issue: Fixed Points in Computer Science (FICS 2003))MATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Abel, A.: Polarized subtyping for sized types. In: Grigoriev, D., Harrison, J., Hirsch, E.A. (eds.) CSR 2006. LNCS, vol. 3967, pp. 381–392. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  4. 4.
    Abel, A.: A Polymorphic Lambda-Calculus with Sized Higher-Order Types. Ph.D. thesis, Ludwig-Maximilians-Universität München (2006)Google Scholar
  5. 5.
    Abel, A., Matthes, R.: Fixed points of type constructors and primitive recursion. In: Marcinkowski, J., Tarlecki, A. (eds.) CSL 2004. LNCS, vol. 3210, pp. 190–204. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  6. 6.
    Amadio, R.M., 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
  7. 7.
    Barthe, G., Frade, M.J., Giménez, E., Pinto, L., Uustalu, T.: Type-based termination of recursive definitions. Mathematical Structures in Computer Science 14, 1–45 (2004)CrossRefGoogle Scholar
  8. 8.
    Barthe, G., Grégoire, B., Pastawski, F.: Practical inference for type-based termination in a polymorphic setting. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 71–85. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  9. 9.
    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
  10. 10.
    Blanqui, F.: Decidability of type-checking in the Calculus of Algebraic Constructions with size annotations. In: Ong, L. (ed.) CSL 2005. LNCS, vol. 3634, pp. 135–150. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  11. 11.
    Crary, K., Weirich, S.: Flexible type analysis. In: Proceedings of the Fourth ACM SIGPLAN International Conference on Functional Programming (ICFP 1999), Paris, France. SIGPLAN Notices, vol. 34, pp. 233–248. ACM Press, New York (1999)CrossRefGoogle Scholar
  12. 12.
    Duggan, D., Compagnoni, A.: Subtyping for object type constructors. In: FOOL 6 (1999)Google Scholar
  13. 13.
    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
  14. 14.
    Hughes, J., Pareto, L., Sabry, A.: Proving the correctness of reactive systems using sized types. In: 23rd Symposium on Principles of Programming Languages, POPL 1996, pp. 410–423 (1996)Google Scholar
  15. 15.
    Mendler, N.P.: Recursive types and type constraints in second-order lambda calculus. In: Proceedings of the Second Annual IEEE Symposium on Logic in Computer Science, Ithaca, NY, pp. 30–36. IEEE Computer Society Press, Los Alamitos (1987)Google Scholar
  16. 16.
    Pareto, L.: Types for Crash Prevention. Ph.D. thesis, Chalmers University of Technology (2000)Google Scholar
  17. 17.
    Paulin-Mohring, C.: Inductive definitions in the system Coq—rules and properties. Technical report, Laboratoire de l’Informatique du Parallélisme (1992)Google Scholar
  18. 18.
    Steffen, M.: Polarized Higher-Order Subtyping. Ph.D. thesis, Technische Fakultät, Universität Erlangen (1998)Google Scholar
  19. 19.
    Xi, H.: Dependent types for program termination verification. In: Proceedings of 16th IEEE Symposium on Logic in Computer Science, Boston, USA (2001)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Andreas Abel
    • 1
  1. 1.Institut für InformatikLudwig-Maximilians-Universität MünchenMünchenGermany

Personalised recommendations