Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or requestjavaPull requests that update java codePull requests that update java code
Description
Plan (optional)
Design spec: https://github.com/codellm-devkit/codeanalyzer-java/blob/main/docs/design/specs/schema-v2-l3-l4-design.md
Problem
The analyzer has no intraprocedural dataflow. L3 must complete each callable's body{} with statement nodes + synthetic @entry/@exit, and lay the three syntactic intra-callable overlays cfg/cdg/ddg on the callable.
Scope boundary
Intraprocedural only — no interprocedural SDG / param_* / summary (that is L4). The analyzer is a pure graph provider: no slicing or taint (those are SDK queries). Includes the L3 Neo4j overlay so the level ships in both projections.
Goals
- CFG via WALA
SSACFG/ISSABasicBlock, projected to source-statementline:colnodes (D5); single normalized@exit; every node reachable from@entryand reaching@exit - Java lowering, each with a documented rule and a fixture: checked-exception edges (per
throws/throwing call → nearest handler or@exit), try/catch/finally (+ finally duplication, try-with-resources), synchronized blocks, static/instance initializer blocks, switch (classic + arrow), labeled break/continue - CDG via post-dominance (Ferrante–Ottenstein–Warren), rooted at
@exit - Syntactic DDG (
prov:["ssa"]) from WALA SSA def-use;var= k-limited access path (--graph-field-depth, default 3) - Neo4j overlay:
J_HAS_BODY_NODE/J_HAS_CFG_NODE,J_CFG_NEXT(kind),J_CDG,J_DDG(var,prov)
Caveats and known risks
- SSA → source-statement projection fidelity (multiple SSA instrs per line; synthetic phi/pi; temporaries) — AST-CFG fallback (D5) recorded if unresolvable.
- Over-approximate exceptional edges; k-limiting mandatory for access-path finiteness.
- Determinism: assign ids by sorted source position; collect then sort; never emit during parallel fan-out.
Definition of done
- CFG gate (every node a real span; single
@entry/@exit; reachability; each fixture construct emits its documented edges incl.exception). - Dominance gate (post-dominator tree rooted at
@exit; hand-computed control deps forif/loop/early-return match thecdgedges exactly). - PDG backward-slice gate: reverse reachability over
cdg ∪ ddgof a named variable at a named line equals the hand-computed node set exactly (loop-carried + shadowed-scope cases). L2 ⊆ L3; both projections agree;-j Nbyte-identical to-j 1.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestjavaPull requests that update java codePull requests that update java code
Activity
codeanalyzer-java→ canonical schema v2 + L3/L4 dataflow (analyzer + SDK) .github#42[-]codeanalyzer-java: L3 intraprocedural dataflow (CFG/CDG/DDG) + Neo4j overlay[/-][+]codeanalyzer-java: L3 intraprocedural dataflow (CFG/CDG/DDG)[/+]