Empc: Effective Path Prioritization for Symbolic Execution with Path Cover
Shuangjie Yao, Dongdong She
TL;DR
Empc tackles the path-explosion problem in symbolic execution by reframing path prioritization as a minimum path cover (MPC) problem on the program’s inter-procedural CFG. It computes multiple MPCs on transformed, acyclic subgraphs to constrain exploration to a compact, diverse set of paths, then guides runtime execution by matching subpaths against these MPCs and using program dependence cues to recover infeasible prefixes. Implemented as a KLEE searcher in C++/LLVM, Empc delivers substantial gains in code coverage (≈19.6% more basic blocks, ≈24.4% more lines), large memory savings (up to 93.5%), and improved bug detection (≈24 additional violations) with modest runtime overhead. The approach combines graph-theoretic MPC techniques with dependence-based infeasible-path handling to provide a principled, scalable boost to symbolic execution, and is released as open source for broader adoption and experimentation.
Abstract
Symbolic execution is a powerful program analysis technique that can formally reason the correctness of program behaviors and detect software bugs. It can systematically explore the execution paths of the tested program. But it suffers from an inherent limitation: path explosion. Path explosion occurs when symbolic execution encounters an overwhelming number (exponential to the program size) of paths that need to be symbolically reasoned. It severely impacts the scalability and performance of symbolic execution. To tackle this problem, previous works leverage various heuristics to prioritize paths for symbolic execution. They rank the exponential number of paths using static rules or heuristics and explore the paths with the highest rank. However, in practice, these works often fail to generalize to diverse programs. In this work, we propose a novel and effective path prioritization technique with path cover, named Empc. Our key insight is that not all paths need to be symbolically reasoned. Unlike traditional path prioritization, our approach leverages a small subset of paths as a minimum path cover (MPC) that can cover all code regions of the tested programs. To encourage diversity in path prioritization, we compute multiple MPCs. We then guide the search for symbolic execution on the small number of paths inside multiple MPCs rather than the exponential number of paths. We implement our technique Empc based on KLEE. We conduct a comprehensive evaluation of Empc to investigate its performance in code coverage, bug findings, and runtime overhead. The evaluation shows that Empc can cover 19.6% more basic blocks than KLEE's best search strategy and 24.4% more lines compared to the state-of-the-art work cgs. Empc also finds 24 more security violations than KLEE's best search strategy. Meanwhile, Empc can significantly reduce the memory usage of KLEE by up to 93.5%.
