Repository navigation
Call-graph accuracy: measure zig, dart, haskell, perl (Part of #3641) - #6401
Merged
Merged
Conversation
Step 2 of the epic, calls half. call_graph_accuracy.py scores callee names for four more tree-sitter-comparable languages. Each grammar spells a call differently: perl has function/method/ambiguous/func1op call nodes, haskell a curried apply chain plus the `$` infix, zig a FnCallArguments list whose callee is the sibling before it (builtin sigil dropped, as the engine does), dart an argument_part after an identifier or (null-aware, cascade) selector. zig FnProto and dart *_signature hold no body, so the body sibling is attributed to the signature. Baseline and ledger seeded (new shapes only, all unvalidated). 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 07:31
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 #3641 (step 2, calls half), after #6396.
call_graph_accuracy.pynow scores callee names for zig, dart, haskell and perl against tree-sitter call nodes (language-crucible). Measured, raw, all shapes unvalidated:Class / Sibling gaps
Class: tree-sitter-comparable languages whose calls
call_graph_accuracy.pydoes not yet score, where the grammar has nocall_expression-shaped node. Covered here: zig, dart, haskell, perl (each with its own harness reader and tests, incl. string/comment decoys). Harness mechanisms: perl call node types plusshift-style func1op built-ins; haskell leftmostapplyfunction and the$infix (other operators are no call); zigFnCallArgumentswith the preceding sibling as callee,@dropped as the engine does; dartargument_partwith identifier /.x/?.x/..xselector callee,new/constconstructors; zig and dart bodies are siblings of the signature and are attributed to it. Sibling gaps (not here, no burned-estate program needs any): apex, fortran, matlab, objective-c, powershell, tcl, groovy, solidity, ada, scheme, makefile calls remain unmeasured. Engine leads surfaced, not fixed (engine code untouched): haskell calls_out is weak (locals/params as calls,forM-style applies missed); perl misses paren-less method calls and counts some scalars; dart misses generic constructor callsFoo<T>(...); zig drops@import(likely a dependency, not a call).Notes
@intCastvs engineintCast, 2.6k fake FPs), dart?.call(and cascades, perlshift.defined/exists/ref/keysand haskell constructors (Just x) count as calls on the tree-sitter side (built-ins and constructors count per #3327 follow-up: built-ins are calls -- trim _CALLS_OUT_GLOBAL_IGNORE to keywords (contract C2) #3361); whether the engine's side should is a ledger question, left unvalidated.pr_gates.py --fast7/7;test_call_graph_accuracy.py+test_graph_coverage_chart.py+ tree-wide guards pass. Engine untouched, so no golden bless.🤖 Generated with Claude Code