NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Benchmarking Symbolic Execution Using Constraint Problems - Initial Results

Sahil Verma, Roland H. C. Yap

TL;DR

Researchers have developed a new way to "stress test" symbolic execution tools by converting complex math puzzles (Constraint Satisfaction Problems) into C code. Their results reveal a startling lack of robustness: simply changing how a constraint is written—without changing its logic—can make tools like KLEE up to 100 times slower.

What Problem Does This Paper Address?

Symbolic execution (SE) is a heavyweight champion in software testing. Instead of running a program with specific inputs, it treats inputs as symbols, exploring every possible path to find bugs like crashes or buffer overflows. However, SE has two "Achilles' heels": path explosion (too many branches to explore) and constraint solving overhead (the math gets too hard for the underlying SMT solvers).

While most benchmarks use real-world software, these often conflate reasoning issues with practical hurdles like system calls or complex memory modeling. The authors argue we need "hard benchmarks"—similar to those used to drive the development of SAT solvers—to isolate and evaluate the core reasoning engines of SE tools. They want to know: if we give two different SE tools the exact same logical problem, do they perform consistently?

Methods

The authors bridge the gap between the world of Constraint Satisfaction Problems (CSPs) and software analysis. They created a pipeline that transforms CSP instances (formatted in XCSP3) into C programs.

The transformation is clever:

  1. Variables: CSP variables become symbolic integers in C.
  2. Domains: Constraints on what values a variable can take are enforced using assume statements.
  3. Constraints: The core logic is translated into C code. If the tool can find a path to a specific assert(0) statement, the CSP is satisfiable (a solution exists).
  4. Variations: To test robustness, they generated multiple versions of the same problem by varying:
  5. Constructs: Using if statements (branching) vs. assume statements (direct solver input).
  6. Operators: Using logical operators (&&, ||) which cause short-circuiting/branching vs. bitwise operators (&, |) which create larger single expressions.
  7. Grouping: Translating constraints one-by-one vs. grouping them into a single large condition.

Datasets

The study uses several well-known combinatorial problem families:

  • Extensional Benchmarks (Table-based): AIM-100, AIM-200, and Dubois. These are essentially large truth tables of allowed/disallowed value combinations.
  • Intensional Benchmarks (Formula-based): All-Interval, Costas-Array, and HayStacks. These involve more complex arithmetic relationships (e.g., $x = |y - z|$).
  • Tools Evaluated: KLEE (using STP and Z3 solvers), Tracer-X (an extension of KLEE), and LLBMC (a bounded model checker).

Key Insights and Ideas

  • The "Writing Style" Trap: SE tools are incredibly sensitive to how code is written. A tool might solve a problem instantly if written with bitwise operators but timeout if written with logical if branches, even though the mathematical logic is identical.
  • LLBMC's "Static" Advantage: LLBMC generally outperformed KLEE-based tools. Because LLBMC converts the entire program into one giant SMT formula (a "static" approach) rather than exploring paths one-by-one, it is much more robust to how the constraints are grouped or formatted.
  • Solver Sensitivity: The choice of the underlying solver (STP vs. Z3) isn't just a minor detail; it's a primary driver of performance. In some cases, switching the solver was more impactful than changing the tool's search strategy.
  • The Dubois Difficulty: The "Dubois" benchmarks proved particularly brutal. Despite the C programs being only a few hundred lines long, they caused frequent timeouts, highlighting that code size is a poor proxy for analysis difficulty.

Key Results

  • Performance Variance: For the AIM-100 benchmark, KLEE's runtime varied by up to two orders of magnitude (100x) depending on the transformation version used.
  • Scalability: In scalability tests (increasing the problem size), LLBMC and KLEE/STP showed better resilience than KLEE/Z3, though all tools eventually hit a "wall" where timeouts became inevitable.
  • Interpolation Overhead: Tracer-X, which uses "interpolation" to prune redundant paths, was often slower than standard KLEE on these specific benchmarks. The overhead of calculating interpolants outweighed the benefits because these combinatorial problems don't have the kind of "obvious" redundancies Tracer-X is designed to catch.

Limitations and Future Work

The authors acknowledge that their benchmarks are purely synthetic and loop-free. Real-world code often involves complex loops, pointers, and heap memory, which this study ignores to focus on pure reasoning.

Future directions include: * Transforming constraints into more complex, "natural" C code involving loops. * Investigating why specific "writing styles" (like bitwise vs. logical) confuse solvers so differently. * Using these "hard" benchmarks to help SE developers build more robust engines that aren't easily fooled by minor code refactoring.

Summary updated

BibTeX
@inproceedings{verma2019benchmarking,
  author = {Sahil Verma and Roland H. C. Yap},
  title = {{Benchmarking Symbolic Execution Using Constraint Problems - Initial Results}},
  booktitle = {ICTAI},
  year = {2019},
  url = {https://openreview.net/forum?id=HxbgTsN1-c},
}

Loading related content...

Figure