Abstract

Higher-order recursion schemes (HORS) have recently emerged as a promising foundation for higher-order program verification. We examine the impact of enriching HORS with linear types. To that end, we introduce two frameworks that blend non-linear and linear types: a variant of the λY -calculus and an extension of HORS, called linear HORS (LHORS). First we prove that the two formalisms are equivalent and there exist polynomial-time translations between them. Then, in order to support model-checking of (trees generated by) LHORS, we propose a refined version of alternating parity tree automata, called LNAPTA, whose behaviour depends on information about linearity. We show that the complexity of LNAPTA model-checking for LHORS depends on two type-theoretic parameters: linear order and linear depth. The former is in general smaller than the standard notion of order and ignores linear function spaces. In contrast, the latter measures the depth of linear clusters inside a type. Our main result states that LNAPTA model-checking of LHORS of linear order n is n-EXPTIME-complete, when linear depth is fixed. This generalizes and improves upon the classic result of Ong, which relies on the standard notion of order. To illustrate the significance of the result, we consider two applications: the MSO model-checking problem on variants of HORS with case distinction (RSFD and HORSC) on a finite domain and a call-by-value resource verification problem. In both cases, decidability can be established by translation into HORS, but the implied complexity bounds will be suboptimal due to increases in type order. In contrast, we show that the complexity bounds derived by translations into LHORS and appealing to our result are optimal in that they match the respective hardness results.

Highlights

  • Higher-order recursion schemes (HORS) are typed grammars that generate potentially infinite ranked trees

  • In order to support model-checking of linear higher-order recursion schemes (LHORS), we propose a refined version of alternating parity tree automata, called linear alternating parity automaton (LNAPTA), whose behaviour depends on information about linearity

  • We show that the complexity of LNAPTA model-checking for LHORS depends on two type-theoretic parameters: linear order and linear depth

Read more

Summary

INTRODUCTION

Higher-order recursion schemes (HORS) are typed grammars that generate potentially infinite ranked trees. In this paper we introduce linear higher-order recursion schemes (LHORS) that facilitate a more refined type-theoretic analysis and, make it possible to derive more accurate complexity bounds. As applications of the new result, we first revisit two other formalisms used in higher-order model-checking: recursive schemes over finite data domains (RSFD) [Kobayashi et al 2010] and higher-order recursion schemes with cases (HORSC) [Neatherway et al 2012] In both cases, we show how one can translate the associated terms into LHORS in such a way that the linear order will be unaffected by the translation, even though the standard type-theoretic order would. (1) our results subsume the original ones on HORS for non-linear types, (2) they provide much more accurate complexity-theoretic bounds than any earlier work, (3) many existing results can be unified and extended by translating into the framework. We define notions of reduction on λlY - b ⟨c (c (c (d (d (d e))))), terms, and explain how to use them to generate infinite trees b ⟨c (c (c (c ⊥))), ⊥⟩⟩⟩⟩ represented in an analogous way

Reduction and Böhm Trees
AN ALTERNATIVE
Definition of LHORS
Equivalence of λlY and LHORS
Linear-Nonlinear Alternating Parity Tree Automata
Complexity Analysis
IMMEDIATE CONSEQUENCES
Recursion Schemes Over Finite Data Domains
Higher-Order Recursion Schemes with Cases
Kinding of Terminals
CALL-BY-VALUE PROGRAMS
A Call-By-Value Language
Linear CPS Translation
FURTHER DIRECTIONS
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call