skip to main content
10.1145/1621607.1621625acmconferencesArticle/Chapter ViewAbstractPublication PagesgpceConference Proceedingsconference-collections
research-article

Abstract parsing for two-staged languages with concatenation

Published:04 October 2009Publication History

ABSTRACT

This article, based on Doh, Kim, and Schmidt's "abstract parsing" technique, presents an abstract interpretation for statically checking the syntax of generated code in two-staged programs. Abstract parsing is a static analysis technique for checking the syntax of generated strings. We adopt this technique for two-staged programming languages and formulate it in the abstract interpretation framework. We parameterize our analysis with the abstract domain so that one can choose the abstract domain as long as it satisfies the condition we provide. We also present an instance of the abstract domain, namely an abstract parse stack and its widening with k-cutting.

References

  1. Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman. Compilers: Principles, Techniques, and Tools. Addison-Wesley, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. Ancona and E. Moggi. A fresh calculus for name management. In Proceedings of the International Conference on Generative Programming and Component Engineering, October 2004.Google ScholarGoogle ScholarCross RefCross Ref
  3. Jeroen Arnoldus, Jeanot Bijpost, and Mark van den Brand. Repleo: a syntax-safe template engine. In Proceedings of the International Conference on Generative Programming and Component Engineering, pages 25--32, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Cristiano Calcagno, Eugenio Moggi, and Tim Sheard. Closed types for a safe imperative MetaML. Journal of Functional Programming, 13(3), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Cristiano Calcagno, Eugenio Moggi, and Walid Taha. ML-like inference for classifiers. In Proceedings of the European Symposium on Programming, pages 79--93. Springer, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  6. Chiyan Chen and Hongwei Xi. Meta-programming through typeful code representation. In ACM International Conference on Functional Programming, pages 275--286. ACM, August 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Tae-Hyoung Choi, Oukseh Lee, Hyunha Kim, and Kyung-Goo Doh. A practical string analyzer by the widening approach. In Proceedings of the Asian Symposium on Programming Languages and Systems, volume 4729 of Lecture Notes in Computer Science, pages 374--388, Sydney, Austrailia, November 2006. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Aske Simon Christensen, Anders Mller, and Michael I. Schwartzbach. Precise analysis of string expressions. In Proceedings of the Static Analysis Symposium, pages 1--18. Springer-Verlag, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Mihai Christodorescu, Nicholas Kidd, and Wen-Han Goh. String analysis for x86 binaries. In Proceedings of the ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 88--95, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. P. Cousot and R. Cousot. Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 238--252, Los Angeles, California, 1977. ACM Press, New York, NY. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Cousot and R. Cousot. Systematic design of program analysis frameworks. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 269--282, San Antonio, Texas, 1979. ACM Press, New York, NY. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Cousot and R. Cousot. Abstract interpretation frameworks. Journal of Logic and Computation, 2(4):511--547, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  13. Rowan Davies. A temporal-logic approach to binding-time analysis. In Proceedings of the Symposium on Logic in Computer Science, pages 184--195. IEEE Computer Society Press, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Rowan Davies and Frank Pfenning. A modal analysis of staged computation. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 258--270. ACM, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Rowan Davies and Frank Pfenning. A modal analysis of staged computation. Journal of the ACM, 48(3):555--604, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Kyung-Goo Doh, Hyunha Kim, and David Schmidt. Abstract parsing: static analysis of dynamically generated string out-put using LR-parsing technology. In Proceeeding of the International Static Analysis Symposium, 2009. Available from http://santos.cis.ksu.edu/schmidt/dohsas09.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Dawson R. Engler, Wilson C. Hsieh, and M. Frans Kaashoek. 'C: a language for high-level, efficient, and machine-independent dynamic code generation. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 131--144, New York, NY, USA, 1996. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Ik-Soon Kim, Kwangkeun Yi, and Cristiano Calcagno. A poly-morphic modal type system for lisp-like multi-staged languages. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 257--269, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Yasuhiko Minamide. Static approximation of dynamically generated web pages. In Proceedings of the International Conference on World Wide Web, pages 432--441, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Yasuhiko Minamide and Akihiko Tozawa. Xml validation for context-free grammars. In Proceedings of the Asian Symposium on Programming Languages and Systems, pages 357--373. Springer-Verlag, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Aleksandar Nanevski. Meta-programming with names and necessity. In ACM International Conference on Functional Programming, pages 206--217. ACM, October 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Aleksandar Nanevski and Frank Pfenning. Staged computation with names and necessity. Journal of Functional Programming, 15(6):893--939, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Morten Rhiger. First-class open and closed code fragments. In Proceedings of the Symposium on Trends in Functional Programming, September 2005.Google ScholarGoogle Scholar
  24. Tim Sheard. Accomplishments and research challenges in meta-programming. In Proceedings of the International Workshop on Semantics, Applications, and Implementation of Program Generation, pages 2--44, London, UK, 2001. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Walid Taha and Michael Florentin Nielsen. Environment classifiers. In Proceedings of The ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Gary Wassermann, Carl Gould, Zhendong Su, and Premkumar Devanbu. Static checking of dynamically generated queries in database applications. ACM Transactions on Software Engineering and Methodology, 16(4):14, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Gary Wassermann and Zhendong Su. Sound and precise analysis of web applications for injection vulnerabilities. In Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation, pages 32--41, New York, NY, USA, 2007. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Abstract parsing for two-staged languages with concatenation

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        GPCE '09: Proceedings of the eighth international conference on Generative programming and component engineering
        October 2009
        194 pages
        ISBN:9781605584942
        DOI:10.1145/1621607
        • General Chair:
        • Jeremy Siek,
        • Program Chair:
        • Bernd Fischer
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 45, Issue 2
          GPCE '09
          February 2010
          182 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1837852
          Issue’s Table of Contents

        Copyright © 2009 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 4 October 2009

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        GPCE '09 Paper Acceptance Rate18of62submissions,29%Overall Acceptance Rate56of180submissions,31%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!