Abstract Parsing: Static Analysis of Dynamically Generated String Output Using LR-Parsing Technology
- Cite this paper as:
- Doh KG., Kim H., Schmidt D.A. (2009) Abstract Parsing: Static Analysis of Dynamically Generated String Output Using LR-Parsing Technology. In: Palsberg J., Su Z. (eds) Static Analysis. SAS 2009. Lecture Notes in Computer Science, vol 5673. Springer, Berlin, Heidelberg
We combine LR(k)-parsing technology and data-flow analysis to analyze, in advance of execution, the documents generated dynamically by a program. Based on the document language’s context-free reference grammar and the program’s control structure, the analysis predicts how the documents will be generated and parses the predicted documents. Our strategy remembers context-free structure by computing abstract LR-parse stacks. The technique is implemented in Objective Caml and has statically validated a suite of PHP programs that dynamically generate HTML documents.
Unable to display preview. Download preview PDF.