Articles

A Domain-Specific Language for Generating Dataflow Analyzers

Zheng, Jia; Mitchell, Chuck; Edwards, Stephen A.

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.

Subjects

Files

  • thumnail for zeng2006domain-specific.pdf zeng2006domain-specific.pdf application/pdf 180 KB Download File

Also Published In

Title
Electronic Notes in Theoretical Computer Science
DOI
https://doi.org/10.1016/j.entcs.2006.10.008

More About This Work

Academic Units
Computer Science
Published Here
September 22, 2011