skip to main content
research-article

A traversal-based algorithm for higher-order model checking

Published:09 September 2012Publication History
Skip Abstract Section

Abstract

Higher-order model checking - the model checking of trees generated by higher-order recursion schemes (HORS) - is a natural generalisation of finite-state and pushdown model checking. Recent work has shown that it can serve as a basis for software model checking for functional languages such as ML and Haskell. In this paper, we introduce higher-order recursion schemes with cases (HORSC), which extend HORS with a definition-by-cases construct (to express program branching based on data) and non-determinism (to express abstractions of behaviours). This paper is a study of the universal HORSC model checking problem for deterministic trivial automata: does the automaton accept every tree in the tree language generated by the given HORSC? We first characterise the model checking problem by an intersection type system extended with a carefully restricted form of union types. We then present an algorithm for deciding the model checking problem, which is based on the notion of traversals induced by the fully abstract game semantics of these schemes, but presented as a goal-directed construction of derivations in the intersection and union type system. We view HORSC model checking as a suitable backend engine for an approach to verifying functional programs. We have implemented the algorithm in a tool called TravMC, and demonstrated its effectiveness on a test suite of programs, including abstract models of functional programs obtained via an abstraction-refinement procedure from pattern-matching recursion schemes.

References

  1. Klaus Aehlig. A finite semantics of simply-typed lambda terms for infinite runs of automata. Logical Methods in Comp. Sci., 3(3), 2007.Google ScholarGoogle Scholar
  2. Thomas Ball, Rupak Majumdar, Todd D. Millstein, and Sriram K. Rajamani. Automatic predicate abstraction of C programs. In PLDI, pages 203--213, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Dirk Beyer, Thomas A. Henzinger, Ranjit Jhala, and Rupak Majumdar. The software model checker blast. STTT, 9(5-6):505--525, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Matthew Hague, Andrzej S. Murawski, C.-H. Luke Ong, and Olivier Serre. Collapsible pushdown automata and recursion schemes. In LICS, pages 452--461, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. J. M. E. Hyland and C.-H. Luke Ong. On full abstraction for PCF: I, II, and III. Inf. Comput., 163(2):285--408, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Teodor Knapik, Damian Niwinski, and Pawel Urzyczyn. Higher-order pushdown trees are easy. In FoSSaCS, pages 205--222, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Naoki Kobayashi. Model-checking higher-order functions. In PPDP, pages 25--36, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Naoki Kobayashi. Types and higher-order recursion schemes for verification of higher-order programs. In POPL, pages 416--428, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Naoki Kobayashi. http://www-kb.is.s.u-tokyo.ac.jp/~koba/trecs/. 2009.Google ScholarGoogle Scholar
  10. Naoki Kobayashi. A practical linear time algorithm for trivial automata model checking of higher-order recursion schemes. In FOSSACS, pages 260--274, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Naoki Kobayashi and C.-H. Luke Ong. Complexity of model checking recursion schemes for fragments of the modal mu-calculus. In ICALP (2), pages 223--234, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Naoki Kobayashi and C.-H. Luke Ong. A type system equivalent to the modal mu-calculus model checking of higher-order recursion schemes. In LICS, pages 179--188, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Naoki Kobayashi, Naoshi Tabuchi, and Hiroshi Unno. Higher-order multi-parameter tree transducers and recursion schemes for program verification. In POPL, pages 495--508, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Neil Mitchell and Colin Runciman. Not all patterns, but enough - an automatic verifier for partial but sufficient pattern matching. In Haskell '08: Proceedings of the first ACM SIGPLAN symposium on Haskell, pages 49--60. ACM, September 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Robin P. Neatherway, C.-H. Luke Ong, and Steven J. Ramsay. A traversal-based algorithm for higher-order model checking. Long version, available from: http://mjolnir.cs.ox.ac.uk/papers/traversal.pdf, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C.-H. Luke Ong. On model-checking trees generated by higherorder recursion schemes. In LICS, pages 81--90, 2006. Long version (55 pp.) http://www.cs.ox.ac.uk/people/luke.ong/personal/publications/ntree.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. C.-H. Luke Ong and Steven J. Ramsay. Verifying functional programs with pattern matching algebraic data types. In POPL, pages 587--598, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Jakob Rehof and Torben Æ. Mogensen. Tractable constraints in finite semilattices. Sci. Comput. Program., 35(2):191--221, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Sylvain Salvati and Igor Walukiewicz. Krivine machines and higher-order schemes. In ICALP (2), pages 162--173, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A traversal-based algorithm for higher-order model checking

              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

              • Published in

                cover image ACM SIGPLAN Notices
                ACM SIGPLAN Notices  Volume 47, Issue 9
                ICFP '12
                September 2012
                368 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/2398856
                Issue’s Table of Contents
                • cover image ACM Conferences
                  ICFP '12: Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
                  September 2012
                  392 pages
                  ISBN:9781450310543
                  DOI:10.1145/2364527

                Copyright © 2012 ACM

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 9 September 2012

                Check for updates

                Qualifiers

                • research-article

              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!