A ZDD-Based Efficient Higher-Order Model Checking Algorithm

  • Taku Terao
  • Naoki Kobayashi
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8858)


The model checking of higher-order recursion schemes, aka. higher-order model checking, has recently been applied to automated verification of higher-order programs. Despite its extremely high worst-case complexity, practical algorithms have been developed that work well for typical inputs that arise in program verification. Even the state-of-the-art algorithms are, however, not scalable enough for verification of thousands or millions of lines of programs. We, therefore, propose a new higher-order model checking algorithm. It is based on Broadbent and Kobayashi’s type and saturation-based algorithm HorSat, but we make two significant modifications. First, unlike HorSat, we collect flow information (which is necessary for optimization) in linear time by using a sub-transitive flow graph. Thanks to this, the resulting algorithm runs in almost linear time under a fixed-parameter assumption. Secondly, we employ zero-suppressed binary decision diagrams to efficiently represent and propagate type information. We have confirmed through experiments that the new algorithm is more scalable for several families of inputs than the state-of-the-art higher-order model checkers HorSat and Preface.


Model Check Linear Time Intersection Type Type Environment Practical Algorithm 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aehlig, K.: A finite semantics of simply-typed lambda terms for infinite runs of automata. Logical Methods in Computer Science 3(3) (2007)Google Scholar
  2. 2.
    Broadbent, C.H., Carayol, A., Hague, M., Serre, O.: C-SHORe: A collapsible approach to higher-order verification. In: Proceedings of ICFP 2013, pp. 13–24 (2013)Google Scholar
  3. 3.
    Broadbent, C.H., Kobayashi, N.: Saturation-based model checking of higher-order recursion schemes. In: Proceedings of CSL 2013. LIPIcs, vol. 23, pp. 129–148 (2013)Google Scholar
  4. 4.
    Fujima, K., Ito, S., Kobayashi, N.: Practical alternating parity tree automata model checking of higher-order recursion schemes. In: Shan, C.-C. (ed.) APLAS 2013. LNCS, vol. 8301, pp. 17–32. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  5. 5.
    Heintze, N., McAllester, D.A.: Linear-time subtransitive control flow analysis. In: Proceedings of PLDI 1997, pp. 261–272 (1997)Google Scholar
  6. 6.
    Knapik, T., Niwiński, D., Urzyczyn, P.: Higher-order pushdown trees are easy. In: Nielsen, M., Engberg, U. (eds.) Fossacs 2002. LNCS, vol. 2303, pp. 205–222. Springer, Heidelberg (2002)Google Scholar
  7. 7.
    Kobayashi, N.: Model-checking higher-order functions. In: Proceedings of PPDP 2009, pp. 25–36. ACM Press (2009)Google Scholar
  8. 8.
    Kobayashi, N.: A practical linear time algorithm for trivial automata model checking of higher-order recursion schemes. In: Hofmann, M. (ed.) FOSSACS 2011. LNCS, vol. 6604, pp. 260–274. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  9. 9.
    Kobayashi, N.: Model checking higher-order programs. Journal of the ACM 60(3) (2013)Google Scholar
  10. 10.
    Kobayashi, N., Ong, C.-H.L.: A type system equivalent to the modal mu-calculus model checking of higher-order recursion schemes. In: Proceedings of LICS 2009, pp. 179–188. IEEE Computer Society Press (2009)Google Scholar
  11. 11.
    Kobayashi, N., Ong, C.-H.L.: Complexity of model checking recursion schemes for fragments of the modal mu-calculus. Logical Methods in Computer Science 7(4) (2011)Google Scholar
  12. 12.
    Kobayashi, N., Sato, R., Unno, H.: Predicate abstraction and CEGAR for higher-order model checking. In: Proceedings of PLDI 2011, pp. 222–233. ACM Press (2011)Google Scholar
  13. 13.
    Kobayashi, N., Tabuchi, N., Unno, H.: Higher-order multi-parameter tree transducers and recursion schemes for program verification. In: Proceedings of POPL 2010, pp. 495–508. ACM Press (2010)Google Scholar
  14. 14.
    Kuwahara, T., Terauchi, T., Unno, H., Kobayashi, N.: Automatic termination verification for higher-order functional programs. In: Shao, Z. (ed.) ESOP 2014. LNCS, vol. 8410, pp. 392–411. Springer, Heidelberg (2014)Google Scholar
  15. 15.
    Lester, M.M., Neatherway, R.P., Ong, C.-H.L., Ramsay, S.J.: Model checking liveness properties of higher-order functional programs. In: Proceedings of ML Workshop 2011 (2011)Google Scholar
  16. 16.
    Midtgaard, J., Horn, D.V.: Subcubic control flow analysis algorithms. Higher-Order and Symbolic ComputationGoogle Scholar
  17. 17.
    Minato, S.: Zero-suppressed bdds for set manipulation in combinatorial problems. In: Proceedings of DAC 1993, pp. 272–277 (1993)Google Scholar
  18. 18.
    Neatherway, R.P., Ramsay, S.J., Ong, C.-H.L.: A traversal-based algorithm for higher-order model checking. In: ACM SIGPLAN International Conference on Functional Programming (ICFP 2012), pp. 353–364 (2012)Google Scholar
  19. 19.
    Ong, C.-H.L.: On model-checking trees generated by higher-order recursion schemes. In: Proceedings of LICS 2006, pp. 81–90. IEEE Computer Society Press (2006)Google Scholar
  20. 20.
    Ong, C.-H.L., Ramsay, S.: Verifying higher-order programs with pattern-matching algebraic data types. In: Proceedings of POPL 2011, pp. 587–598. ACM Press (2011)Google Scholar
  21. 21.
    Ramsay, S., Neatherway, R., Ong, C.-H.L.: An abstraction refinement approach to higher-order model checking. In: Proceedings of POPL 2014 (2014)Google Scholar
  22. 22.
    Rehof, J., Mogensen, T.: Tractable constraints in finite semilattices. Science of Computer Programming 35(2), 191–221 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    Shivers, O.: Control-Flow Analysis of Higher-Order Languages. Ph.D. thesis, Carnegie-Mellon University (May 1991)Google Scholar
  24. 24.
    Tobita, Y., Tsukada, T., Kobayashi, N.: Exact flow analysis by higher-order model checking. In: Schrijvers, T., Thiemann, P. (eds.) FLOPS 2012. LNCS, vol. 7294, pp. 275–289. Springer, Heidelberg (2012)CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Taku Terao
    • 1
  • Naoki Kobayashi
    • 1
  1. 1.The University of TokyoJapan

Personalised recommendations