Relaxed Parsing of Regular Approximations of String-Embedded Languages

  • Ekaterina Verbitskaia
  • Semyon Grigorev
  • Dmitry Avdyukhin
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9609)

Abstract

We present a technique for syntax analysis of a regular set of input strings. This problem is relevant for the analysis of string-embedded languages when a host program generates clauses of embedded language at run time. Our technique is based on a generalization of RNGLR algorithm, which, inherently, allows us to construct a finite representation of parse forest for regularly approximated set of input strings. This representation can be further utilized for semantic analysis and transformations in the context of reengineering, code maintenance, program understanding etc. The approach in question implements relaxed parsing: non-recognized strings in approximation set are ignored with no error detection.

Keywords

String-embedded languages String analysis Parsing Parser generator RNGLR 

Notes

Acknowledgments

We thank Dmitri Boulytchev for the scientific guidance and the feedback on this work.

References

  1. 1.
    ISO. ISO/IEC 9075: 1992. Information Technology – Database Languages – SQL (1992)Google Scholar
  2. 2.
    Houglan, D., Tavistock, A.: Core JSP, p. 416. Upper Saddle River, Prentice Hall PTR (2000)Google Scholar
  3. 3.
    Scott, E., Johnstone, A.: Right nulled GLR parsers. ACM Trans. Program. Lang. Syst. 28(4), 577–618 (2006)CrossRefMATHGoogle Scholar
  4. 4.
    Rekers, J.: Parser generation for interactive environments. Ph.D. thesis. University of Amsterdam, 174p (1992)Google Scholar
  5. 5.
    Asveld, P.R.J., Nijholt, A.: The inclusion problem for some subclasses of context-free languages. Theor. Comput. Sci. 230(1–2), 247–256 (1999)MathSciNetMATHGoogle Scholar
  6. 6.
    Fang, Y., Alkhalaf, M., Bultan, T., Ibarra, O.H.: Automata-based symbolic string analysis for vulnerability detection. Formal Methods Syst. Des. 44(1), 44–70 (2014)CrossRefMATHGoogle Scholar
  7. 7.
    Christensen, A.S., Møller, A., Schwartzbach, M.I.: Precise analysis of string expressions. In: Proceedings of the 10th International Conference on Static Analysis, pp. 1–18 (2003)Google Scholar
  8. 8.
    Annamaa, A., Breslav, A., Kabanov, J., Vene, V.: An interactive tool for analyzing embedded SQL queries. In: Ueda, K. (ed.) APLAS 2010. LNCS, vol. 6461, pp. 131–138. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  9. 9.
    Annamaa, A., Breslav, A., Vene, V.: Using abstract lexical analysis and parsing to detect errors in string-embedded DSL statements. In: Proceedings of the 22nd Nordic Workshop on Programming Theory, pp. 20–22 (2010)Google Scholar
  10. 10.
    Doh, K.-G., Kim, H., Schmidt, D.A.: Abstract parsing: static analysis of dynamically generated string output using LR-parsing technology. In: Palsberg, J., Su, Z. (eds.) SAS 2009. LNCS, vol. 5673, pp. 256–272. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  11. 11.
    Doh, K.-G., Kim, H., Schmidt, D.A.: Abstract LR-parsing. In: Agha, G., Danvy, O., Meseguer, J. (eds.) Formal Modeling: Actors, Open Systems, Biological Systems. LNCS, vol. 7000, pp. 90–109. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  12. 12.
    Kim, H., Doh, K.-G., Schmidt, D.A.: Static validation of dynamically generated HTML documents based on abstract parsing and semantic processing. In: Logozzo, F., Fähndrich, M. (eds.) Static Analysis. LNCS, vol. 7935, pp. 194–214. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  13. 13.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of the 4th Symposium on Principles of Programming Languages, pp. 238–252 (1977)Google Scholar
  14. 14.
    Tomita, M.: An efficient all-paths parsing algorithm for natural languages. Carnegie-Mellon University, Department of Computer Science (1984)Google Scholar
  15. 15.
    Grigorev, S., Verbitskaia, E., Ivanov, A., Polubelova, M., Mavchun, E.: String-embedded language support in integrated development environment. In: Proceedings of the 10th Central and Eastern European Software Engineering Conference in Russia, pp. 21:1–21:11 (2014)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Ekaterina Verbitskaia
    • 1
  • Semyon Grigorev
    • 1
  • Dmitry Avdyukhin
    • 1
  1. 1.Saint Petersburg State UniversitySaint PetersburgRussia

Personalised recommendations