lambé 0.11.0: rumil 0.10 family, rule()-free parser#9
Merged
Conversation
Move all four rumil dependencies onto the published 0.10.0 family: rumil 0.7.1 -> 0.10.0, rumil_parsers 0.8.1 -> 0.10.0, rumil_expressions 0.7.0 -> 0.10.0, rumil_tokens 0.1.0 -> 0.10.0. Picks up the stack-safe-nesting interpreter, the iterative value layer, and the ~2x engine speedup from the 0.8->0.10 rumil releases. Resolves clean; format, analyze --fatal-infos, and the 1657-test suite all pass unchanged against the new family.
_postfix was defined with rule()/Warth seed-growth. A left-recursive postfix chain (postfix SUFFIX | atom) is equivalent to an atom followed by zero-or-more suffixes folded left-to-right, so it's now _atom plus _postfixSuffix.many folded onto the base. Verified byte-for-byte AST-identical to the rule() form across a 42-case stress corpus (chaining, slice-vs-index backtracking, pratt-operator interaction). Parses real queries ~1.3-1.6x faster on AOT and JIT (iterating with many vs re-running a growing seed per position). Removes lambé's only rule() usage. Full 1657-test suite passes unchanged.
Version 0.10.0 -> 0.11.0 (regenerate _version.dart). CHANGELOG entry for the rumil family bump and the rule()-free postfix fold, with measured same-machine before/after (CLI 3.1-3.7x, completer 3-5x). Doc precision pass: correct DESIGN.md, ROADMAP.md, and doc/non-goals.md, which described the parser as using Warth seed-growth / left-recursion support. lambé's postfix grammar is still left-recursive but is now parsed as a left fold, so it uses no rule(); the streaming-evaluation blocker is restated in terms of rumil's backtracking combinator parsers needing random access, which is the durable reason and independent of Warth.
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
lambé 0.11.0. Moves onto the published rumil 0.10.0 family and rewrites the query parser's left-recursive postfix chain to be
rule()-free. No language or API changes — queries parse to identical ASTs. The changes are entirely performance.Changes
8a2b785): rumil 0.7.1→0.10.0, rumil_parsers 0.8.1→0.10.0, rumil_expressions 0.7.0→0.10.0, rumil_tokens 0.1.0→0.10.0. Picks up rumil's stack-safe CEK interpreter (~2× faster) and the iterative value layer lambé reads/writes through.rule()-free parser (50460e5): the postfix chain (.a.b[0] | op) was parsed withrule()/Warth seed-growth; it's now_atom+ a left fold of suffixes — the standard LR-free encoding. Verified byte-for-byte AST-identical across a stress corpus; ~1.3–1.6× faster on the query-parse path in isolation. lambé no longer usesrule().e5f5270): version 0.11.0, CHANGELOG with measured numbers, and a precision pass on DESIGN/ROADMAP/non-goals (they described the parser as using Warth seed-growth / left-recursion support — corrected to reflect the fold; streaming-evaluation blocker restated in terms of rumil's backtracking parsers needing random access, the durable reason independent of Warth).Measured (same machine, medians)
End-to-end CLI (AOT, 11 runs), 0.10.0 vs 0.11.0:
--print-shape50kfilter | length50kgroup_by1kREPL completer (AOT, median µs, 1k records): simple 37→9, sort_by 65→13, group_by 93→31, unique 44→10, nested 45→13 (3–5×).
The CLI cases are JSON-parse-dominated, so most of that win is rumil_parsers' faster decoders; the fold's contribution is on the query-parse path (visible in the completer).
Verification
Publish (
dart pub publish) is run separately, not via this PR.