A Domain-Specific Language for Generating Dataflow Analyzers

https://doi.org/10.1016/j.entcs.2006.10.008Get rights and content
Under a Creative Commons license
open access

Abstract

Dataflow analysis is a well-understood and very powerful technique for analyzing programs as part of the compilation process. Virtually all compilers use some sort of dataflow analysis as part of their optimization phase. However, despite being well-understood theoretically, such analyses are often difficult to code, making it difficult to quickly experiment with variants.

To address this, we developed a domain-specific language, Analyzer Generator (AG), that synthesizes dataflow analysis phases for Microsoft's Phoenix compiler framework. AG hides the fussy details needed to make analyses modular, yet generates code that is as efficient as the hand-coded equivalent. One key construct we introduce allows IR object classes to be extended without recompiling.

Experimental results on three analyses show that AG code can be one-tenth the size of the equivalent handwritten C++ code with no loss of performance. It is our hope that AG will make developing new dataflow analyses much easier.

Keywords

Domain-specific language
Dataflow analysis
dynamic class extension
compiler
Phoenix compiler framework

Cited by (0)

1

Edwards and his group are supported by an NSF CAREER award, an award from the SRC, and from New York State's NYSTAR program.