Untyped Recursion Schemes and Infinite Intersection Types

A new framework for higher-order program verification has been recently proposed, in which higher-order functional programs are modelled as higher-order recursion schemes and then model-checked. As recursion schemes are essentially terms of the simply-typed lambda-calculus with recursion and tree constructors, however, it was not clear how the new framework applies to programs written in languages with more advanced type systems. To circumvent the limitation, this paper introduces an untyped version of recursion schemes and develops an infinite intersection type system that is equivalent to the model checking of untyped recursion schemes, so that the model checking can be reduced to type checking as in recent work by Kobayashi and Ong for typed recursion schemes. The type system is undecidable but we can obtain decidable subsets of the type system by restricting the shapes of intersection types, yielding a sound (but incomplete in general) model checking algorithm.

[1]  C.-H. Luke Ong,et al.  On Model-Checking Trees Generated by Higher-Order Recursion Schemes , 2006, 21st Annual IEEE Symposium on Logic in Computer Science (LICS'06).

[2]  Robin Milner,et al.  Theories for the Global Ubiquitous Computer , 2004, FoSSaCS.

[3]  Naoki Kobayashi Model-checking higher-order functions , 2009, PPDP '09.

[4]  Makoto Tatsuta,et al.  Types for Hereditary Head Normalizing Terms , 2008, FLOPS.

[5]  Alexander Aiken,et al.  On Typability for Rank-2 Intersection Types with Polymorphic Recursion , 2006, 21st Annual IEEE Symposium on Logic in Computer Science (LICS'06).

[6]  Assaf J. Kfoury,et al.  Programming Examples Needing Polymorphic Recursion , 2005, ITRS.

[7]  Mariangiola Dezani-Ciancaglini,et al.  Infinite lambda-Calculus and Types , 1999, Theor. Comput. Sci..

[8]  Marcello M. Bonsangue,et al.  Infinite intersection types , 2003, Inf. Comput..

[9]  Sam Lindley,et al.  Extensional Rewriting with Sums , 2007, TLCA.

[10]  Makoto Tatsuta,et al.  Types for Hereditary Permutators , 2008, 2008 23rd Annual IEEE Symposium on Logic in Computer Science.

[11]  C.-H. Luke Ong,et al.  A Type System Equivalent to the Modal Mu-Calculus Model Checking of Higher-Order Recursion Schemes , 2009, 2009 24th Annual IEEE Symposium on Logic In Computer Science.

[12]  Daniel Leivant Discrete polymorphism , 1990, LISP and Functional Programming.

[13]  Steffen van Bakel,et al.  Intersection Type Assignment Systems , 1995, Theor. Comput. Sci..

[14]  Naoki Kobayashi Types and higher-order recursion schemes for verification of higher-order programs , 2009, POPL '09.

[15]  Klaus Aehlig,et al.  The Monadic Second Order Theory of Trees Given by Arbitrary Level-Two Recursion Schemes Is Decidable , 2005, TLCA.

[16]  Pawel Urzyczyn,et al.  Higher-Order Pushdown Trees Are Easy , 2002, FoSSaCS.

[17]  Pawel Urzyczyn,et al.  Deciding Monadic Theories of Hyperalgebraic Trees , 2001, TLCA.

[18]  Naoki Kobayashi,et al.  Higher-order multi-parameter tree transducers and recursion schemes for program verification , 2010, POPL '10.