Skip to main content

Relaxed Parsing of Regular Approximations of String-Embedded Languages

  • Conference paper
  • First Online:
Perspectives of System Informatics (PSI 2015)

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    http://php.net/manual/en/mysqli.query.php.

  2. 2.

    https://github.com/YaccConstructor/YaccConstructor.

  3. 3.

    https://www.jetbrains.com/resharper.

References

  1. ISO. ISO/IEC 9075: 1992. Information Technology – Database Languages – SQL (1992)

    Google Scholar 

  2. Houglan, D., Tavistock, A.: Core JSP, p. 416. Upper Saddle River, Prentice Hall PTR (2000)

    Google Scholar 

  3. Scott, E., Johnstone, A.: Right nulled GLR parsers. ACM Trans. Program. Lang. Syst. 28(4), 577–618 (2006)

    Article  MATH  Google Scholar 

  4. Rekers, J.: Parser generation for interactive environments. Ph.D. thesis. University of Amsterdam, 174p (1992)

    Google Scholar 

  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)

    MathSciNet  MATH  Google Scholar 

  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)

    Article  MATH  Google Scholar 

  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. 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)

    Chapter  Google Scholar 

  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. 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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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)

    Chapter  Google Scholar 

  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. Tomita, M.: An efficient all-paths parsing algorithm for natural languages. Carnegie-Mellon University, Department of Computer Science (1984)

    Google Scholar 

  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 

Download references

Acknowledgments

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

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ekaterina Verbitskaia .

Editor information

Editors and Affiliations

A Appendix: RNGLR pseudocode

A Appendix: RNGLR pseudocode

figure c
figure d

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this paper

Cite this paper

Verbitskaia, E., Grigorev, S., Avdyukhin, D. (2016). Relaxed Parsing of Regular Approximations of String-Embedded Languages. In: Mazzara, M., Voronkov, A. (eds) Perspectives of System Informatics. PSI 2015. Lecture Notes in Computer Science(), vol 9609. Springer, Cham. https://doi.org/10.1007/978-3-319-41579-6_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-41579-6_22

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-41578-9

  • Online ISBN: 978-3-319-41579-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics