TL;DR
Symbolon is an automated framework that supercharges symbolic execution by learning context-sensitive code transformations. By training a Large Language Model (LLM) agent offline to discover aggressive, "semantics-breaking" transformations on small programs, it creates a reusable library of skills that can be applied to massive real-world repositories, boosting KLEE's line coverage by 3.69× while drastically cutting memory and solver overhead.
What Problem Does This Paper Address?
Symbolic execution is a powerful technique for finding security vulnerabilities and generating high-coverage test suites by analyzing programs with symbolic inputs instead of concrete values. However, it notoriously suffers from path explosion and overwhelming constraint-solving costs when encountering common real-world code patterns—such as loops with symbolic bounds or complex bit-level pointer arithmetic.
Existing attempts to alleviate these bottlenecks rely on standard compiler optimizations or hand-crafted rewrite rules. Unfortunately, compiler optimizations are designed to make concrete execution faster, which often conflicts with the goals of symbolic execution. Meanwhile, hand-crafted rules are too rigid and fail to adapt to local code contexts. Symbolon addresses this gap by automatically discovering diverse, context-sensitive program transformations tailored specifically to make code "symbolic-execution-friendly."
Methods
The core innovation of Symbolon lies in how it formulates transformation discovery as a search problem over program representations, driven by two distinct phases:
- Offline Learning: Symbolon uses an LLM-guided evolutionary search over thousands of small programs. It profiles where symbolic execution gets stuck (e.g., identifying a bottleneck like a byte-by-byte string comparison), prompts an LLM to propose alternative code representations, and evaluates them. Successful transformations are distilled into a persistent "skill library" containing 211 distinct agent skills.
- Online Inference: When analyzing a large, real-world repository, an LLM agent leverages this skill library. Instead of applying blind global rewrites, the agent inspects local source-level hints (such as variable names, comments, and control flow) to context-sensitively instantiate the learned rules.
The "Transform-and-Replay" Scaffold
Crucially, Symbolon allows semantics-breaking transformations. Traditional program transformations must strictly preserve program equivalence. Symbolon breaks this rule by treating the transformed program merely as a scaffold to generate test inputs. These inputs are then replayed on the original, unmodified program. If the tests generated from the modified scaffold successfully drive up coverage on the original code, the transformation is validated.
Datasets
- Offline Training Corpus: 2,416 sampled C programs from the CodeContests dataset (competitive programming submissions averaging 50.5 lines of code).
- Evaluation Benchmark: 32 popular real-world open-source projects widely used in testing literature (e.g.,
bash,bison,curl,openssl,sqlite,vim, andlibtiff). - System Target: The latest Linux kernel repository, utilized to evaluate real-world bug-finding capabilities.
- Validation Benchmark: The Logic-Bomb benchmark (53 C/C++ programs designed to challenge symbolic execution tools).
Key Insights and Ideas
- Decoupling Generation from Validation: Allowing semantics-breaking changes during test generation unlocks an aggressive search space. For instance, Symbolon can safely replace a complex symbolic loop bound with a fixed concrete iteration count derived from the input size layout, bypassing path explosion entirely while still generating valid inputs for downstream logic.
- Leveraging Source-Level Intent: Compilers strip away rich semantic information. By operating directly on source code, Symbolon's LLM agent can read comments and variable names to deduce developer intent—distinguishing between critical cryptographic checks (which shouldn't be bypassed) and simple parsing validations or irrelevant logging statements (which can be simplified).
- Amortizing LLM Costs: Running evolutionary search loops directly on giant codebases is computationally prohibitive. Learning generic skills on tiny programs where symbolic execution is cheap, and then cheaply deploying those skills on large repositories, makes the agentic workflow highly practical.
Key Results
Symbolon was evaluated across 16 different KLEE search strategies on 32 real-world programs, yielding dramatic improvements:
- Coverage: Increased replayed line coverage on original programs by an average of 3.69× (and 3.87× when aggregated by search strategies).
- Efficiency: Reduced peak resident memory usage by 29.2× and cut down average SMT solver time per query by 123×.
- Bug Discovery: Uncovered 21 previously unknown bugs in the Linux kernel (including use-after-free, out-of-bounds access, and null-pointer dereferences), all of which were reported to kernel maintainers. It also exposed 240 more UBSan and 25 more ASan violations in user-space software than vanilla KLEE.
Limitations and Future Work
- Deployment Overhead: While the offline learning phase is a one-time cost, repo-level inference still requires an average of 21.44 minutes per project for LLM processing and validation before the main symbolic execution campaign begins.
- Conservative Agent Behavior: In practice, the agent applies transformations sparingly (only a handful of times per project). A larger inference budget or adaptive budget allocation could unlock even higher coverage gains.
- The Learning-Deployment Gap: Real-world projects heavily utilize domain-specific APIs, macros, and long-range dependencies that are absent from competitive programming datasets, meaning some complex real-world barriers remain unaddressed by the current skill library.
Summary updated