Repository navigation
Tree-sitter accuracy audit: measure Ada (97.8% recall, 96.8% precision) - #9154
Merged
Merged
Conversation
…rence functions: 97.8% recall, 96.8% precision) Ada was listed as deliberately not measured because language-crucible had no data/ada at the old v1.2.0 pin. At the current v1.7.0 pin it has 54 files (alire and functional), so the blocker is gone. The reference follows GitGalaxy's own Ada definition of a function (Rule 7: a subprogram with a body, not a spec-only declaration, `is abstract`, `is null` or `is new`): a subprogram_body plus an expression function. Counting spec declarations would book every .ads spec as a miss against a rule that excludes them by design. The name lives on the nested procedure_/function_specification and parameters are the unnamed identifiers of each parameter_specification (`L, R : Boolean` is two), so both are read there. First measurement over 49 files: 928 of 949 functions found (97.8%), 31 extra (96.8% precision), 914 of 928 argument counts exact (98.5%). The misses are mostly operator-overload bodies (`"and"`, `"<"`) and some nested subprograms; the extras are mostly spec-file constructs. No class measure: Ada's tagged types are not mapped. Baseline written with --regenerate; the language-standards summary table was updated by the tool. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvhLsKhsTZmCyX36Qem
squid-protocol
marked this pull request as ready for review
November 24, 2026 00:09
Contributor
… environment CI's tree-sitter-accuracy-audit failed on Ada with `args_exact_match: 914 -> 912`. I had generated the baseline in a different venv (the self-scan one) than CI's. The CI matched venv (.crucible_venvs/full_precision, tree-sitter-language-pack 1.24.0 from ci/requirements/treesitter.txt) reproduces 912, so the 912 is the figure CI measures; the difference is in the installed dependencies, not the grammar pack version (both environments use 1.24.0 and agree on every other Ada number: 949 reference functions, 928 found, 31 extra). Regenerated from scratch (the tool refuses to regenerate over a regression, and this baseline had not merged), against the language-crucible v1.8.0 pin. The new baseline passes --ci in both environments (914 is better than 912, which the gate accepts). Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvhLsKhsTZmCyX36Qem
…d main's Julia/R/F# helpers) Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvhLsKhsTZmCyX36Qem
Contributor
|
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.
What this does
Adds Ada to the tree-sitter accuracy audit, so Ada gets a function measurement against a real reference for the first time (it was listed as deliberately unmeasured).
Why it was blocked, and why it is not now. The audit's note said
language-cruciblehad nodata/adaat the v1.2.0 pin. At the current pin (v1.7.0) it has 54 files (alire and functional: 33.adb, 17.ads). I removed the stale note.What counts as a function (a judgement call). GitGalaxy's Ada
func_startdeliberately matches only a subprogram with a body (Rule 7: not a spec-only declaration,is abstract,is nulloris new). The reference follows the same definition: asubprogram_bodyplus an expression function. My first attempt counted spec declarations too and gave 71.7% recall; that booked every.adsspec as a miss against a rule that excludes them by design, so I did not keep it. If you want specs counted, it is one line inNODE_MAPS["ada"], but the engine would then need a rule for them.First measurement (49 files):
The misses are mostly operator-overload bodies (
"and","or","<","xor") and some nested subprograms (Evaluate,Flatten,Iterateinalire-conditional_trees.adb). The extras are mostly constructs in.adsfiles. I did not investigate either further; they are candidate engine issues, not filed.Code changes in
tests/tools/tree_sitter_accuracy_audit.py: anadaentry inNODE_MAPS; the function name is read from the nestedprocedure_/function_specification; parameters are the unnamed identifiers of eachparameter_specification(L, R : Booleanis two). No class measure: Ada's tagged types are not mapped. The tool also updated the summary table ingitgalaxy/standards/language_standards/__init__.py.Update 2026-11-24: baseline corrected
CI failed on
args_exact_match: 914 -> 912. I had generated the baseline in my self-scan venv, which differs from CI's installed dependencies. The CI-matched venv (tree-sitter-language-pack1.24.0, hash-pinned inci/requirements/treesitter.txt) reproduces 912, so I regenerated the baseline there (the pack version is the same in both environments; the difference is other installed packages). Every other Ada number is the same in both. I also merged currentmainand re-measured against the v1.8.0 pin.Read before merging
tests/tree_sitter_accuracy_baseline_ada.json. CI will fail if Ada's numbers drop below it.data/adaextracted from thev1.7.0tag withgit archive, not a full crucible checkout. Thecorpus_pathin the baseline readslanguage-crucible/data/adalike the others.Checked
pytest tests/tools/test_tree_sitter_accuracy_ada.py: 3 passed; related tool tests: 228 passed, 3 skippedtree_sitter_accuracy_audit.py --lang ada --ci: OKruff_audit.py --ci,doc_refs_audit.py --ci: no new findings🤖 Generated with Claude Code
https://claude.ai/code/session_018srRvhLsKhsTZmCyX36Qem