final class CompletionWitness

Proves cheap feasible continuations before the complete search; a failed probe proves nothing. Every emitted witness actually walks the patterns, budget and output obligation without constructing SQL.

Methods§

public function complete(
    list<Symbol> $symbols,
    GenerationPlan<bool> $plan,
    array<string, int> $occurrences,
    bool $nonEmpty,
    int $budget,
): ?int

Limits this optional proof attempt to 256 expansions; null always delegates to the complete search.

Parameters

$symbolslist<Symbol>
$planGenerationPlan<bool>
$occurrencesarray<string, int>
$nonEmptybool
$budgetint

Returns

?int
Test cases 3
Called from 1
Calls 14

Private surface 4§

Implementation details, listed for orientation only.

private array<string, list<array{Production, array{int, int}}>> $choices = []
private CompletionCosts $costs
private PatternProductions $productions
private CompletionMemo $memo

Test cases 25§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 5
Other tests reaching this symbol 20

Relations§

Instantiated in 1
Method calls 1
Type declarations 1