Monadic Abstract Interpreters

被引:20
作者
Sergey, Ilya
Devriese, Dominique [1 ]
Might, Matthew [2 ]
Midtgaard, Jan [3 ]
Darais, David [4 ]
Clarke, Dave [1 ]
Piessens, Frank [1 ]
机构
[1] Katholieke Univ Leuven, iMinds DistriNet, Louvain, Belgium
[2] Univ Utah, Salt Lake City, UT 84112 USA
[3] Aarhus Univ, DK-8000 Aarhus C, Denmark
[4] Harvard Univ, Cambridge, MA 02138 USA
关键词
Languages; Theory; abstract machines; abstract interpretation; monads; operational semantics; collecting semantics; abstract garbage collection; interpreters; MACHINES;
D O I
10.1145/2499370.2491979
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Recent developments in the systematic construction of abstract interpreters hinted at the possibility of a broad unification of concepts in static analysis. We deliver that unification by showing context-sensitivity, polyvariance, flow-sensitivity, reachability-pruning, heap-cloning and cardinality-bounding to be independent of any particular semantics. Monads become the unifying agent between these concepts and between semantics. For instance, by plugging the same "context-insensitivity monad" into a monadically-parameterized semantics for Java or for the lambda calculus, it yields the expected context-insensitive analysis. To achieve this unification, we develop a systematic method for transforming a concrete semantics into a monadically-parameterized abstract machine. Changing the monad changes the behavior of the machine. By changing the monad, we recover a spectrum of machines-from the original concrete semantics to a monovariant, flow- and context-insensitive static analysis with a singly-threaded heap and weak updates. The monadic parameterization also suggests an abstraction over the ubiquitous monotone fixed-point computation found in static analysis. This abstraction makes it straightforward to instrument an analysis with high-level strategies for improving precision and performance, such as abstract garbage collection and widening. While the paper itself runs the development for continuation-passing style, our generic implementation replays it for direct-style lambda-calculus and Featherweight Java to support generality.
引用
收藏
页码:399 / 409
页数:11
相关论文
共 50 条
[31]   Monadic vs adjoint decomposition [J].
Ardizzoni, Alessandro ;
Menini, Claudia .
JOURNAL OF PURE AND APPLIED ALGEBRA, 2022, 226 (08)
[32]   Theories, Solvers and Static Analysis by Abstract Interpretation [J].
Cousot, Patrick ;
Cousot, Radhia ;
Mauborgne, Laurent .
JOURNAL OF THE ACM, 2012, 59 (06)
[33]   Class analyses as abstract interpretations of trace semantics [J].
Spoto, F ;
Jensen, T .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2003, 25 (05) :578-630
[34]   Monadic Functional Reactive Programming [J].
van der Ploeg, Atze .
ACM SIGPLAN NOTICES, 2013, 48 (12) :117-128
[35]   On the relations between monadic semantics [J].
Filinski, Andrzej .
THEORETICAL COMPUTER SCIENCE, 2007, 375 (1-3) :41-75
[36]   Through interpreters' eyes: Comparing roles of professional and family interpreters [J].
Rosenberg, Ellen ;
Seller, Robbyn ;
Leanza, Yvan .
PATIENT EDUCATION AND COUNSELING, 2008, 70 (01) :87-93
[37]   Logical relations for monadic types [J].
Goubault-Larrecq, J ;
Lasota, S ;
Nowak, D .
COMPUTER SCIENCE LOGIC, PROCEEDINGS, 2002, 2471 :553-568
[38]   Shortcut Fusion of Monadic Programs [J].
Manzino, Cecilia ;
Pardo, Alberto .
JOURNAL OF UNIVERSAL COMPUTER SCIENCE, 2008, 14 (21) :3431-3446
[39]   Monadic functional reactive programming [J].
Van Der Ploeg, Atze .
ACM SIGPLAN Notices, 2014, 48 (12) :117-128
[40]   Monadic Foundations for Promises in Jason [J].
Muscar, Alex ;
Badica, Costin .
INFORMATION TECHNOLOGY AND CONTROL, 2014, 43 (01) :65-72