Extensible intraprocedural flow analysis at the abstract syntax tree level

  • Authors:
  • Emma SöDerberg;TorbjöRn Ekman;GöRel Hedin;Eva Magnusson

  • Affiliations:
  • Department of Computer Science, Lund University, Lund, Sweden;Semmle Limited, Oxford, United Kingdom;Department of Computer Science, Lund University, Lund, Sweden;Department of Computer Science, Lund University, Lund, Sweden

  • Venue:
  • Science of Computer Programming
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

We have developed a new approach for implementing precise intraprocedural control-flow and dataflow analyses at the abstract syntax tree level. Our approach is declarative, making use of reference attribute grammars augmented with circular attributes and collection attributes. This results in concise executable specifications of the analyses, allowing extensions both to the language and with further source code analyses. To evaluate the new approach, we have implemented control flow, dataflow and dead assignment analyses for Java, by extending the JastAdd Extensible Java Compiler. We have compared our results to several well-known analysis frameworks and tools, using a set of Java programs as benchmarks. These results show that our approach performs well concerning both efficiency and preciseness.