Static analysis tools often struggle with a fundamental gap between a program's structure and its actual behavior. While a Control Flow Graph (CFG) maps out every possible way a program might jump from one line to another, many of these paths are "infeasible"—they can never be executed under any real-world input because the logical conditions required to trigger them are contradictory.
Failing to account for these impossible paths leads to significant practical hurdles: security tools flag vulnerabilities that cannot happen (false positives), test generators waste time trying to reach unreachable code, and timing analysis tools produce overly pessimistic results. To solve this, researchers have developed techniques to "prune" these paths by integrating mathematical logic directly into the analysis process.
The Gap Between Structure and Logic
The core problem arises from over-approximation. As Hong et al. et al. observe in A Temporal Logic Based Theory of Test Coverage and Generation, abstracting system behavior into flow graphs inevitably identifies execution paths that are logically impossible. For example, a program might have two consecutive if statements: if (x > 0) followed by if (x < 0). A simple CFG sees a path where both branches are taken, but basic arithmetic tells us this is impossible.
This lack of "path sensitivity" is a primary driver of noise in automated tools. In the context of web applications, Zheng et al. et al. note that static analysis often considers event interleavings that are physically impossible in real user interactions. Similarly, Li et al. et al. point out that in hardware design, many "critical paths" identified by timing tools are logically untestable, leading to wasted resources during chip testing.
Pruning via Constraint Solving
The most effective way to identify infeasible paths is to treat the conditions along a path as a mathematical puzzle. By using Satisfiability Modulo Theories (SMT) solvers, tools can verify if the logical constraints required to reach a specific code state are actually satisfiable.
In A Model Guided Security Analysis Approach for Android Applications, Yan et al. and Ma demonstrate how SMT solvers act as a filter. When the analyzer finds a potential vulnerability, it asks the solver: "Is there any input that makes all the branch conditions on this path true?" If the solver says "no," the path is pruned, and the false positive is never reported to the developer.
This approach has been adapted across various domains:
- Parallel Software: Shim et al. et al. use SMT solvers in Data Race Satisfiability on Array Elements to prove that certain combinations of branches containing data races are mathematically impossible to execute simultaneously.
- Deep Learning: In PyTea, Jhoo et al. et al. separate execution path conditions from tensor shape requirements, using symbolic solvers to ensure shape errors are only reported for reachable code.
- Smart Contracts: Chen et al. et al. highlight in DefectChecker that without formal constraint solving, simple depth-first search analysis flags unreachable paths in EVM bytecode, hurting accuracy.
Value Sensitivity and Reachability
Beyond just checking branch conditions, modern analysis seeks "value sensitivity"—tracking the actual values (or approximations of them) that variables take during execution. Grishchenko et al. et al. argue in HornDroid that by approximating runtime values instead of just tracking security labels, static analysis can determine if specific code branches are reachable at all. This allows the tool to filter out data flows that only occur on "dead code" paths.
For complex systems with infinite data domains or loops, simple SMT checks may not be enough. Finkbeiner et al. et al. propose combining local SMT checks with global cycle analysis and ranking functions. This combination helps detect loops that cannot satisfy infinite execution requirements, effectively refining the over-approximation of valid program traces in infinite-state programs.
Efficiency Through Path Sensitivity
While adding logical checks sounds computationally expensive, it often makes the overall analysis faster by reducing the search space. Ball et al. et al. introduced Bebop, which uses Binary Decision Diagrams (BDDs) to track correlations between dataflow facts efficiently. By ruling out infeasible paths early, the engine avoids the "state explosion" that occurs when an analyzer tries to explore every possible structural path.
Similarly, the Schism framework, developed by Oyabu et al. et al., uses logical condition propagation to exclude entire control flows that are guaranteed to violate program observations. In the realm of automated testing, Su et al. et al. show that identifying these "logically impossible" objectives early prevents tools from wasting computational effort on unreachable test targets.
Ultimately, pruning infeasible paths transforms program analysis from a purely structural exercise into a logically grounded one. As Ji et al. et al. conclude in their work on ARTEMIS, accurate detection requires more than just finding a path from a source to a sink; it requires modeling the specific conditions under which that path can actually be traversed.
Key Foundational Work
A Temporal Logic Based Theory of Test Coverage and Generation (2002) — contributed 1 concept elements to this direction.
Bebop: a path-sensitive interprocedural dataflow engine (2001) — contributed 1 concept elements to this direction.