Repository navigation
SCIP call-graph adapter; Java measured vs scip-java; SCIP-vs-tsc cross-check (#3783) - #3838
Merged
Merged
Conversation
…s-check (#3783) tests/tools/scip_callgraph.py turns any SCIP index into the call-graph contract (dependency-free protobuf reader; call-position references inside a callable's enclosing_range; external for callables outside the repo; engine naming for constructors, overloads, anonymous-class methods, bodyless declarations). Java is registered against scip-java 0.12.3 on gson (reactor mvn -fae compile + build-classpath, javac with the semanticdb plugin per module, index-semanticdb): 59.8% confident precision (4,778 judged), 36.3% recall. 1,653 of the 1,923 wrong links are a different overload of the right method; the scorer now reports an overload-blind view for OVERLOADED_LANGS (94.3% / 58.4%), baselined, not gated. Cross-check: scip-typescript 0.4.0 on zod agrees with tsc on 96.5% of its own edges but covers 52.4% of tsc's (member-assigned and quoted-key functions have no SCIP definition), so TypeScript stays on tsc. CI gate, session hook, docs, skills, README coverage and the coverage chart updated. Findings: #3835-#3837. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AbvXUJpva5XxxbssoKG9Jt
…al alias (CodeQL) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AbvXUJpva5XxxbssoKG9Jt
Contributor
4 tasks done
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.
Summary
This closes #3783 (epic #3772). It evaluates SCIP as a shared route to compiler-grade call graphs, and uses it to measure Java.
The adapter:
tests/tools/scip_callgraph.pyIt turns any SCIP index into the call-graph contract.
protobufpackage.f(,f<T>(,new X() inside a named callable'senclosing_range. The caller is the innermost named unit, so an anonymous function's calls belong to the named function around it (C8).external.Java:
callgraph_refs.pyregisters scip-java 0.12.3 on gsonscip-java indexre-runs the Maven build with a forked javac, and that failed on gson's-Werrorbuild. So the adapter builds the index itself:mvn -fae compile dependency:build-classpath, which resolves the modules that depend on their sibling's snapshot;semanticdb-javacplugin, per module, main and test sources together, falling back to main alone;scip-java index-semanticdb.All six modules are indexed: 259 files, 3,397 definitions, 7,858 edges. It takes about 45 seconds once the jars are cached. The pinned jars come from Maven Central, with retries for its 429s.
First numbers vs scip-java (gson, 7,858 reference edges):
1,653 of the 1,923
wronglinks go to a different overload of the right method in the same class. The engine can't choose between them without argument types.The scorer now reports that overload-blind view for
OVERLOADED_LANGS, currently Java only. It's an additive sub-count ofwrong, so Python's and TypeScript's numbers don't change;callgraph_checkconfirms that below.Cross-check and the decision on #3783
I ran scip-typescript 0.4.0 on zod through the same adapter, then compared it edge by edge with
ts_callgraph.js:inst.refine = (...) =>member assignments, quoted keys, and object-literal methods.Decision:
comparecross-check before adopting SCIP for any new language. It's documented indocs/graph_accuracy.md.Wiring
graph-accuracy-audit.ymlgains JDK 21 (the pinnedsetup-java), a cache for the scip-java jars and~/.m2, and a gate step for Java..claude/hooks/session-start.shpre-fetches the scip-java jars.callgraph_check.py: the new tests added to its focused test list.docs/graph_accuracy.md, the limits list indocs/function_call_graph.md, the README coverage passage (call resolution is now measured in 3 languages), the roadmap row, and the regenerated coverage chart.OVERLOADED_LANGSnote. The miss-sweep's known-pattern table gets the three Java patterns.Findings filed (milestone 14), each sample checked in source
members.entrySet()resolves toJsonObject.entrySet), overlapping Call resolver: an untyped receiver's built-in method call (str.trim(),map.get()) links confidently to a same-named repo method viafile/import#3756's 473externallinks.Type of change
CI checklist
python tests/tools/audit_check.py: all clear, format cleantests/tools/test_scip_callgraph.py(5). They build SCIP indexes by hand, so they need no JDK or network. Run as plainpytestfrom/tmp, and made Python 3.9-safe.Differential Scan target
N/A: no parsing or engine code changed, so golden masters are unaffected.
Verification
python tests/tools/callgraph_check.py --skip crucible,tree-sitter:Samples of
external,unconfirmed,unmapped_dstand non-overloadwrongwere read against gson's source before the numbers were quoted. The findings above cite them.🤖 Generated with Claude Code
https://claude.ai/code/session_01AbvXUJpva5XxxbssoKG9Jt
Generated by Claude Code