A Domain-Specific Language for Generating Dataflow Analyzers

被引:5
作者
Zeng, Jia [1 ]
Mitchell, Chuck [2 ]
Edwards, Stephen A. [3 ]
机构
[1] Columbia Univ, Dept Comp Sci, New York, NY 10027 USA
[2] Microsoft Corp, Redmond, WA 98052 USA
[3] Columbia Univ, Dept Comp Sci, New York, NY 10027 USA
关键词
Domain-specific language; Dataflow analysis; dynamic class extension; compiler; Phoenix compiler framework;
D O I
10.1016/j.entcs.2006.10.008
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
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.
引用
收藏
页码:103 / 119
页数:17
相关论文
共 14 条
[1]  
AHO AV, 1988, COMPILERS PRINCIPLES
[2]  
Alt M., 1995, Static Analysis. Second International Symposium, SAS'95. Proceedings, P33
[3]   MultiJava']Java: Modular open classes and symmetric multiple dispatch for Java']Java [J].
Clifton, C ;
Leavens, GT ;
Chambers, C ;
Millstein, T .
ACM SIGPLAN NOTICES, 2000, 35 (10) :130-145
[4]   A flexible architecture for building data flow analyzers [J].
Dwyer, MB ;
Clarke, LA .
PROCEEDINGS OF THE 18TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, 1996, :554-564
[5]   GLOBAL DATA FLOW ANALYSIS AND ITERATIVE ALGORITHMS [J].
KAM, JB ;
ULLMAN, JD .
JOURNAL OF THE ACM, 1976, 23 (01) :158-171
[6]  
Kiczales G, 1997, LECT NOTES COMPUT SC, V1241, P220, DOI 10.1007/BFb0053381
[7]  
Kiczales G., 2001, ECOOP 2001 - Object-Oriented Programming. 15th European Conference. Proceedings (Lecture Notes in Computer Science Vol.2072), P327
[8]  
Kildall G. A., 1973, Conference Record of ACM Symposium on Principles of Programming Languages, P194
[9]  
Nielson H. R., 1992, Conference Record of the Nineteenth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, P71, DOI 10.1145/143165.143182
[10]  
TJIANG SWK, 1992, SIGPLAN NOTICES, V27, P82, DOI 10.1145/143103.143120