The paradigm of type-based termination is explored for functional programming with recursive data types. The article introduces , a lambda-calculus with recursion, inductive types, subtyping and bounded quantification. Decorated type variables representing approximations of inductive types are used to track the size of function arguments and return values. The system is shown to be type safe and strongly normalizing. The main novelty is a bidirectional type checking algorithm whose soundness is established formally.
Mots clés : type-based termination, sized types, inductive types, course-of-value recursion, bidirectional type checking, strong normalization
@article{ITA_2004__38_4_277_0, author = {Abel, Andreas}, title = {Termination checking with types}, journal = {RAIRO - Theoretical Informatics and Applications - Informatique Th\'eorique et Applications}, pages = {277--319}, publisher = {EDP-Sciences}, volume = {38}, number = {4}, year = {2004}, doi = {10.1051/ita:2004015}, mrnumber = {2098193}, zbl = {1089.68028}, language = {en}, url = {http://archive.numdam.org/articles/10.1051/ita:2004015/} }
TY - JOUR AU - Abel, Andreas TI - Termination checking with types JO - RAIRO - Theoretical Informatics and Applications - Informatique Théorique et Applications PY - 2004 SP - 277 EP - 319 VL - 38 IS - 4 PB - EDP-Sciences UR - http://archive.numdam.org/articles/10.1051/ita:2004015/ DO - 10.1051/ita:2004015 LA - en ID - ITA_2004__38_4_277_0 ER -
%0 Journal Article %A Abel, Andreas %T Termination checking with types %J RAIRO - Theoretical Informatics and Applications - Informatique Théorique et Applications %D 2004 %P 277-319 %V 38 %N 4 %I EDP-Sciences %U http://archive.numdam.org/articles/10.1051/ita:2004015/ %R 10.1051/ita:2004015 %G en %F ITA_2004__38_4_277_0
Abel, Andreas. Termination checking with types. RAIRO - Theoretical Informatics and Applications - Informatique Théorique et Applications, Tome 38 (2004) no. 4, pp. 277-319. doi : 10.1051/ita:2004015. http://archive.numdam.org/articles/10.1051/ita:2004015/
[1] Specification and verification of a formal system for structurally recursive functions, in Types for Proof and Programs, International Workshop, TYPES '99, edited by T. Coquand, P. Dybjer, B. Nordström, J. Smith, Springer. Lect. Notes Comput. Sci. 1956 (2000) 1-20. | Zbl
,[2] A third-order representation of the -calculus, edited by S. Ambler, R. Crole, A. Momigliano, Elsevier Science Publishers. Electron. Notes Theor. Comput. Sci. 58 (2001).
,[3] Termination and guardedness checking with continuous types, in Typed Lambda Calculi and Applications (TLCA 2003), edited by M. Hofmann, Valencia, Spain, Springer. Lect. Notes Comput. Sci. 2701 (2003) 1-15. | Zbl
,[4] Soundness of a bidirectional typing algorithm. Twelf code, available on the author's homepage, http://www.tcs.informatik.uni-muenchen.de/ abel (May 2004).
,[5] A predicative analysis of structural recursion. J. Funct. Programming 12 (2002) 1-41. | Zbl
and ,[6] Constructions, Inductive Types and Strong Normalization. Ph.D. Thesis, University of Edinburgh (Nov. 1993).
,[7] Analysis of a guard condition in type theory, in Foundations of Software Science and Computation Structures, First International Conference, FoSSaCS'98, edited by M. Nivat, Springer. Lect. Notes Comput. Sci. 1378 (1998). | Zbl
and ,[8] Termination of term rewriting using dependency pairs. Theor. Comput. Sci. 236 (2000) 133-178. | Zbl
and ,[9] Type-based termination of recursive definitions. Math. Struct. Comput. Sci. 14 (2004) 1-45. | Zbl
, , , and ,[10] A computational interpretation of the -calculus, in Proc. of Symposium on Mathematical Foundations of Computer Science, edited by L. Brim, J. Gruska, J. Zlatuska, Brno, Czech Republic. Lect. Notes Comput. Sci. 1450 (1998) 336-345. | Zbl
,[11] Type Theory and Rewriting. Ph.D. Thesis, Université Paris XI (Sept. 2001).
,[12] A type-based termination criterion for dependently-typed higher-order rewrite systems, in 15th International Conference on Rewriting Techniques and Applications (RTA 04), June 3-5, 2004, Aachen, Germany, Springer. Lect. Notes Comput. Sci. 3091 (2004) 24-39.
,[13] Inductive data type systems. Theor. Comput. Sci. 277 (2001). | MR | Zbl
, and ,[14] Termination analysis for partial functions, in Proc. of the Third International Static Analysis Symposium (SAS'96), Aachen, Germany, Springer. Lect. Notes Comput. Sci. 1145 (1996).
and ,[15] Calculating sized types. Higher-Order and Symbolic Computation 14 (2001) 261-300. | Zbl
and ,[16] Agda. WWW page (2000) http://www.cs.chalmers.se/ catarina/agda/
,[17] Infinite objects in type theory, in Types for Proofs and Programs (TYPES '93), edited by H. Barendregt, T. Nipkow, Springer. Lect. Notes Comput. Sci. 806 (1993) 62-78.
,[18] An algorithm for type-checking dependent types, in Mathematics of Program Construction. Selected Papers from the Third International Conference on the Mathematics of Program Construction, July 17-21, 1995, Kloster Irsee, Germany, Elsevier Science. Sci. Comput. Programming 26 167-177 (1996). | Zbl
,[19] Resource bound certification, in Proc. of the 27th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Boston, Massachusetts, USA (Jan. 2000) 184-198.
and ,[20] Intersection types and computational effects, in Proc. of the International Conference on Functional Programming (ICFP 2000), Montreal, Canada (Sept. 2000) 198-208.
and ,[21] Tridirectional typechecking, in 31st Annual Symposium on Principles of Programming Languages (POPL'04), edited by N.D. Jones and X. Leroy, Venice, Italy. ACM (Jan. 2004) 281-292.
and ,[22] Termination of nested and mutually recursive algorithms. J. Automat. Reason. 19 (1997) 1-29. | Zbl
,[23] Structural recursive definitions in type theory, in Automata, Languages and Programming, 25th International Colloquium, ICALP'98, Aalborg, Denmark, July 13-17 1998, Proc., Springer. Lect. Notes Comput. Sci. 1443 (1998) 397-408. | Zbl
,[24] Type error slicing in implicitly typed, higher-order languages, in Programming Languages and Systems, 12th European Symp. Programming, Springer. Lect. Notes Comput. Sci. 2618 (2003) 284-301. | Zbl
and ,[25] A typed lambda calculus with categorical type constructors, in Category Theory and Computer Science, edited by D.H. Pitt, A. Poigné, D.E. Rydeheard. Lect. Notes Comput. Sci. 283 (1987) 140-157. | Zbl
,[26] Alfa home page. http://www.math.chalmers.se/ hallgren/Alfa/ (2003).
,[27] Recursion and dynamic data-structures in bounded space: Towards embedded ML programming, in International Conference on Functional Programming (ICFP'99) (1999) 70-81.
and ,[28] Proving the correctness of reactive systems using sized types, in Symposium on Principles of Programming Languages (1996) 410-423.
, and ,[29] INRIA, The Coq Proof Assistant Reference Manual, version 8.0 edition (April 2004). http://coq.inria.fr/doc/main.html
[30] The size-change principle for program termination, in ACM Symposium on Principles of Programming Languages (POPL'01), London, UK. ACM Press (Jan. 2001).
, and ,[31] ECC: An Extended Calculus of Constructions. Ph.D. Thesis, University of Edinburgh (1990). | Zbl
,[32] Extensions of System F by Iteration and Primitive Recursion on Monotone Inductive Types. Ph.D. Thesis, Ludwig-Maximilians-University (May 1998). | Zbl
,[33] Dependently Typed Functional Programs and their Proofs. Ph.D. Thesis, University of Edinburgh (1999).
,[34] Recursive types and type constraints in second-order lambda calculus, in Proc. of the Second Annual IEEE Symposium on Logic in Computer Science, Ithaca, New York. IEEE Computer Society Press (1987) 30-36.
,[35] Inductive types and type constraints in the second-order lambda calculus. Ann. Pure Appl. Logic 51 (1991) 159-172. | Zbl
,[36] A theory of type polymorphism in programming. J. Comput. Syst. Sci. 17 (1978) 348-375. | Zbl
,[37] Types for Crash Prevention. Ph.D. Thesis, Chalmers University of Technology (2000).
,[38] -calculus: An algorithmic interpretation of classical natural deduction, in Logic Programming and Automated Reasoning: Proc. of the International Conference LPAR'92, edited by A. Voronkov, Springer, Berlin, Heidelberg (1992) 190-201. | Zbl
,[39] System description: Twelf - a meta-logical framework for deductive systems, in Proc. of the 16th International Conference on Automated Deduction (CADE-16), edited by H. Ganzinger, Springer, Trento, Italy. Lect. Notes Artif. Intell. 1632 (1999) 202-206.
and ,[40] Termination and reduction checking for higher-order logic programs, in Automated Reasoning, First International Joint Conference, IJCAR 2001, edited by R. Goré, A. Leitsch, and T. Nipkow, Springer. Lect. Notes Artif. Intell. 2083 (2001) 401-415. | Zbl
,[41] Types and Programming Languages. MIT Press (2002). | MR | Zbl
,[42] Local type inference, in POPL 98: The 25TH ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, San Diego, California (1998).
, ,[43] The Theory of LEGO. Ph.D. Thesis, University of Edinburgh (1994).
,[44] Type fixpoints: Iteration vs. recursion, in Proc. of the 1999 International Conference on Functional Programming (ICFP), Paris, France. SIGPLAN Notices 34 (1999) 102-113.
and ,[45] Ensuring streams flow, in Algebraic Methodology and Software Technology (AMAST '97), Springer. Lect. Notes Comput. Sci. 1349 (1997) 509-523.
and ,[46] Ensuring termination in ESFP, in Proc. of BCTCS 15, 1999. J. Universal Comput. Sci. 6 (2000) 474-488. | Zbl
and ,[47] Primitive (co)recursion and course-of-value (co)iteration, categorically. Informatica (Lithuanian Academy of Sciences) 10 (1999) 5-26. | Zbl
and ,[48] Argument-Bounded Algorithms as a Basis for Automated Termination Proofs, in 9th International Conference on Automated Deduction, edited by E.L. Lusk and R.A. Overbeek, Springer. Lect. Notes Comput. Sci. 310 (1988) 602-621. | Zbl
,[49] A syntactic approach to type soundness. Inform. Comput. 115 (1994) 38-94. | Zbl
and ,[50] Dependent types for program termination verification. J. Higher-Order and Symbolic Computation 15 (2002) 91-131. | Zbl
,[51] Explaining polymorphic types. Comput. J. 45 (2002) 436-452. | Zbl
, and ,Cité par Sources :