Sound and Reusable Components for Abstract Interpretation

被引:10
作者
Keidel, Sven [1 ]
Erdweg, Sebastian [1 ]
机构
[1] JGU Mainz, Mainz, Germany
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2019年 / 3卷 / OOPSLA期
关键词
Abstract Interpretation; Static Analysis; Soundness;
D O I
10.1145/3360602
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
interpretation is a methodology for defining sound static analysis. Yet, building sound static analyses for modern programming languages is difficult, because these static analyses need to combine sophisticated abstractions for values, environments, stores, etc. However, static analyses often tightly couple these abstractions in the implementation, which not only complicates the implementation, but also makes it hard to decide which parts of the analyses can be proven sound independently from each other. Furthermore, this coupling makes it hard to combine soundness lemmas for parts of the analysis to a soundness proof of the complete analysis. To solve this problem, we propose to construct static analyses modularly from reusable analysis components. Each analysis component encapsulates a single analysis concern and can be proven sound independently from the analysis where it is used. We base the design of our analysis components on arrow transformers, which allows us to compose analysis components. This composition preserves soundness, which guarantees that a static analysis is sound, if all its analysis components are sound. This means that analysis developers do not have to worry about soundness as long as they reuse sound analysis components. To evaluate our approach, we developed a library of 13 reusable analysis components in Haskell. We use these components to define a k-CFA analysis for PCF and an interval and reaching definition analysis for a While language.
引用
收藏
页数:28
相关论文
共 27 条
[1]  
[Anonymous], 1999, NATO ASI SERIES F
[2]  
[Anonymous], 1991, CONTROL OW ANAL HIGH
[3]  
COUSOT P, 1992, LECT NOTES COMPUT SC, V631, P269
[4]  
Cousot Patrick, 1979, P 6 ACM SIGACT SIGPL, P269, DOI DOI 10.1145/567752.567778
[5]   Abstracting definitional interpreters (Functional pearl) [J].
Darais D. ;
Labich N. ;
Nguyn P.C. ;
Van Horn D. .
1600, Association for Computing Machinery (01)
[6]  
Darais D, 2015, ACM SIGPLAN NOTICES, V50, P552, DOI [10.1145/2814270.2814308, 10.1145/2858965.2814308]
[7]   Extended static checking for Java']Java [J].
Flanagan, C ;
Leino, KRM ;
Lillibridge, M ;
Nelson, G ;
Saxe, JB ;
Stata, R .
ACM SIGPLAN NOTICES, 2002, 37 (05) :234-245
[8]  
Gibbons Jeremy., 2010, P 3 ACM SIGPLAN S HA
[9]   Type classes in Haskell [J].
Hall, CV ;
Hammond, K ;
Jones, SLP ;
Wadler, PL .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 1996, 18 (02) :109-138
[10]  
Hamana M, 2011, WGP 11: PROCEEDINGS OF THE 2011 ACM SIGPLAN WORKSHOP ON GENERIC PROGRAMMING, P59