Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions conformance-stress/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Stress fixtures

These grammars are for timing and optimization work on the analysis pass. They are not conformance
fixtures: they live outside `conformance/`, so no ledger, manifest, coverage report or default runner
sees them. Each `words.yaml` starts with `# kind: stress`.

Expected output is a parity check: the original parses came from `master` (three identical runs were
required). The FLEx-style null-affix rows were updated against the #480 engine and reviewed against the
grammars; an optimization must return the same parses. The measure of a change is the number of
analysis steps, not wall-clock time.

Run them only on request:

```
dotnet test tests/SIL.Machine.Morphology.HermitCrab.Tests --filter TestCategory=Stress
dotnet run --project src/SIL.Machine.Morphology.HermitCrab.Conformance -- --fixtures conformance-stress --include-pathological
```

The test fixture is `[Explicit]` and `[Category("Stress")]`, so a plain `dotnet test` skips it.

| Fixture | What it exercises | Built for |
|---|---|---|
| `bantu-tam-templates` | Bantu slot templates with required slots (subject, object, extension, TAM, final vowel); 12 of 60 words have no parse | #575, #576 (required-slot look-ahead) |
| `bantu-tam-templates-shared` | the same words with three trailing slots shared across templates | #575, #576 (required-slot look-ahead) |
| `bantu-tam-fusion` | the same Bantu slot templates, but each object and subject rule has a plain and a vowel-fusion allomorph (synthetic, not a real language; 28 of 60 words have no parse) | the impure-slot look-ahead, stacked on #576 |
| `truncating-slot-chain` | slot templates whose required and optional suffix slots each delete the vowel before them, so required slots are always missing a segment a later slot restores (synthetic; the look-ahead prunes next to nothing; 12 of 60 words have no parse) | the supply-set look-ahead, stacked on #579 (its worst case) |
| `early-lexicon-agglutinative` | agglutinative words whose root is found early; root-substring and edge-segment prunes | #572, #574 (root-substring prune, edge-segment prefilter) |
| `bantu-extension-chain` | chained verbal extensions | excluded co-occurrence check (parked; #490 ledger) |
| `bantu-extension-required-slot` | extension chain with a required slot | template replay at lookup (dead end; #490 ledger) |
| `required-template-slot` | a required template slot with decoy branches | template replay at lookup (dead end; #490 ledger) |
| `athabaskan-prefix-complex` | a dense prefix complex | excluded co-occurrence check (parked; #490 ledger) |
| `excluded-cooccurrence` | dense morpheme co-occurrence exclusions | excluded co-occurrence check (parked; #490 ledger) |
| `allomorph-list-density` | many allomorphs per morpheme | #560 (allomorph-loop cutoff) |
| `prefix-class-density` | many prefix classes | #560 (allomorph-loop cutoff) |
| `derivation-chain-homophone-roots` | derivation chains over homophonous roots | template replay at lookup (dead end; #490 ledger) |
| `env-bantu-concord` | allomorphs conditioned by environment | environment input prefilter (dead end; #490 ledger) |
| `env-austronesian-nasal-prefix` | nasal-prefix allomorphs conditioned by environment | environment input prefilter (dead end; #490 ledger) |
| `env-zero-allomorphs` | zero allomorphs with rare-class environments | environment input prefilter (dead end; #490 ledger) |

`mpr-bantu-concord` and `mpr-inflection-classes` were removed: both used custom-named `MorphologicalPhonologicalRuleFeatureGroup`
elements with `outputType="append"`, and HCLoader builds only three fixed groups (`inflClasses`, `exceptionFeatures`,
`lexEntryInflTypes`) with the default overwrite output, so they could not be kept as grammars a real project can produce.
An inflection-class benchmark can be rebuilt on the fixed `inflClasses` group, which a real project does produce.

No expected parse of `bantu-tam-fusion` uses a fusion allomorph: the fixture passes unchanged (all 60 words, 32 with the same parse and 28 with none) after all 200 `fsub_*` subrules are deleted from its `grammar.xml`, because every plain subrule comes first, matches any stem, and HermitCrab applies allomorphs disjunctively. The parity check therefore cannot catch a regression that wrongly prunes a fused form there; the fixture guards the plain-allomorph paths only.

`early-lexicon-agglutinative` omits the word `polundanasak`: engines before #548 (synthesis
filtered by the allomorphs used) trace an extra phonological rule for it that master does not, so no single expectation passes on both.
`deep-derivation-trace` is not included: it measures trace memory and
its words have up to 864 parses each.
115 changes: 115 additions & 0 deletions conformance-stress/edge-cases/allomorph-list-density/grammar.xml

Large diffs are not rendered by default.

Loading
Loading