Formulog: Datalog for SMT-Based Static Analysis

被引:15
作者
Bembenek, Aaron [1 ]
Greenberg, Michael [2 ]
Chong, Stephen [1 ]
机构
[1] Harvard Univ, Cambridge, MA 02138 USA
[2] Pomona Coll, Claremont, CA 91711 USA
来源
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL | 2020年 / 4卷 / OOPSLA期
关键词
Datalog; SMT solving; SOFTWARE MODEL CHECKING; SYMBOLIC EXECUTION; PROGRAM;
D O I
10.1145/3428209
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Satisfiability modulo theories (SMT) solving has become a critical part of many static analyses, including symbolic execution, refinement type checking, and model checking. We propose Formulog, a domain-specific language that makes it possible to write a range of SMT-based static analyses in a way that is both close to their formal specifications and amenable to high-level optimizations and efficient evaluation. Formulog extends the logic programming language Datalog with a first-order functional language and mechanisms for representing and reasoning about SMT formulas; a novel type system supports the construction of expressive formulas, while ensuring that neither normal evaluation nor SMT solving goes wrong. Our case studies demonstrate that a range of SMT-based analyses can naturally and concisely be encoded in Formulog, and that thanks to this encoding high-level Datalog-style optimizations can be automatically and advantageously applied to these analyses.
引用
收藏
页数:31
相关论文
共 80 条
[71]  
Smaragdakis Y, 2011, LECT NOTES COMPUT SC, V6702, P245
[72]   Report: Datalog with Recursive Aggregation for Incremental Program Analyses (Extended Abstract) [J].
Szabo, Tamas ;
Bergmann, Gabor ;
Erdweg, Sebastian ;
Voelter, Markus .
ELECTRONIC PROCEEDINGS IN THEORETICAL COMPUTER SCIENCE, 2020, (325)
[73]  
Torlak Emina, 2013, ACM S NEW ID PROGR R, P135, DOI [DOI 10.1145/2509578.2509586, DOI 10.1145/2509578]
[74]   SECURIFY: Practical Security Analysis of Smart Contracts [J].
Tsankov, Petar ;
Dan, Andrei ;
Drachsler-Cohen, Dana ;
Gervais, Arthur ;
Bunzli, Florian ;
Vechev, Martin .
PROCEEDINGS OF THE 2018 ACM SIGSAC CONFERENCE ON COMPUTER AND COMMUNICATIONS SECURITY (CCS'18), 2018, :67-82
[75]  
Uhler Richard, 2013, Computer Aided Verification. 25th International Conference, CAV 2013. Proceedings. LNCS 8044, P678, DOI 10.1007/978-3-642-39799-8_45
[76]   Scopes as Types [J].
van Antwerpen, Hendrik ;
Poulsen, Casper Bach ;
Rouvoet, Arjen ;
Visser, Eelco .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2018, 2
[77]   NEGATION AS FAILURE USING TIGHT DERIVATIONS FOR GENERAL LOGIC PROGRAMS [J].
VANGELDER, A .
JOURNAL OF LOGIC PROGRAMMING, 1989, 6 (1-2) :109-133
[78]   PROGRAM SLICING [J].
WEISER, M .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 1984, 10 (04) :352-357
[79]  
Whaley J, 2005, LECT NOTES COMPUT SC, V3780, P97
[80]   Cloning-based context-sensitive pointer alias analysis using binary decision diagrams [J].
Whaley, J ;
Lam, MS .
ACM SIGPLAN NOTICES, 2004, 39 (06) :131-144