一句话:提出可组合的不动点组合子,以系统构造并保证 big-step 抽象解释器分析算法的可靠性。
Big-step 抽象解释器便于定义静态分析,但其分析是递归函数,终止性不确定,导致不动点算法复杂且难以保证可靠。不同于 small-step 归约、抽象机或图可达性等可化为带 widening 的有限迁移系统的方法,本文提出用小型可复用不动点组合子系统构造此类算法。组合子可描述分析顺序、递归与循环展开深度,并记录(上下文敏感的)调用图等辅助数据;每个组合子可独立开发、复用并验证可靠。作者给出形式化元理论:由可靠组合子组合得到的不动点算法必然可靠。最后在 Stratego、Scheme、WebAssembly 的分析中实验验证。
Big-step abstract interpreters are an approach to build static analyzers based on big-step interpretation. While big-step interpretation provides a number of benefits for the definition of an analysis, it also requires particularly complicated fixpoint algorithms because the analysis definition is a recursive function whose termination is uncertain. This is in contrast to other analysis approaches, such as small-step reduction, abstract machines, or graph reachability, where the analysis essentially forms a finite transition system between widened analysis states. We show how to systematically develop sophisticated fixpoint algorithms for big-step abstract interpreters and how to ensure their soundness. Our approach is based on small and reusable fixpoint combinators that can be composed to yield fixpoint algorithms. For example, these combinators describe the order in which the program is analyzed, how deep recursive functions are unfolded and loops unrolled, or they record auxiliary data such as a (context-sensitive) call graph. Importantly, each combinator can be developed separately, reused across analyses, and can be verified sound independently. Consequently, analysis developers can freely compose combinators to obtain sound fixpoint algorithms that work best for their use case. We provide a formal metatheory that guarantees a fixpoint algorithm is sound if its composed from sound combinators only. We experimentally validate our combinator-based approach by describing sophisticated fixpoint algorithms for analyses of Stratego, Scheme, and WebAssembly.
@article{paperbot1915,
title = {Combinator-Based Fixpoint Algorithms for Big-Step Abstract Interpreters},
author = {Sven Keidel and Sebastian Erdweg and Tobias Hombücher},
journal = {Proceedings of the ACM on Programming Languages},
volume = {7},
number = {ICFP},
year = {2023},
doi = {10.1145/3607863}
}