Abstract
In this paper, we study strong normalization of a core language based on System F-omega which supports programming with finite and infinite structures. Building on our prior work, finite data such as finite lists and trees are defined via constructors and manipulated via pattern matching, while infinite data such as streams and infinite trees is defined by observations and synthesized via copattern matching. In this work, we take a type-based approach to strong normalization by tracking size information about finite and infinite data in the type. This guarantees compositionality. More importantly, the duality of pattern and copatterns provide a unifying semantic concept which allows us for the first time to elegantly and uniformly support both well-founded induction and coinduction by mere rewriting. The strong normalization proof is structured around Girard's reducibility candidates. As such our system allows for non-determinism and does not rely on coverage. Since System F-omega is general enough that it can be the target of compilation for the Calculus of Constructions, this work is a significant step towards representing observation-centric infinite data in proof assistants such as Coq and Agda.
- A. Abel. Polarized subtyping for sized types. Math. Struct. in Comput. Sci., 18: 797--822, 2008. Special issue on subtyping, edited by Healfdene Goguen and Adriana Compagnoni.Google Scholar
Cross Ref
- A. Abel. Semi-continuous sized types and termination. Logical Meth. in Comput. Sci., 4 (2:3): 1--33, 2008. CSL'06 special issue. Google Scholar
Digital Library
- A. Abel. Type-based termination, inflationary fixed-points, and mixed inductive-coinductive types. Electr. Proc. in Theor. Comp. Sci., 77: 1--11, 2012. Proceedings of FICS 2012.Google Scholar
Cross Ref
- A. Abel and B. Pientka. Wellfounded recursion with copatterns: A unified approach to termination and productivity. URL http://www.tcs.ifi.lmu.de/ abel/icfp13-long.pdf. Extended version, 2013.Google Scholar
- A. Abel, B. Pientka, D. Thibodeau, and A. Setzer. Copatterns: Programming infinite structures by observations. In Proc. of the 40th ACM Symp. on Principles of Programming Languages, POPL 2013, pages 27--38. ACM Press, 2013. Google Scholar
Digital Library
- T. Altenkirch and N. A. Danielsson. Termination checking in the presence of nested inductive and coinductive types. Short note supporting a talk given at PAR 2010, Workshop on Partiality and Recursion in Interactive Theorem Provers, FLoC 2010, 2010. URL http://www.cse.chalmers.se/ nad/publications/altenkirch-danielsson-par2%010.pdf.Google Scholar
- R. M. Amadio and S. Coupet-Grimal. Analysis of a guard condition in type theory (extended abstract). In Proc. of the 1st Int. Conf. on Foundations of Software Science and Computation Structure, FoSSaCS'98, volume 1378 of Lect. Notes in Comput. Sci., pages 48--62. Springer, 1998. Google Scholar
Digital Library
- G. Barthe, M. J. Frade, E. Giménez, L. Pinto, and T. Uustalu. Type-based termination of recursive definitions. Math. Struct. in Comput. Sci., 14 (1): 97--141, 2004. Google Scholar
Digital Library
- G. Barthe, B. Grégoire, and C. Riba. Type-based termination with sized products. In Computer Science Logic, 22nd Int. Wksh., CSL 2008, 17th Annual Conf. of the EACSL, volume 5213 of Lect. Notes in Comput. Sci., pages 493--507. Springer, 2008. Google Scholar
Digital Library
- F. Blanqui. A type-based termination criterion for dependently-typed higher-order rewrite systems. In Rewriting Techniques and Applications (RTA 2004), Aachen, Germany, volume 3091 of Lect. Notes in Comput. Sci., pages 24--39. Springer, 2004.Google Scholar
Cross Ref
- F. Blanqui and C. Riba. Combining typing and size constraints for checking the termination of higher-order conditional rewrite systems. In Proc. of the 13th Int. Conf. on Logic for Programming, Artificial Intelligence, and Reasoning, LPAR 2006, volume 4246 of Lect. Notes in Comput. Sci., pages 105--119. Springer, 2006. Google Scholar
Digital Library
- N. Ghani, P. Hancock, and D. Pattinson. Representations of stream processors using nested fixed points. Logical Meth. in Comput. Sci., 5 (3), 2009.Google Scholar
- E. Giménez. Un Calcul de Constructions Infinies et son application a la vérification de systèmes communicants. PhD thesis, Ecole Normale Supérieure de Lyon, 1996. Thèse d'université.Google Scholar
- J.-Y. Girard, Y. Lafont, and P. Taylor. Proofs and Types, volume 7 of Cambridge Tracts in Theoret. Comput. Sci. Cambridge University Press, 1989. Google Scholar
Digital Library
- J. Hughes, L. Pareto, and A. Sabry. Proving the correctness of reactive systems using sized types. In Proc. of the 23rd ACM Symp. on Principles of Programming Languages, POPL'96, pages 410--423, 1996. Google Scholar
Digital Library
- INRIA. The Coq Proof Assistant Reference Manual. INRIA, version 8.4 edition, 2012. URL http://coq.inria.fr/.Google Scholar
- U. Norell. Towards a Practical Programming Language Based on Dependent Type Theory. PhD thesis, Dept of Comput. Sci. and Engrg., Chalmers, Göteborg, Sweden, 2007.Google Scholar
- J. L. Sacchini. Type-based productivity of stream definitions in the calculus of constructions. In Logics in Computer Science (LICS 2013), June 25--28, 2013, New Orleans, 2013.Google Scholar
- B. A. Sijtsma. On the productivity of recursive list definitions. ACM Trans. Prog. Lang. Syst., 11 (4): 633--649, 1989. Google Scholar
Digital Library
- C. Sprenger and M. Dam. On the structure of inductive reasoning: Circular and tree-shaped proofs in the μ-calculus. In Proc. of the 6th Int. Conf. on Foundations of Software Science and Computational Structures, FoSSaCS 2003, volume 2620 of Lect. Notes in Comput. Sci., pages 425--440. Springer, 2003. Google Scholar
Digital Library
- M. Steffen. Polarized Higher-Order Subtyping. PhD thesis, Technische Fakultat, Universit\"at Erlangen, 1998.Google Scholar
- P. Taylor. Intuitionistic sets and ordinals. J. Symb. Logic, 61 (3): 705--744, 1996.Google Scholar
Cross Ref
- J. Vouillon and P.-A. Melliès. Semantic types: A fresh look at the ideal model for types. In Proc. of the 31st ACM Symp. on Principles of Programming Languages, POPL 2004, pages 52--63. ACM Press, 2004. Google Scholar
Digital Library
- H. Xi. Dependent types for program termination verification. J. Higher-Order and Symb. Comput., 15 (1): 91--131, 2002. Google Scholar
Digital Library
Index Terms
Wellfounded recursion with copatterns: a unified approach to termination and productivity
Recommendations
Copatterns: programming infinite structures by observations
POPL '13Inductive datatypes provide mechanisms to define finite data such as finite lists and trees via constructors and allow programmers to analyze and manipulate finite data via pattern matching. In this paper, we develop a dual approach for working with ...
Wellfounded recursion with copatterns: a unified approach to termination and productivity
ICFP '13: Proceedings of the 18th ACM SIGPLAN international conference on Functional programmingIn this paper, we study strong normalization of a core language based on System F-omega which supports programming with finite and infinite structures. Building on our prior work, finite data such as finite lists and trees are defined via constructors ...
Copatterns: programming infinite structures by observations
POPL '13: Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languagesInductive datatypes provide mechanisms to define finite data such as finite lists and trees via constructors and allow programmers to analyze and manipulate finite data via pattern matching. In this paper, we develop a dual approach for working with ...







Comments