Skip to content

codeanalyzer-java: L2 v2 call_graph (identity edges + external_symbols) #181

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

v1 emits rich JGraphEdges (embedding method detail) as the call graph. Canonical v2 requires an identity-only call_graph at application scope and the callee: null → id refinement on body call nodes.

Scope boundary

L2 edges + callee backfill only, over the L1 v2 tree. WALA RTA call-graph construction is unchanged (Java's only call graph is WALA's). No dataflow.

Goals

  • Identity-only call_graph:[{src, dst, prov, weight}] at application scope; endpoints are callable can:// ids
  • Backfill each body call node's callee (null → id) on resolved sites
  • external_symbols{} homes call targets outside the project (imported/library/builtin), keyed by can://…/@external/…
  • Edge-only-when-resolved: unresolved sites keep callee:null, skip the edge, never crash

Caveats and known risks

  • WALA-RTA unsoundness (reflection, dynamic dispatch, unmodeled natives) — document in the analyzer README; precision recovered downstream by the SDK.
  • call_graph edges are immutable once written (never re-anchored to a statement at L3).

Definition of done

  • L2 gate: no dangling endpoints (every src/dst resolves to a real callable id); every edge has non-empty prov; callee backfilled on resolved sites and still null on honest-unresolved ones; a named expected (src,dst) edge present + at least one cross-package edge.
  • L1 ⊆ L2 superset holds (nothing L1 emitted changed except the callee backfill); output validates against the SDK model.

Metadata

Metadata

Assignees

Labels

breakingBreaking ChangeenhancementNew 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