final class CompletionReduction

Eliminates independent subtrees using exact empty/non-empty costs instead of enumerating their derivations.

Methods§

public function __construct(
    private CompletionCosts $costs,
    private ConstraintDependencies $dependencies,
)

Independent subtrees cannot consume any remaining pattern counter and therefore commute with the constrained walk.

Parameters

Test cases 1
public function reduce(
    CompletionState $state,
    GenerationPlan<bool> $plan,
    CompletionFrontier $frontier,
): bool

Preserves both output possibilities whenever the pending plan still requires a non-empty result.

Parameters

Returns

bool
Test cases 1
Called from 1
Calls 5

Private surface 2§

Implementation details, listed for orientation only.

private CompletionCosts $costs
private ConstraintDependencies $dependencies

Test cases 20§

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

Dedicated tests 1
Other tests reaching this symbol 19

Relations§

Instantiated in 1
Method calls 1
Type declarations 1