final class GenerationTrace
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Retains only the latest generation's occurrence paths and diagnostic attempt boundaries.

Type Aliases§

Event = array{generationId: int, attemptId: int, nodeId: int, parentNodeId: int|null, rhsPosition: int|null, ruleId: string, productionId: string, selectionReason: string}
Attempt = array{id: int, events: list<Event>, status: string, error: string|null, sqlHash: string|null}
Trace = array{generationId: int, root: string, planSummary: array<string, int|string|bool|null>, attempts: list<Attempt>, lexicalEvents: list<string>, features: array<string, list<string>>, candidateSources: array<int, list<string>>, candidateConditions: array<int, array{left: array{allowed: int, rules: list<string>}|null, boundaries: array<int, array{allowed: int, rules: list<string>}>}>, candidateRejections: list<array{index: int, candidate: string, rules: list<string>}>, rewriteOperations: list<Rewrite>, rewrites: list<string>, spacingEvents: list<array{candidate: string, separator: string, allowed: int, rules: list<string>}>, status: string, reachedIds: list<string>, emittedIds: list<string>}
Rewrite = import from LexicalObservation

Properties§

public Trace $value

Methods§

public function record(
    int $node,
    ?int $parent,
    ?int $position,
    string $rule,
    string $production,
    string $reason,
): void

Records a selection before its occurrence is expanded.

Parameters

$nodeint
$parent?int
$position?int
$rulestring
$productionstring
$reasonstring
Test cases 5
Calls 1
public function commit(string $hash, list<int>|null $nodes = null): list<string>

Credits emitted productions only to the attempt returning SQL.

Parameters

$hashstring
$nodeslist<int>|nullSource occurrences preserved in the output

Returns

list<string>
Test cases 3
Calls 6
public function end(): void

Finalizes failed generations, including failures before lexical realization.

Test cases 3
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private array<string, true> $reached = []

Test cases 15§

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

Dedicated tests 8
Other tests reaching this symbol 7

Relations§

Instantiated in 1
Type declarations 1