The word problem for visibly pushdown languages described by grammars

  • Salvatore La Torre
  • Margherita Napoli
  • Mimmo Parente


Visibly pushdown languages are an interesting subclass of deterministic context-free languages that can model nonregular properties of interest in program analysis. Such class properly contains typical classes of parenthesized languages such as “parenthesis”, “bracketed”, “balanced” and “input-driven” languages. It is closed under boolean operations and has decidable decision problems such as emptiness, inclusion and universality. We study the membership problem for visibly pushdown languages, and show that it can be solved in time linear in both the size of the input grammar and the length of the input word. The algorithm relies on a reduction to the reachability problem for game graphs. We also discuss the time complexity of the membership problem for the class of balanced languages which is the largest among those cited above. Besides the intrinsic theoretical interest, we further motivate our main result showing an application to the validation of XML documents against Schema and Document Type Definitions (DTDs).


Visibly pushdown grammars Verification XML 


  1. 1.
    Aho A, Ullman J (1973) The theory of parsing, translation and compiling, vol I. Prentice-Hall, Englewood Cliffs Google Scholar
  2. 2.
    Alur R, Benedikt M, Etessami K, Godefroid P, Reps TW, Yannakakis M (2005) Analysis of recursive state machines. ACM Trans Program Lang Syst 27(4):786–818 CrossRefGoogle Scholar
  3. 3.
    Alur R, Kumkar V, Madhusudan P, Viswanathan M (2005) Congruences for visibly pushdown languages. In: Proceedings of the 32nd international colloquium of automata, languages and programming (ICALP’05). Lecture notes in computer science, vol 3580. Springer, Berlin, pp 1102–1114 Google Scholar
  4. 4.
    Alur R, Madhusudan P (2004) Visibly pushdown languages. A preliminary version appears in: Proceedings of the 36th ACM symposium on theory of computing (STOC’04), pp 201–211
  5. 5.
    Brggemann-Klein A (1993) Regular expression into finite automaton. Theor Comput Sci 120(2):197–213 CrossRefGoogle Scholar
  6. 6.
    Ball T, Rajamani S (2000) Bebop: a symbolic model checker for boolean programs. In: Proceedings of the 7th international workshop on model checking of software (SPIN 2000). Lecture notes in computer science, vol 1885. Springer, Berlin, pp 113–130 Google Scholar
  7. 7.
    Berstel J, Boasson L (2002) Balanced grammars and their languages. In: Formal & natural computing: essay dedicated to Grzegorz Rozenberg. Lecture notes in computer science, vol 2300. Springer, Berlin, pp 3–25 Google Scholar
  8. 8.
    Berstel J, Boasson L (2002) Formal properties of XML grammars and languages. Acta Inform 38:649–671 MATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Bouajjani A, Esparza J, Maler O (1997) Reachability analysis of pushdown automata: application to model-checking. In: Proceedings of the 8th international conference on concurrency theory (CONCUR’97). Lecture notes in computer science, vol 1243. Springer, Berlin, pp 135–150 Google Scholar
  10. 10.
    Burkart O, Steffen B (1992) Model checking for context-free processes. In: Proceedings of the 3rd international conference on concurrency theory (CONCUR’92). Lecture notes in computer science, vol 620. Springer, Berlin, pp 123–137 Google Scholar
  11. 11.
    Dymond PW (1988) Input-driven languages are recognized in log n space. Inf Process Lett 26:2472250 MathSciNetGoogle Scholar
  12. 12.
    Esparza J, Kucera A, Schwoon S (2003) Model checking LTL with regular valuations for pushdown systems. Inform Comput 186(2):355–376 MATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Glushkov VM (1961) The abstract theory of automata. Russ Math Surv 16:1–53 CrossRefGoogle Scholar
  14. 14.
    Ginsburg S, Harrison MA (1967) Bracketed context-free languages. J Comput Syst Sci 1:1–23 MATHMathSciNetGoogle Scholar
  15. 15.
    Henzinger TA, Jhala R, Majumdar R, Necula GC, Sutre G, Weimer W (2002) Temporal-safety proofs for systems code. In: Proceedings of the 14th international conference on computer-aided verification (CAV 2002). Lecture notes in computer science, vol 2404. Springer, Berlin, pp 526–538 CrossRefGoogle Scholar
  16. 16.
    Hopcroft JE, Motwani R, Ullman JD (2001) Introduction to automata theory, languages, and computation. Addison–Wesley, Reading MATHGoogle Scholar
  17. 17.
    Knuth DE (1967) A characterization of parenthesis languages. Inf Control 11(3):269–289 MATHCrossRefGoogle Scholar
  18. 18.
    Kumkar V, Madhusudan P, Viswanathan M (2006) Visibly pushdown languages for XML. Technical Report UIUCDCS-R-2006-2704, UIUC Google Scholar
  19. 19.
    Lynch N (1977) Log space recognition and translation of parenthesis languages. J ACM 24(4):583–590 MATHCrossRefMathSciNetGoogle Scholar
  20. 20.
    McNaughton R (1967) Parenthesis grammars. J ACM 14(3):490–500 MATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    McNaughton R, Yamada H (1960) Regular expressions and state graphs for automata. IRE Trans Electron Comput 9:39–47 CrossRefGoogle Scholar
  22. 22.
    Mehlhorn K (1980) Pebbling mountain ranges and its application of DCFL-recognition. In: Proceeding of the 7th international colloquium of automata, languages and programming (ICALP’80). Lecture notes in computer science, vol 85. Springer, Berlin, pp 422–435 Google Scholar
  23. 23.
    Reps TW, Horowitz S, Sagiv S (1995) Precise interprocedural dataflow analysis via graph reachability. In: Proceeding of the 22nd symposium on principles of programming languages (POPL’95), pp 49–61 Google Scholar
  24. 24.
    Thomas W (1995) On the synthesis of strategies in infinite games. In: 12th annual symposium on theoretical aspects of computer science (STACS’95). Lecture notes in computer science, vol 900. Springer, Berlin, pp 1–13 Google Scholar
  25. 25.
    von Braunmhl B, Verbeek R (1983) Input-driven languages are recognized in log n space. In: Proceeding of FCT. Lecture notes in computer science, vol 158. Springer, Berlin, p 4051 Google Scholar
  26. 26.
    W3C recommendation (2000) Extensible markup language (XML) 1.0, 2nd edn. Accessed 6 October 2000
  27. 27.
    W3C recommendation (2001) XML schema part 0,1 and 2.,1,2. Accessed 2 May 2001

Copyright information

© Springer Science+Business Media, LLC 2007

Authors and Affiliations

  • Salvatore La Torre
    • 1
  • Margherita Napoli
    • 1
  • Mimmo Parente
    • 1
  1. 1.Dipartimento di Informatica ed ApplicazioniUniversità degli Studi di SalernoFiscianoItaly

Personalised recommendations