Formulog: Datalog for SMT-based static analysis
Abstract
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.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
15 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Program Repair Guided by Datalog-Defined Static Analysis cites Securify: Practical Security Analysis of Smart Contracts
- Bring Your Own Data Structures to Datalog cites Seminaïve evaluation for a higher-order functional language
- Bring Your Own Data Structures to Datalog cites Better Together: Unifying Datalog and Equality Saturation
- Sporq: An Interactive Environment for Exploring Code using Query-by-Example cites Provenance-guided synthesis of Datalog programs
- Declarative smart contracts cites Securify: Practical Security Analysis of Smart Contracts
Cited by top-tier papers15
- Better Together: Unifying Datalog and Equality SaturationYihong Zhang, Yisu Remy Wang, Oliver Flatt, David Cao et al.PLDI 2023 · 38 citations
- Program Repair Guided by Datalog-Defined Static AnalysisYu Liu, Sergey Mechtaev, Pavle Subotic, Abhik RoychoudhuryFSE 2023 · 14 citations
- Declarative smart contractsHaoxian Chen, Gerald Whitters, Mohammad Javad Amiri, Yuepeng Wang et al.FSE 2022 · 14 citations
- Bring Your Own Data Structures to DatalogArash Sahebolamri, Langston Barrett, Scott Moore, Kristopher K. MicinskiOOPSLA 2023 · 11 citations
- Sporq: An Interactive Environment for Exploring Code using Query-by-ExampleAaditya Naik, Jonathan Mendelson, Nathaniel Sands, Yuepeng Wang et al.UIST 2021 · 11 citations
Builds on3
- Securify: Practical Security Analysis of Smart ContractsPetar Tsankov, Andrei Marian Dan, Dana Drachsler-Cohen, Arthur Gervais et al.CCS 2018 · 1,108 citations
- Provenance-guided synthesis of Datalog programsMukund Raghothaman, Jonathan Mendelson, David Zhao, Mayur Naik et al.POPL 2020 · 49 citations
- Seminaïve evaluation for a higher-order functional languageMichael Arntzenius, Neel KrishnaswamiPOPL 2020 · 15 citations
Related papers
- Making Formulog Fast: An Argument for Unconventional Datalog EvaluationAaron Bembenek, Michael Greenberg, Stephen ChongOOPSLA 2024 · 3 citations
- Speeding up SMT Solving via Compiler OptimizationBenjamin Mikek, Qirun ZhangFSE 2023 · 11 citations
- Flan: An Expressive and Efficient Datalog Compiler for Program AnalysisSupun Abeysinghe, Anxhelo Xhebraj, Tiark RompfPOPL 2024 · 9 citations
- Dependency-Aware Metamorphic Testing of Datalog EnginesMuhammad Numair Mansur, Valentin Wüstholz, Maria ChristakisISSTA 2023 · 10 citations
- Early Verification of Legal Compliance via Bounded Satisfiability CheckingNick Feng, Lina Marsso, Mehrdad Sabetzadeh, Marsha ChechikCAV 2023 · 15 citations
