final class StateJoin
Restricted visibility: declared "@visibility Deriver\Deriver\Evaluator" and "@visibility Deriver\Deriver\Evaluator\Execution". Code outside that scope must not name this declaration.

Safely merges excess partitions rather than retaining only the first candidates.

Properties§

public Context $context

Methods§

public function __construct(public Context $context)

Parameters

$contextContextQuery context
public function clusters(list<State> $states): list<State>

Joins each path into the first compatible cluster; paths with another structure keep executing as their own cluster.

Parameters

$stateslist<State>Excess paths waiting at one block

Returns

list<State> Joined clusters in discovery order
Test cases 1
Called from 1
Calls 5
public function seal(non-empty-list<State> $states, CallableGraph $callable): list<State>

Seals paths that cannot be joined, keeping their storage roots and aliases in one residual.

Parameters

$statesnon-empty-list<State>Paths waiting at one block
$callableCallableGraphCurrent callable

Returns

list<State> Normal and exceptional residuals
Test cases 1
Called from 1
Calls 3
public function orders(list<State> $states, CallableGraph $callable): list<State>

Coalesces operand orders only when their complete resulting states are identical.

Parameters

$stateslist<State>States waiting at instruction blocks
$callableCallableGraphGraph containing explicit operand-order joins

Returns

list<State> Distinct semantic states
Called from 1
Calls 7
public function candidateKey(State $state, string $register, Identity $identity): string

Summarizes the guard, registers, and storage that every coalesced operand order must share. Different summaries prove different states, so complete fingerprints are only computed for collisions.

Parameters

$stateStateCandidate completed operand order
$registerstringHidden order predicate
$identityIdentity\Deriver\Deriver\Evaluator\Term keys shared by the compared states

Returns

string Necessary condition for equal order keys
Test cases 1
Called from 1
Calls 6
public function orderKey(
    State $state,
    string $register,
    Identity $identity = new \Deriver\Deriver\Evaluator\Scalar\Identity(),
): string

Normalizes bookkeeping while retaining all values, storage, aliases, and source guards.

Parameters

$stateStateCandidate completed operand order
$registerstringHidden order predicate
$identityIdentity\Deriver\Deriver\Evaluator\Term keys shared by the compared states

Returns

string Exact equality key, excluding only the internal order choice
Test cases 2
Called from 2
Calls 8
public function fingerprint(
    State $state,
    Identity $identity = new \Deriver\Deriver\Evaluator\Scalar\Identity(),
): string

Encodes structural equality without PHP object-sharing identifiers or scalar coercion.

Parameters

$stateStateNormalized, acyclic evaluator state
$identityIdentityStructural term keys

Returns

string Typed structural fingerprint
Test cases 1
Called from 2
Calls 2
public function encode(object $value, Identity $identity): string

Encodes an object structurally; shared terms and objects are encoded once, so the cost follows the graph rather than its tree expansion.

Parameters

$valueobjectAcyclic evaluator value
$identityIdentityStructural term keys

Returns

string Typed structural fingerprint
Test cases 1
Called from 3
Calls 9

Test cases 152§

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

Dedicated tests 14
Other tests reaching this symbol 138

Relations§

Instantiated in 8
Method calls 9