C# HermitCrab synthesis generates iiiaiii from aaaa for a simultaneous aa → iii rule, but its own analysis rejects that surface form
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with the listed HermitCrab files under src/SIL.Machine.Morphology.HermitCrab/PhonologicalRules/, then trace how simultaneous synthesis and analysis handle overlapping matches in the pinned C# engine. Use the supplied aa → iii grammar with roots aaaa and aa to reproduce the mismatch. Done means synthesis and analysis agree for the literal grammar, or the sources and tests establish that the difference is intended.
由索引模型根据 Issue 内容生成。
描述
Pinned C# HermitCrab (Machine 4d9b454d42a0da35e058641a65596339a79d115b) generates iiiaiii from root aaaa under one simultaneous rule aa → iii, yet its own analysis rejects iiiaiii as a surface form of that root. The same engine's analysis does accept ROOT|iiiaiii in a variant where the input carries an unbound feature variable.
Found while checking a Rust port of HermitCrab in PanGloss (sillsdev/PanGloss#199). The PanGloss port now rejects iiiaiii on analysis, matching C#, but its synthesis still produces iiiaiii, matching C#. The disagreement is inside the C# engine itself, and the sources do not say which behaviour the rule intends.
Next: decide what the rule intends for overlapping simultaneous matches. Then either make C# synthesis and analysis agree, or document the synthesis/analysis difference as intended.
Minimal repro
Grammar (strict XML, fully specified features):
- Segments:
a(+back, -round),i(-back, -round),u(+back, +round). - One phonological rule,
multipleApplicationOrder="simultaneous", with twoasegments as input and threeisegments as output:
<PhonologicalRule id="rExpand" multipleApplicationOrder="simultaneous">
<PhoneticInput><PhoneticSequence><Segment segment="cA" /><Segment segment="cA" /></PhoneticSequence></PhoneticInput>
<PhonologicalSubrules><PhonologicalSubrule><PhoneticOutput><PhoneticSequence><Segment segment="cI" /><Segment segment="cI" /><Segment segment="cI" /></PhoneticSequence></PhoneticOutput></PhonologicalSubrule></PhonologicalSubrules>
</PhonologicalRule>
- Two roots:
ROOTwith shapeaaaaandSHORTwith shapeaa.
Pinned C# run (XmlLanguageLoader.Load, then Morpher.GenerateWords and Morpher.ParseWord), output:
ROOT generate iiiaiii
SHORT generate iii
iii SHORT|iii
iiiaiii -
iiiiii -
aaaa -
So synthesis from ROOT yields iiiaiii, while analysis of iiiaiii yields no analysis. SHORT|iii is the positive control.
Variant where C# analysis accepts the form
Two input constraints over an unrestricted feature natural class, both carrying the same alpha variable on back (bound on the input side only), with roots ROOT/aaaa and SHORT/aa. Pinned C# generates and analyses iiiaiii as ROOT|iiiaiii. The PanGloss review recorded the same unbound-input behaviour in a second replay, so the literal grammar and this variant disagree within C# analysis.
Source locations
The PanGloss reviews read these files at 4d9b454d (paths confirmed with git ls-tree) under src/SIL.Machine.Morphology.HermitCrab/PhonologicalRules/:
SimultaneousPhonologicalPatternRule.cs: the review reads simultaneous synthesis as collecting matches and subrules against the original input before applying RHS operations.AnalysisRewriteRule.cs,FeatureAnalysisRewriteRuleSpec.csNarrowAnalysisRewriteRuleSpec.cs: the reviewed captured-output guard at lines 67–97 is a different case from this one.
The sources do not name the C# lines that decide overlap selection for the literal grammar. That is the open question.
PanGloss context
- PanGloss's Rust analysis was changed so that the literal grammar rejects
iiiaiii, matching C#. Its generation regression requires the C# synthesis outputiiiaiii, so the PanGloss change only touched analysis. - A PanGloss review (
ba8957dd) proposed matching the unbound-input two-constraint case to C# analysis; the reports do not confirm it has merged. - Oracle outputs, fixture files, and review reports are held in PanGloss's review workspace, not in this issue.
- 主要语言
- C#
- 星标
- 29
- 派生
- 16
- 平均合并
- 4 天 14 小时
- 30 天内合并 PR
- 13
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sillsdev/machine 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
HermitCrab: allomorph environments are tested at each piece of a root split by an infix可能已有人在做 @johnml1135 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 35/100
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 57/100
维护者通常 1 天内回复
-
HermitCrab analysis can spin on simultaneous rewrites with incompatible environments可能已有人在做 @johnml1135 于 1 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 58/100
维护者通常 1 天内回复
-
HermitCrab: analysis metathesis drops the middle context that synthesis keeps可能已有人在做 @johnml1135 于 5 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 78/100
维护者通常 1 天内回复
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 90/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
SubtitleEdit/subtitleedit#16825 ·
维护者通常 1 天内回复
-
ci-flake kind:tests size:S type:bug
难度 1/5 1 小时以内 新手友好度 82/100
elsa-workflows/elsa-foundation#4058 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
games-on-whales/wolf-ui#23 ·
-
Skills未关闭wayfinder:grilling
难度 2/5 1-3 小时 新手友好度 64/100
DigiBanks99/lopen#37 ·