Verification of Tree-Processing Programs via Higher-Order Model Checking

  • Hiroshi Unno
  • Naoshi Tabuchi
  • Naoki Kobayashi
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6461)


We propose a new method to verify that a higher-order, tree-processing functional program conforms to an input/output specification. Our method reduces the verification problem to multiple verification problems for higher-order multi-tree transducers, which are then transformed into higher-order recursion schemes and model-checked. Unlike previous methods, our new method can deal with arbitrary higher-order functional programs manipulating algebraic data structures, as long as certain invariants on intermediate data structures are provided by a programmer. We have proved the soundness of the method and implemented a prototype verifier.


Model Check Functional Program Input Tree Tree Automaton Recursion Scheme 
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., de Miranda, J.G., Ong, C.H.L.: The monadic second order theory of trees given by arbitrary level-two recursion schemes is decidable. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 39–54. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  2. 2.
    Benzaken, V., Castagna, G., Frisch, A.: CDuce: an XML-centric general-purpose language. In: ICFP 2003, pp. 51–63. ACM, New York (2003)Google Scholar
  3. 3.
    Christensen, A.S., Møller, A., Schwartzbach, M.I.: Precise analysis of string expressions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 1–18. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  4. 4.
    Davies, R.: Practical refinement-type checking. Ph.D. thesis, Carnegie Mellon University, chair-Pfenning, Frank (2005)Google Scholar
  5. 5.
    Engelfriet, J., Vogler, H.: Macro tree transducers. Journal of Computer and System Sciences 31(1), 71–146 (1985)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Engelfriet, J., Vogler, H.: High level tree transducers and iterated pushdown tree transducers. Acta Informatica 26(1/2), 131–192 (1988)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Freeman, T., Pfenning, F.: Refinement types for ML. In: PLDI 1991, pp. 268–277. ACM, New York (1991)Google Scholar
  8. 8.
    Hosoya, H., Frisch, A., Castagna, G.: Parametric polymorphism for XML. ACM Transactions on Programming Languages and Systems 32(1), 1–56 (2009)CrossRefzbMATHGoogle Scholar
  9. 9.
    Hosoya, H., Pierce, B.C.: XDuce: A statically typed XML processing language. ACM Transactions on Internet Technology 3(2), 117–148 (2003)CrossRefGoogle Scholar
  10. 10.
    Hosoya, H., Vouillon, J., Pierce, B.C.: Regular expression types for XML. In: ICFP 2000, pp. 11–22. ACM, New York (2000)Google Scholar
  11. 11.
    Knapik, T., Niwinski, 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)CrossRefGoogle Scholar
  12. 12.
    Kobayashi, N.: Model-checking higher-order functions. In: PPDP 2009, pp. 25–36. ACM, New York (2009)Google Scholar
  13. 13.
    Kobayashi, N.: Types and higher-order recursion schemes for verification of higher-order programs. In: POPL 2009, pp. 416–428. ACM, New York (2009)Google Scholar
  14. 14.
    Kobayashi, N., Ong, C.-H.L.: A type system equivalent to the modal mu-calculus model checking of higher-order recursion schemes. In: LICS 2009, pp. 179–188. IEEE, Los Alamitos (2009)Google Scholar
  15. 15.
    Kobayashi, N., Tabuchi, N., Unno, H.: Higher-order multi-parameter tree transducers and recursion schemes for program verification. In: POPL 2010, pp. 495–508. ACM, New York (2010)Google Scholar
  16. 16.
    Kobayashi, N., Tabuchi, N., Unno, H.: Higher-order multi-parameter tree transducers and recursion schemes for program verification. An extended version (2010),
  17. 17.
    Maneth, S., Berlea, A., Perst, T., Seidl, H.: XML type checking with macro tree transducers. In: PODS 2005, pp. 283–294. ACM, New York (2005)Google Scholar
  18. 18.
    Milo, T., Suciu, D., Vianu, V.: Typechecking for XML transformers. Journal of Computer and System Sciences 66(1), 66–97 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  19. 19.
    Minamide, Y.: Static approximation of dynamically generated web pages. In: WWW 2005, pp. 432–441. ACM, New York (2005)Google Scholar
  20. 20.
    Ong, C.-H.L.: On model-checking trees generated by higher-order recursion schemes. In: LICS 2006, pp. 81–90. IEEE, Los Alamitos (2006)Google Scholar
  21. 21.
    Schmidt, A., Waas, F., Kersten, M., Carey, M.J., Manolescu, I., Busse, R.: XMark: a benchmark for XML data management. In: VLDB 2002, pp. 974–985. VLDB Endowment (2002)Google Scholar
  22. 22.
    Tozawa, A.: XML type checking using high-level tree transducer. In: Hagiya, M., Wadler, P. (eds.) FLOPS 2006. LNCS, vol. 3945, pp. 81–96. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  23. 23.
    Unno, H., Tabuchi, N., Kobayashi, N.: Verification of tree-processing programs via higher-order model checking. An extended version (2010),

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Hiroshi Unno
    • 1
  • Naoshi Tabuchi
    • 1
  • Naoki Kobayashi
    • 1
  1. 1.Tohoku UniversityJapan

Personalised recommendations