Repository navigation
HermitCrab analysis: ordered and anchored required-slot look-ahead (v2) #567
Description
Required-slot look-ahead (#561) tests presence only, so it is weak for one-segment affixes (Mbugwe -a, tense a-3; Sena R[a]), where the single segment is present somewhere in almost any word. The trigger is a template whose required slots carry one-segment markers. The cost is that part of the 63.8% (Mbugwe) and 22.1% (Sena) no-lookup ceiling stays unreached.
Depends on #561. Build only if the #561 shadow phase shows that v1 leaves more than 10 points of the no-lookup ceiling unreached on Mbugwe or Sena. If #561 is closed by its kill criterion, close this too.
Problem (census, steps)
Ceiling (no-lookup template partials): Mbugwe 63.8%, Sena 22.1%, Aweti 11.7%. #561's estimates (Mbugwe 15-35%, Sena 3-10%, est.) are well under the ceiling; this issue targets the difference. The figure that decides it is the #561 shadow measurement, which does not exist yet. Expected value is unknown.
Proposed change
Strengthen the presence test: (1) required literals of different slots must occur in slot order in the shape; (2) a slot whose allomorphs are all pure prefixes (or all suffixes) must find its literal at a position that the remaining outer slots of the same side could expose. Needs an extra "order-preserving" flag per rule, defined as contiguous-removing (the same definition as in #562).
Soundness
Holds when every rule between the slots is order-preserving: unapplication then only removes material and keeps the order and adjacency of remaining nodes, so an order or edge condition that fails now fails after any later unapplication. Rules not flagged order-preserving skip the stronger test and fall back to #561's presence test. To be re-argued in the XML doc and checked in shadow (zero violations).
Memory bound
One extra bool per rule and per-slot edge sets: grammar-sized, bytes to KB. No cache.
Measurement plan
Shadow first with the #561 harness (fired, violated, completed-under-fired), arms v1 and v2, same grammars and sampling. Stress fixture: the #561 fixture with one-segment markers. Report events saved beyond v1, per grammar, and unification counts beside them.
Kill criterion
Any shadow violation: stop. Close if v2 adds under 3 points of analysis events over v1 on Mbugwe and Sena, or if its check work exceeds 3x the extra events saved.
Related
- HermitCrab analysis: skip template partials whose required slot material is absent #561 (hard dependency), HermitCrab analysis: prune on root substring at rule outputs, gated by restoration flags #562 (shares the order-preserving definition), PR perf(hermitcrab): share trailing analysis template slot batches #546 and the R1-on-perf(hermitcrab): share trailing analysis template slot batches #546 issue (the same check applies on the shared walk).
- PR HermitCrab optimization round record: what was tried, and a faster package that is not mergeable #490: research record. PR Add a conformance suite for HermitCrab, with its adequacy argument #480: conformance suite; verdicts must be identical.
- Units: deterministic steps, never ms. Owner constraint: no memo or cache.
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields🆕 New
Activity