feat: adopt unlaxer-dsl 3.0.10 + opt-in P4 packrat memoize (#40 e2e) - #48
Merged
Conversation
…nd-to-end) Bump unlaxer-common/dsl 3.0.9 → 3.0.10 (opt-in packrat memoization, unlaxer-parser #40; pure dep bump — generated sources unchanged, memoization off by default). Wire memoization into the P4 parse path (P4PreferredAstMapper.parseWithRoot), gated on -Dtinyexpression.p4.memoize=true (off by default — no production behavior change). P4PackratFraudFormulaTest measures the real #19 fraud formulas with memoization on: - #1–4 (boolean/paren-ambiguity): parse in <0.5s (vs the 53-min hang / 10s deadline+fallback). - #5 (deeply nested-if): helped but ~10–20s — bottleneck is StringSource.peek allocation, not (rule,position) re-derivation; tracked as a follow-up, still deadline-fallback in prod. Core eval (testTypeInference = #32 C, testMin) verified green on 3.0.10. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
概要
unlaxer-dsl/common 3.0.10(opt-in packrat メモ化, unlaxer-parser #40)を採用し、P4 パース経路に memoize を opt-in 配線(
-Dtinyexpression.p4.memoize=true、既定OFF)。P4PreferredAstMapper.parseWithRootでcontext.enableMemoize()(プロパティ gate)。既定OFF=production 挙動不変。実 #19 fraud式での計測(
P4PackratFraudFormulaTest, memoize ON)(rule,position)の再導出ではなくStringSource.peekのアロケーションが支配項(test: AstEvaluatorCalculatorTest が P4PreferredAstMapper.parseViaMapperCompat で CPU 張り付きハング — mvn verify が完走しない #19 プロファイルが指摘、メモ化と独立)。別フォローアップとして追跡。production では従来通り deadline→fallback。検証
testTypeInference=plan: P4 fallback=0 に向けた実装・検証計画 #32 C,testMin)3.0.10 で緑。関連: #32, #38, #19, unlaxer-parser #40。
🤖 Generated with Claude Code