Lune

OOPSLA2020Top-tier venue

Compiling symbolic execution with staging and algebraic effects

Guannan Wei, Oliver Bracevac, Shangyin Tan, Tiark Rompf

Abstract

Building effective symbolic execution engines poses challenges in multiple dimensions: an engine must correctly model the program semantics, provide flexibility in symbolic execution strategies, and execute them efficiently. This paper proposes a principled approach to building correct, flexible, and efficient symbolic execution engines, directly rooted in the semantics of the underlying language in terms of a high-level definitional interpreter. The definitional interpreter induces algebraic effects to abstract over semantic variants of symbolic execution, e.g., collecting path conditions as a state effect and path exploration as a nondeterminism effect. Different handlers of these effects give rise to different symbolic execution strategies, making execution strategies orthogonal to the symbolic execution semantics, thus improving flexibility. Furthermore, by annotating the symbolic definitional interpreter with binding-times and specializing it to the input program via the first Futamura projection, we obtain a "symbolic compiler", generating efficient instrumented code having the symbolic execution semantics. Our work reconciles the interpretation- and instrumentation-based approaches to building symbolic execution engines in a uniform framework. We illustrate our approach on a simple imperative language step-by-step and then scale up to a significant subset of LLVM IR. We also show effect handlers for common path selection strategies. Evaluating our prototype's performance shows speedups of 10 30x over the unstaged counterpart, and 2x over KLEE, a state-of-the-art symbolic interpreter for LLVM IR.

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.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Flan: An Expressive and Efficient Datalog Compiler for Program Analysis cites Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect Dependencies
  • Flan: An Expressive and Efficient Datalog Compiler for Program Analysis cites Compiling Parallel Symbolic Execution with Continuations
  • Compiling WebAssembly Concolic Execution with Staging, Continuations, and Snapshots cites Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect Dependencies
  • Compiling WebAssembly Concolic Execution with Staging, Continuations, and Snapshots cites Symbolic execution with SymCC: Don't interpret, compile!
  • Compiling WebAssembly Concolic Execution with Staging, Continuations, and Snapshots cites Compiling Parallel Symbolic Execution with Continuations
  • Compiling Parallel Symbolic Execution with Continuations cites Symbolic execution with SymCC: Don't interpret, compile!
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Graph IRs for Impure Higher-Order Languages: Making Aggressive Optimizations Affordable with Precise Effect DependenciesOliver Bracevac, Guannan Wei, Songlin Jia, Supun Abeysinghe et al.OOPSLA 2023 · 14 citations
  2. Compiling Parallel Symbolic Execution with ContinuationsGuannan Wei, Songlin Jia, Ruiqi Gao, Haotian Deng et al.ICSE 2023 · 10 citations
  3. Flan: An Expressive and Efficient Datalog Compiler for Program AnalysisSupun Abeysinghe, Anxhelo Xhebraj, Tiark RompfPOPL 2024 · 9 citations
  4. Compiling WebAssembly Concolic Execution with Staging, Continuations, and SnapshotsDinghong Zhong, Alexander Y. Bai, Mikail Khan, Guannan WeiOOPSLA 2026

Builds on2

  1. Architecting a Query Compiler for Spatial WorkloadsRuby Y. Tahboub, Tiark RompfSIGMOD 2020 · 9 citations
  2. Symbolic execution with SymCC: Don't interpret, compile!Sebastian Poeplau, Aurélien FrancillonUSENIX Security 2020

Related papers

  1. Learning to Explore Paths for Symbolic ExecutionJingxuan He, Gishor Sivanrupan, Petar Tsankov, Martin T. VechevCCS 2021 · 39 citations
  2. When Compiler Optimizations Meet Symbolic Execution: An Empirical StudyYue Zhang, Melih Sirlanci, Ruoyu Wang, Zhiqiang LinCCS 2024 · 2 citations
  3. Concrete Constraint Guided Symbolic ExecutionYue Sun, Guowei Yang, Shichao Lv, Zhi Li et al.ICSE 2024 · 3 citations
  4. Neuro-Symbolic Execution: Augmenting Symbolic Execution with Neural ConstraintsShiqi Shen, Shweta Shinde, Soundarya Ramesh, Abhik Roychoudhury et al.NDSS 2019 · 43 citations
  5. SYMTUNER: Maximizing the Power of Symbolic Execution by Adaptively Tuning External ParametersSooyoung Cha, Myungho Lee, Seokhyun Lee, Hakjoo OhICSE 2022 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines