skip to main content
research-article
Open Access

Linearity in higher-order recursion schemes

Authors Info & Claims
Published:27 December 2017Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

linearityinhigherorder.webm

References

  1. K. Aehlig. 2007. A Finite Semantics of Simply-Typed Lambda Terms for Infinite Runs of Automata. Logical Methods in Computer Science 3, 3 (2007). Google ScholarGoogle ScholarCross RefCross Ref
  2. A. Barber and G. Plotkin. 1996. Dual Intuitionistic Linear Logic. Technical Report LFCS-96-347. LFCS, Division of Informatics, University of Edinburgh.Google ScholarGoogle Scholar
  3. J. Berdine, P. W. O’Hearn, U. S. Reddy, and H. Thielecke. 2002. Linear Continuation-Passing. Higher-Order and Symbolic Computation 15, 2-3 (2002), 181–208. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. C. H. Broadbent, A. Carayol, M. Hague, and O. Serre. 2013. C-SHORe: a collapsible approach to higher-order verification. In Proceedings of ICFP. 13–24. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. C. H. Broadbent, A. Carayol, C.-H. L. Ong, and O. Serre. 2010. Recursion Schemes and Logical Reflection. In Proceedings of LICS. 120–129. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. Carayol and O. Serre. 2012. Collapsible Pushdown Automata and Labeled Recursion Schemes: Equivalence, Safety and Effective Selection. In Proceedings of LICS. 165–174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. W. Damm. 1977. Higher type program schemes and their tree languages. In Theoretical Computer Science, 3rd GI-Conference, Darmstadt, Germany, March 28-30, 1977, Proceedings (Lecture Notes in Computer Science), Vol. 48. Springer, 51–72. Google ScholarGoogle ScholarCross RefCross Ref
  8. J.-Y. Girard. 1987. Linear Logic. Theoretical Computer Science 50 (1987), 1–102. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. C. Grellois. 2016. Semantics of linear logic and higher-order model-checking. Ph.D. Dissertation. Paris Diderot University, France. https://tel.archives- ouvertes.fr/tel- 01311150Google ScholarGoogle Scholar
  10. C. Grellois and P.-A. Melliès. 2015a. Finitary Semantics of Linear Logic and Higher-Order Model-Checking. In Proceedings of MFCS (Lecture Notes in Computer Science), Vol. 9234. Springer, 256–268. Google ScholarGoogle ScholarCross RefCross Ref
  11. C. Grellois and P.-A. Melliès. 2015b. Relational Semantics of Linear Logic and Higher-order Model Checking. In Proceedings of CSL. 260–276.Google ScholarGoogle Scholar
  12. A. Haddad. 2013. Shape-Preserving Transformations of Higher-Order Recursion Schemes. Thèse de Doctorat. Université Paris Diderot - Paris 7.Google ScholarGoogle Scholar
  13. M. Hague, A. S. Murawski, C.-H. L. Ong, and O. Serre. 2008. Collapsible Pushdown Automata and Recursion Schemes. In Proceedings of LICS. Computer Society Press, 452–461. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. M. Hofmann and J. Ledent. 2017. A cartesian-closed category for higher-order model checking. In Proceedings of LICS. 1–12. Google ScholarGoogle ScholarCross RefCross Ref
  15. M. Jurdziński. 2000. Small Progress Measures for Solving Parity Games. In Proceedings of STACS. 290–301. Google ScholarGoogle ScholarCross RefCross Ref
  16. N. Kobayashi. 2009. Types and higher-order recursion schemes for verification of higher-order programs. In Proceedings of POPL. 416–428. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. N. Kobayashi and C.-H. L. Ong. 2009. A Type System Equivalent to the Modal Mu-Calculus Model Checking of Higher-Order Recursion Schemes. In Proceedings of LICS. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. N. Kobayashi and C.-H. L. Ong. 2011. Complexity of Model Checking Recursion Schemes for Fragments of the Modal Mu-Calculus. Logical Methods in Computer Science 7, 4 (2011).Google ScholarGoogle Scholar
  19. N. Kobayashi, R. Sato, and H. Unno. 2011. Predicate abstraction and CEGAR for higher-order model checking. In Proceedings of PLDI. 222–233. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. N. Kobayashi, N. Tabuchi, and H. Unno. 2010. Higher-order multi-parameter tree transducers and recursion schemes for program verification. In Proceedings of POPL. 495–508. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J. Laird. 2005. Game semantics and linear CPS interpretation. Theor. Comput. Sci. 333, 1-2 (2005), 199–224.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. P.-A. Melliès. 2014. Linear logic and higher-order model-checking. Talk at Institut Henri Poincaré, http://www.pps. univ- paris- diderot.fr/~mellies/slides/workshop- IHP- model- checking.pdf .Google ScholarGoogle Scholar
  23. A. Murase, T. Terauchi, N. Kobayashi, R. Sato, and H. Unno. 2016. Temporal verification of higher-order functional programs. In Proceedings of POPL. ACM, 57–68. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. P. Neatherway, S. J. Ramsay, and C.-H. L. Ong. 2012. A traversal-based algorithm for higher-order model checking. In Proceedings of ICFP. 353–364. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Nivat. 1972. On the interpretation of recursive program schemes. In Symposia Matematica.Google ScholarGoogle Scholar
  26. C.-H. L. Ong. 2006. On Model-Checking Trees Generated by Higher-Order Recursion Schemes. In Proceedings of LICS. Computer Society Press, 81–90. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. G. Pottinger. 1981. The Church-Rosser theorem for the typed λ-calculus with surjective pairing. Notre Dame J. Formal Logic 22 (3) (1981), 264–268. Google ScholarGoogle ScholarCross RefCross Ref
  28. S. J. Ramsay, R. P. Neatherway, and C.-H. L. Ong. 2014. A type-directed abstraction refinement approach to higher-order model checking. In Proceedings of POPL. 61–72. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. S. Salvati and I. Walukiewicz. 2015. A Model for Behavioural Properties of Higher-order Programs. In Proceedings of CSL (LIPIcs), Vol. 41. 229–243.Google ScholarGoogle Scholar
  30. S. Salvati and I. Walukiewicz. 2016. Simply typed fixpoint calculus and collapsible pushdown automata. Mathematical Structures in Computer Science 26, 7 (2016), 1304–1350. Google ScholarGoogle ScholarCross RefCross Ref
  31. O. Serre. 2013. Playing with Trees and Logic. Habilitation à Diriger des Recherches. Université Paris Diderot - Paris 7. http://www.liafa.univ- paris- diderot.fr/~serre/papers/HDR.pdfGoogle ScholarGoogle Scholar
  32. R. Statman. 2004. On the lambda Y calculus. Ann. Pure Appl. Logic 130, 1-3 (2004), 325–337.Google ScholarGoogle ScholarCross RefCross Ref
  33. T. Tsukada and N. Kobayashi. 2010. Untyped Recursion Schemes and Infinite Intersection Types. In Proceedings of FOSSACS (Lecture Notes in Computer Science), Vol. 6014. Springer, 343–357. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. T. Tsukada and N. Kobayashi. 2014. Complexity of Model-Checking Call-by-Value Programs. In Proceedings of FOSSACS’14. 180–194. Google ScholarGoogle ScholarCross RefCross Ref

Index Terms

  1. Linearity in higher-order recursion schemes

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!