HermitCrab analysis can spin on simultaneous rewrites with incompatible environments
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 58/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- csharp
- Bereich
- backend, testing-qa
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- C#
- Sterne
- 29
- Forks
- 16
- Ø Merge
- 3 T. 20 Std.
- Gemergte PRs (30 T.)
- 12
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus sillsdev/machine
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
porting
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
sillsdev/machine#626 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
porting
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
sillsdev/machine#625 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
HermitCrab: analysis metathesis drops the middle context that synthesis keepsEvtl. vergeben @johnml1135 hat das vor 4 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Hermit Crab
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in sillsdev/machine
Ähnliche Issues
-
SkillsOffenwayfinder:grilling
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
DigiBanks99/lopen#37 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
sebastienros/fluid#1273 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 73/100
KnifeLemon/Filee#1344 ·
Maintainer antworten meist innerhalb von 1 Tag