Repository navigation
Java call resolver: calls to a sibling overload of the same name and this(...) chaining are edges, not recursion (Part of #3772) - #6424
Merged
Conversation
…ame and this(...) chaining are edges, not recursion (Part of #3772) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
#3772) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…art of #3772) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 24, 2026 09:24
Contributor
Owner
Author
|
No description provided. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #3772 (compiler call-graph comparison), follow-up to #6409: the
not_extracted/same_namebucket (119 on gson vs scip-java).What changed
A Java unit calling a DIFFERENT overload of its own name (
fromJson(a)->fromJson(a, b), or constructor chainingthis(...)) was dropped twice like recursion: by the detector'sc != self_namefilter (andthisin the global ignore), then by the resolver's recursion prune.detector.py: for languages withcalls_out_arities(Java), a bare self-name call is kept with its argument counts (the unit's own header is not counted), and a barethis(in a constructor is recorded as the unit's own name. Qualified calls (this.f(..),x.f(..)) are unchanged.call_resolver.py(one condition): an overload language's bare self-name call whose counts pick only the unit itself is pruned as recursion (same as before for the final output); a count that picks another overload is an edge; an ambiguous count stays anoverloadrow, never an edge.Agreement before / after (java, gson vs scip-java 0.12.3)
tests/call_graph_resolution_java_baseline.jsonregenerated.Class / Sibling gaps
Class: a Java unit's bare call to a different overload of its own name dropped as recursion. Covered: bare
f(..)sibling overloads andthis(..)constructor chaining (tests include true same-arity recursion staying dropped, mixed self+sibling counts,this.f(..)unchanged). Sibling gaps (none needs a burned mainframe estate):other.fromJson(..),this.f(..)) are still dropped by the sameself_namefilter: needs receiver typing to tell recursion from a call on another object.super(...)constructor chaining targets the parent class: a different mechanism (inheritance lookup), not touched.fromJson(s, Class)vsfromJson(s, Type)) stay ambiguous: needs argument-type discrimination.OVERLOAD_LANGSis java-only), so their same-name sibling calls stay dropped.Golden
Both fixtures re-blessed via
golden-lock.sh crucible_check.py --update --yes:calls_out_togains the Java sibling-overload edges (Java/Groovy-fixture.javafunction rows), with small PageRank/fan-in/fan-out/brief moves from the added edges.Gates
New test file 5 passed; calls_out / call_resolver / detector tests 1522 passed;
callgraph_check --langs javaPASS;pr_gates --fast7/7;--ratchets9/9 (0 skipped).Cross-repo: none.
🤖 Generated with Claude Code