HermitCrab analysis can spin on simultaneous rewrites with incompatible environments
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 58/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- csharp
- 領域
- backend, testing-qa
調査の方向性
Start with AnalysisRewriteRule.cs around the SelfOpaquing selection and reapplication loop, then inspect SimultaneousPhonologicalPatternRule.cs and its no-match behavior. Add regression cases for the three reduced shapes in the issue and check that reapplication stops when a simultaneous rule makes no change. The issue does not identify test file paths, so locate the existing analysis rewrite tests before adding cases; verify the cases terminate and produce the expected parses.
索引モデルが issue の本文から書いたものです。
説明
HermitCrab’s C# analysis parser can hang indefinitely in a simultaneous rewrite when a replacement segment conflicts with an environment segment, consuming one CPU core; the pinned hc.dll reproduced all three reported shapes.
- Minimal segment case: one-feature
t → d / _ a, underlyingta, parseda. - Alpha-input case: input
[nasal:+, α(place)], outputm, environment_ pwithpnasal−; parse prefixedmp. - Underlying realization case: one rule
ʔ → - / _ V[+vocalic], underlyingʔa, parse-a. - Suspected source:
AnalysisRewriteRule.Applyselects an unboundedSelfOpaquingloop when RHS and environment feature structures are incompatible;SimultaneousPhonologicalPatternRule.Applyreturns a word even when it finds no matches. - Not known: whether synthesis has the same reapplication behavior.
Next: add regression cases for these reduced shapes and make self-opaquing reapplication stop when the simultaneous rule makes no change.
Reproduction and evidence
Replayed with the Release HermitCrab CLI from Machine commit 4d9b454d42a0da35e058641a65596339a79d115b using dotnet hc.dll -i <grammar.xml> -s <script>. The three original inputs each timed out at 45 seconds; all reduced shapes timed out at 10 seconds. Each timeout used a captured process PID and direct SIGTERM. Reduced runs sampled 107–112% CPU on one process. Compatible-output, no-environment, and feature-removal controls completed promptly.
At the pin, AnalysisRewriteRule.cs:47-69 selects SelfOpaquing after the RHS/environment FeatureStruct.IsUnifiable check fails; :166-173 has no progress or termination guard. SimultaneousPhonologicalPatternRule.cs:22-35 always returns the input word, including when Matcher.AllMatches produces no applicable match. The reduced alpha-input case also hangs after α is removed while retaining the feature-bearing input class, and the glottal case hangs with a single rule, so neither α nor the original rule chain is necessary to the loop.
The pin-matched driver was absent from the exact-pin worktree, so the Tool Release project was built from an exact-pin source archive (SHA-256 of resulting hc.dll: 9cd575be98ddb4e9e32e63114ee699c94d7a395af2074ad15f1557a272404964). The related loop files are unchanged in locally fetched Machine origin/master 9f284a3cc4d5e2c5896f885ba1103fb30594b1e8.
Found while comparing HC-Rust (PanGloss) with pinned hc.dll; PanGloss answers all three in about 1 ms.
- 主要言語
- C#
- スター
- 29
- フォーク
- 16
- 平均マージ
- 5日 11時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sillsdev/machine のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
HermitCrab: analysis metathesis drops the middle context that synthesis keeps対応中かも @johnml1135 が 3 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Hermit Crab
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
porting
難易度 3/5 半日 初心者へのやさしさ 25/100
sillsdev/machine#617 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Hermit Crab
難易度 4/5 3〜5日 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
sillsdev/machine の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
sebastienros/jint#4531 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
NLog/NLog.MailKit#264 ·
メンテナーはふだん 1 日以内に返信
-
Unable to buildオープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
Assert.That on a null non-generic IEnumerable throws ArgumentNullException, so IsNull() cannot passオープンbug P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
area/automation area/sdk kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
unoplatform/uno.templates#2406 ·
メンテナーはふだん 1 日以内に返信