Module Coverage.EnumSource

Sourcetype ('n, 'term) _graph = {
  1. domain : 'n Fix.Indexing.cardinal;
  2. predecessors : 'n Fix.Indexing.index -> ('n Fix.Indexing.index * int * 'term Utils.Misc.indexset) list;
  3. unaccepted : 'n Fix.Indexing.index -> 'term Utils.Misc.indexset;
}

Augments the deterministic graph with unaccepted lookahead tracking. For each node, computes which terminal symbols have not been accepted by any applicable reduction. Sink nodes with non-empty unaccepted sets represent coverage gaps. Predecessor links enable path reconstruction.

Sourceval prepare : 'g Info.grammar -> ('g, 'lrc, 'n) Andor._graph -> ('g, 'lrc, 'n, 'm) Deter._graph -> ('lrc Fix.Indexing.index -> int * 'lrc Fix.Indexing.index list) -> ('m, 'g Info.terminal) _graph * ('m Fix.Indexing.index list * 'g Info.terminal Utils.Misc.indexset) list array

Build the enumeration graph and compute maximal sink groups. Propagates unaccepted lookaheads from initial states through the deterministic graph, subtracting each node's accept set along edges. Returns the graph with predecessor/unaccepted accessors, plus an array of sink groups indexed by stack prefix length.