classConstraintDependencies
final class ConstraintDependencies
Finds exactly which grammar rules can reach a still-constrained occurrence.
Methods§
public function __construct(Grammar $grammar)Builds reverse grammar edges once, including recursive components.
Parameters
$grammar | Grammar |
public function affected(
GenerationPlan<bool> $plan,
array<string, int> $occurrences,
): array<string, true>Caches by the remaining constraint targets, independently of their exact pattern or counter values.
Parameters
$plan | GenerationPlan<bool> | |
$occurrences | array<string, int> |
Returns
array<string, true>Test cases 1
Called from 1
Calls 5
- method-call GenerationPlan::patternState() line 50
- method-call GenerationPlan::patternAt() line 51
- function-call
serializeline 55 - function-call
array_keysline 55 - function-call
array_popline 60
Private surface 2§
Implementation details, listed for orientation only.
private array<string, array<string, true>> $parents = []private array<string, array<string, true>> $cache = []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
BytePlanCompilerTestcallsPlanBuilderTestcallsCompletionMemoTestcallsCompletionReductionTest::testReduceKeepsBothIndependentOutputPossibilitiesAndTheirExactCostscallsConstrainedCompletionTestcallsDerivationTestcallsDerivationTraceTestcallsTokenGeneratorTestcallsLexemeSequenceTestcallsCandidateResolverTestcallsSqlGeneratorTestcallsTerminalSequenceTestcallsGenerationContextTestcallsMySqlProviderTestcallsGenerationContextTestcallsPostgreSqlProviderTestcallsSqlGeneratorFactoryTestcallsGenerationContextTestcallsSqliteProviderTestcalls