Functional Reachability

What is reachability in higher-order functional programs? We formulate reachability as a decision problem in the setting of the prototypical functional language PCF, and show that even in the recursion-free fragment generated from a finite base type, several versions of the reachability problem are undecidable from order 4 onwards, and several other versions are reducible to each other. We characterise a version of the reachability problem in terms of a new class of tree automata introduced by Stirling at FoSSaCS 2009, called Alternating Dependency Tree Automata (ADTA). As a corollary, we prove that the ADTA non-emptiness problem is undecidable, thus resolving an open problem raised by Stirling. However, by restricting to contexts constructible from a finite set of variable names, we show that the corresponding solution set of a given instance of the reachability problem is regular. Hence the relativised reachability problem is decidable.

[1]  Chris Hankin,et al.  A New Approach to Control Flow Analysis , 1998, CC.

[2]  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).

[3]  William Blum,et al.  The Safe Lambda Calculus , 2007, TLCA.

[4]  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.

[5]  Ralph Loader Finitary PCF is not decidable , 2001, Theor. Comput. Sci..

[6]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[7]  Hubert Comon,et al.  Tree automata techniques and applications , 1997 .

[8]  George C. Necula,et al.  Temporal-Safety Proofs for Systems Code , 2002, CAV.

[9]  William Blum,et al.  Local computation of β-reduction 1 A concrete presentation of Game Semantics 2 , 2008 .

[10]  Robin Milner,et al.  Fully Abstract Models of Typed lambda-Calculi , 1977, Theor. Comput. Sci..

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

[12]  C.-H. Luke Ong,et al.  Complexity of Model Checking Recursion Schemes for Fragments of the Modal Mu-Calculus , 2011, Log. Methods Comput. Sci..

[13]  Paola Giannini,et al.  Type-Based Useless-Code Elimination for Functional Programs , 2000, SAIG.

[14]  K. Sieber Applications of Categories in Computer Science: Reasoning about sequential functions via logical relations , 1992 .

[15]  G.D. Plotkin,et al.  LCF Considered as a Programming Language , 1977, Theor. Comput. Sci..

[16]  C.-H. Luke Ong,et al.  On Full Abstraction for PCF: I, II, and III , 2000, Inf. Comput..

[17]  Naoki Kobayashi Type-based useless variable elimination , 1999, PEPM '00.

[18]  Chris Hankin,et al.  Generalised Flowcharts and Games , 1998, ICALP.

[19]  Sriram K. Rajamani,et al.  The SLAM project: debugging system software via static analysis , 2002, POPL '02.

[20]  Colin Stirling,et al.  Dependency Tree Automata , 2009, FoSSaCS.

[21]  Matthias Felleisen,et al.  Fully Abstract Semantics for Observably Sequential Languages , 1994, Inf. Comput..