Developing a High-Speed C/C++ Static Analysis Tool Based on DFI

October 9, 2026
Key sections in this article

The 100×+ speedup is a research goal; inspect the checks and evaluation plan.

  1. Why DFI
  2. Checks under development
  3. Performance evaluation

BreakAI is building a C/C++ static analysis tool on top of DFI (Data-Flow Infrastructure), an interprocedural value-flow analysis framework. Our goal is to run MISRA-relevant memory and pointer checks across entire C/C++ codebases significantly faster than commercial analyzers such as Coverity without sacrificing recall or precision.

Why DFI

In C and C++, whole-program static analysis slows down when tracking values across function boundaries in the presence of pointer aliasing. Formulating interprocedural value-flow as reachability over a general program dependence graph causes state-space explosion on large codebases, often pushing full CI runs to hours.

DFI extends LLVM intermediate representation (LLVM IR) to put both top-level variables and address-taken memory objects into Static Single Assignment (SSA) form. Because every SSA value has a single definition site, traversing def-use chains in reverse turns the graph into a forest of trees. Reachability queries that normally require expensive graph traversal can instead be answered through tree-interval lookups.

Target Checks

On top of this value-flow representation, we are implementing checks for:

  • Aliased pointer writes: Indirect modifications of const or unintended memory objects through aliased pointers across function calls.
  • Uninitialized reads: Reading stack or heap memory before initialization along interprocedural control-flow paths.
  • Escaping stack addresses: Returning or storing pointers to local stack variables beyond the lifetime of their declaring stack frame.

Where pure value-flow reachability produces false positives, we combine DFI queries with path-condition pruning and object-lifetime tracking.

Speedup Goal (100×+) and Benchmarking Plan

Our research goal is a 100×+ speedup on full-codebase analysis on equivalent hardware and at equivalent detection capability, without relying on incremental build caches. We are focusing on pruning value-flow traversals that cannot affect a given rule and eliminating redundant summary recomputation across call sites.

Note on scope: the published DFI paper does not benchmark a full MISRA suite or compare directly against Coverity under matched rules, and the 100× figure is our research target rather than an achieved benchmark. As we implement each check, we will evaluate and report three metrics separately:

  1. Detection quality: False negatives and false positives per rule on standard C/C++ benchmarks.
  2. Core engine time: Value-flow construction and query execution time from LLVM IR input.
  3. End-to-end wall time: Total time from build interception and IR generation to diagnostic output.