Compositional Soundness Proofs of Abstract Interpreters

被引:8
作者
Keidel, Sven [1 ]
Poulsen, Casper Bach [1 ]
Erdweg, Sebastian [1 ]
机构
[1] Delft Univ Technol, Delft, Netherlands
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES | 2018年
关键词
Abstract Interpretation; Soundness;
D O I
10.1145/3236767
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The Abstract interpretation is a technique for developing static analyses. Yet, proving abstract interpreters sound is challenging for interesting analyses, because of the high proof complexity and proof effort. To reduce complexity and effort, we propose a framework for abstract interpreters that makes their soundness proof compositional. Key to our approach is to capture the similarities between concrete and abstract interpreters in a single shared interpreter, parameterized over an arrow-based interface. In our framework, a soundness proof is reduced to proving reusable soundness lemmas over the concrete and abstract instances of this interface; the soundness of the overall interpreters follows from a generic theorem. To further reduce proof effort, we explore the relationship between soundness and parametricity. Parametricity not only provides us with useful guidelines for how to design non-leaky interfaces for shared interpreters, but also provides us soundness of shared pure functions as free theorems. We implemented our framework in Haskell and developed a k-CFA analysis for PCF and a tree-shape analysis for Stratego. We were able to prove both analyses sound compositionally with manageable complexity and effort, compared to a conventional soundness proof.
引用
收藏
页数:26
相关论文
共 40 条
[21]   Generalising monads to arrows [J].
Hughes, J .
SCIENCE OF COMPUTER PROGRAMMING, 2000, 37 (1-3) :67-111
[22]  
Kalleberg Karl Trygve, 2006, P DOM SPEC ASP LANG
[23]  
Keidel Sven, 2017, P MET ACM, P1
[24]  
Liang Sheng, 1995, P 22 ACM SIGPLAN SIG, P333, DOI [DOI 10.1145/199448.199528, 10.1145/199448.199528]
[25]  
Mac Lane S., 1998, GRAD TEXT M, V5, DOI 10.1007/978-1-4757-4721-8
[26]   Control-Flow Analysis of Functional Programs [J].
Midtgaard, Jan .
ACM COMPUTING SURVEYS, 2012, 44 (03)
[27]   NOTIONS OF COMPUTATION AND MONADS [J].
MOGGI, E .
INFORMATION AND COMPUTATION, 1991, 93 (01) :55-92
[28]  
Nielson Flemming., 1994, Handbook of logic in computer science, V4, P527
[29]  
Nielson Flemming, 1999, PRINCIPLES PROGRAM A
[30]   A new notation for arrows [J].
Paterson, R .
ACM SIGPLAN NOTICES, 2001, 36 (10) :229-240