Skip to content

codeanalyzer-java: L4 summary pass (SCC fixpoint) #185

Description

@sinha108

Plan (optional)

Design spec: https://github.com/codellm-devkit/codeanalyzer-java/blob/main/docs/design/specs/schema-v2-l3-l4-design.md

Problem

The SDG (prior issue) lacks summary edges — the transitive actual_in → actual_out shortcuts at each call site that make later SDK slicing/taint context-sensitive without re-descending into callees. WALA computes HRB summaries lazily inside its Slicer and does not expose them cleanly, so we compute them ourselves (D7).

Scope boundary

The summary edge family only, over the L4 SDG. The analyzer is a pure graph provider — no slicing/taint. Includes the J_SUMMARY Neo4j overlay.

Goals

  • Dedicated summary pass: hammock-region summaries composed bottom-up over the SCC-condensation DAG (Tarjan); within an SCC iterate to a monotone fixpoint; k-limited (from L3)
  • Emit summary (actual_in→actual_out) edges on the callable
  • Content-hash + cache summaries in cache_dir, recording the facts each depends on (incremental re-analysis aspirational)
  • Deterministic wavefront (Kahn-style) over the SCC DAG; J_SUMMARY Neo4j overlay

Caveats and known risks

  • Cost / termination: k-limiting + bounded label sets are mandatory for the interprocedural fixpoint to terminate; the heaviest L4 unit.
  • Watch memory (workers holding CFGs) more than CPU; never emit during parallel execution — collect then sort.

Definition of done

  • A summary edge exists for a known transitive flow (a → b → c and back).
  • An SCC of two mutually recursive functions reaches fixpoint (terminates) and its summary is identical across two runs.
  • summary present in both projections; -j N byte-identical to -j 1.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestjavaPull requests that update java code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions