classStateJoin
final class StateJoin
Safely merges excess partitions rather than retaining only the first candidates.
Properties§
public Context $contextMethods§
public function limit(list<State> $states, CallableGraph $callable): list<State>Bounds partitions at each pending program point.
Parameters
$states | list<State> | Pending paths |
$callable | CallableGraph | Current callable |
Returns
list<State> Bounded pending pathsTest cases 4
StateJoinTest::testLimitGroupsIndependentProgramPointsBeforeApplyingTheBudgetcallsStateJoinTest::testLimitJoinsExcessPathsThatDifferOnlyInPlainValuescallsStateJoinTest::testLimitKeepsClustersWithinTheBudgetAndSealsTheStorageOfTheRestcallsStateJoinTest::testLimitPassesCompletedResidualsThroughcalls
Called from 4
- method-call Deriver\Deriver\Evaluator\Execution\Call\Preparation\Unpack::apply() packages/deriver/src/Deriver/Evaluator/Execution/Call/Preparation/Unpack.php:66
- method-call Deriver\Deriver\Evaluator\Execution\Control\CollectionCalls::apply() packages/deriver/src/Deriver/Evaluator/Execution/Control/CollectionCalls.php:66
- method-call Deriver\Deriver\Evaluator\Execution\Evaluator::execute() packages/deriver/src/Deriver/Evaluator/Execution/Evaluator.php:108
- method-call Deriver\Deriver\Evaluator\Execution\Evaluator::block() packages/deriver/src/Deriver/Evaluator/Execution/Evaluator.php:178
Calls 9
- method-call StateJoin::orders() line 38
- class-const CompletionKind::Normal() line 42
- function-call
countline 49 - function-call
array_pushline 50 - method-call Context::frontier() line 53
- function-call
maxline 55 - function-call
array_sliceline 56 - method-call StateJoin::clusters() line 57
- method-call StateJoin::seal() line 61
Joins each path into the first compatible cluster; paths with another structure keep executing as their own cluster.
Parameters
$states | list<State> | Excess paths waiting at one block |
Returns
list<State> Joined clusters in discovery orderTest cases 1
Called from 1
Calls 5
- new PathJoin line 74
- method-call PathJoin::structure() line 78
- function-call
array_keysline 79 - method-call PathJoin::join() line 80
- function-call
array_valuesline 89
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
$states | non-empty-list<State> | Paths waiting at one block |
$callable | CallableGraph | Current callable |
Returns
list<State> Normal and exceptional residualsTest cases 1
Called from 1
Calls 3
- function-call
array_intersect_keyline 103 - method-call ResidualPaths::seal() line 108
- new ResidualPaths line 108
public function orders(list<State> $states, CallableGraph $callable): list<State>Coalesces operand orders only when their complete resulting states are identical.
Parameters
$states | list<State> | States waiting at instruction blocks |
$callable | CallableGraph | Graph containing explicit operand-order joins |
Returns
list<State> Distinct semantic statesCalled from 1
Calls 7
- function-call
array_count_valuesline 122 - function-call
array_columnline 122 - function-call
is_stringline 126 - method-call StateJoin::candidateKey() line 130
- function-call
countline 132 - function-call
is_intline 136 - method-call StateJoin::orderKey() line 137
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
Returns
string Necessary condition for equal order keysTest cases 1
Called from 1
Calls 6
- method-call Identity::key() line 163
- method-call State::value() line 163
- function-call
ksortline 164 - function-call
array_mapline 165 - function-call
hashline 169 - function-call
serializeline 169
public function orderKey(
State $state,
string $register,
Identity $identity = new \Deriver\Deriver\Evaluator\Scalar\Identity(),
): stringNormalizes bookkeeping while retaining all values, storage, aliases, and source guards.
Parameters
Returns
string Exact equality key, excluding only the internal order choiceTest cases 2
Called from 2
- method-call Deriver\Deriver\Evaluator\Execution\Control\StateJoin::orders() packages/deriver/src/Deriver/Evaluator/Execution/Control/StateJoin.php:137
- method-call Deriver\Deriver\Evaluator\Execution\Control\StateJoin::orders() packages/deriver/src/Deriver/Evaluator/Execution/Control/StateJoin.php:140
Calls 8
- new Identity line 179
- method-call State::fork() line 181
- method-call Identity::key() line 182
- function-call
ksortline 184 - function-call
array_valuesline 193 - function-call
array_uniqueline 193 - function-call
sortline 194 - method-call StateJoin::fingerprint() line 199
public function fingerprint(
State $state,
Identity $identity = new \Deriver\Deriver\Evaluator\Scalar\Identity(),
): stringEncodes structural equality without PHP object-sharing identifiers or scalar coercion.
Returns
string Typed structural fingerprintTest cases 1
Called from 2
- method-call Deriver\Deriver\Evaluator\Execution\Control\PathJoin::structure() packages/deriver/src/Deriver/Evaluator/Execution/Control/PathJoin.php:159
- method-call Deriver\Deriver\Evaluator\Execution\Control\StateJoin::orderKey() packages/deriver/src/Deriver/Evaluator/Execution/Control/StateJoin.php:199
Calls 2
- new Identity line 208
- method-call StateJoin::encode() line 210
public function encode(object $value, Identity $identity): stringEncodes an object structurally; shared terms and objects are encoded once, so the cost follows the graph rather than its tree expansion.
Parameters
$value | object | Acyclic evaluator value |
$identity | Identity | Structural term keys |
Returns
string Typed structural fingerprintTest cases 1
Called from 3
- method-call Deriver\Deriver\Evaluator\Execution\Control\PathJoin::common() packages/deriver/src/Deriver/Evaluator/Execution/Control/PathJoin.php:178
- method-call Deriver\Deriver\Evaluator\Execution\Control\PathJoin::common() packages/deriver/src/Deriver/Evaluator/Execution/Control/PathJoin.php:179
- method-call Deriver\Deriver\Evaluator\Execution\Control\StateJoin::fingerprint() packages/deriver/src/Deriver/Evaluator/Execution/Control/StateJoin.php:210
public function completed(list<State> $states, CallableGraph $callable): list<State>Bounds completed paths while retaining distinct normal and exceptional effects.
Parameters
$states | list<State> | Completed paths |
$callable | CallableGraph | Owning graph |
Returns
list<State> Inclusive completed pathsTest cases 4
StateJoinTest::testCompletedHavocsLateExceptionsThatCannotBeJoinedcallsStateJoinTest::testCompletedIncludesLateReturnsAfterThePartitionLimitcallsStateJoinTest::testCompletedKeepsNormalAndExceptionalGroupsIndependentAtTheExactLimitcallsStateJoinTest::testCompletedRetainsUnobservedExceptionalStateFromLaterPartitionscalls
Called from 2
Calls 15
- function-call
countline 252 - function-call
array_pushline 253 - function-call
array_sliceline 256 - method-call PathJoin::join() line 258
- new PathJoin line 258
- method-call Context::frontier() line 261
- function-call
array_intersect_keyline 268 - method-call Havoc::symbols() line 272
- new Havoc line 272
- new Term line 273
- class-const TermKind::Throwable() line 273
- static-call Term::opaque() line 273
- new Completion line 274
- method-call ObservationLimit::boundary() line 278
- new ObservationLimit line 278
Test cases 152§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 14
StateJoinTest::testCandidateKeysSeparateStatesWithDifferentStoragecallsStateJoinTest::testClustersJoinCompatiblePathsAndKeepOtherStructurescallsStateJoinTest::testCompletedHavocsLateExceptionsThatCannotBeJoinedcallsStateJoinTest::testCompletedIncludesLateReturnsAfterThePartitionLimitcallsStateJoinTest::testCompletedKeepsNormalAndExceptionalGroupsIndependentAtTheExactLimitcallsStateJoinTest::testCompletedRetainsUnobservedExceptionalStateFromLaterPartitionscallsStateJoinTest::testEncodeSharesTermsAndDistinguishesValuescallsStateJoinTest::testFingerprintIgnoresObjectSharingAndKeepsArrayOrdercallsStateJoinTest::testLimitGroupsIndependentProgramPointsBeforeApplyingTheBudgetcallsStateJoinTest::testLimitJoinsExcessPathsThatDifferOnlyInPlainValuescallsStateJoinTest::testLimitKeepsClustersWithinTheBudgetAndSealsTheStorageOfTheRestcallsStateJoinTest::testLimitPassesCompletedResidualsThroughcallsStateJoinTest::testOrderKeyIgnoresEvidenceMultiplicityButRetainsScalarTypescallsStateJoinTest::testSealKeepsTheRootsOfEverySealedPathcalls
Other tests reaching this symbol 138
ResultRefTestcallsSnapshotTestcallsStatisticsTestcallsDeriverConfigTestcallsArrayFunctionsTestcallsFunctionEvaluatorTestcallsLibraryTestcallsScalarFunctionsTestcallsTypePredicatesTestcallsCallDecisionTestcallsCallDescriptionTestcallsCallDescriptorTestcallsEvaluatorsTestcallsActionTestcallsExpressionTestcallsPlanCompilerTestcallsSemanticPlanTestcallsParameterTestcallsSignatureTestcallsLatticeTestcallsFrontierTestcallsAllocationTestcallsArgumentBindingTestcallsArgumentOrderTestcallsCallExecutorTestcallsCallResolutionTestcallsBindingTestcallsCaptureTestcallsAccessTestcallsInvocationTestcallsMethodInvocationTestcallsInvocationTestcallsParameterBindingTestcallsPassedArgumentTestcallsArgumentsTestcallsCreationTestcallsMethodsTestcallsResolutionTestcallsUnpackTestcallsTypeBindingTestcallsTypeCheckTestcallsUnknownCallTestcallsAlternativeTestcallsAssessmentTestcallsCompletionTestcallsExceptionalTestcallsConstraintsTestcallsContextTestcallsCollectionCallsTestcallsHandlerTestcallsIterationStepTestcallsIteratorCursorTestcallsLoopConvergenceTestcallsPathJoinTestcallsUnwindingTestcallsEvaluatorTestcallsHavocTestcallsInstructionTransferTestcallsLocationTestcallsMemoryTestcallsObservationCollectorTestcallsProtocolTestcallsTransferTestcallsConversionsTestcallsCountableCallsTestcallsScalarErrorsTestcallsStateTestcallsEvaluationTestcallsInvocationTestcallsDerivationTestcallsExplanationTestcallsCallableTransferTestcallsCompoundAssignmentTestcallsConstantTransferTestcallsIntrinsicTransferTestcallsMemoryStepTestcallsObjectAccessTestcallsPropertyAccessCheckTestcallsPropertyMagicTestcallsPropertyReferenceTestcallsPropertyTransferTestcallsPureStepTestcallsReferenceAssignmentTestcallsProjectionTestcallsBudgetTestcallsEntryPointTestcallsObservationTestcallsQueryScopeTestcallsReturnQueryTestcallsStateQueryTestcallsTupleQueryTestcallsValueQueryTestcallsArithmeticTestcallsArraysTestcallsComparisonTestcallsOperationsTestcallsTargetProfileTestcallsTermTestcallsDerivationResultTestcallsQueryExecutionTestcallsResultAssessmentTestcallsValueGraphTestcallsAggregateLoweringTestcallsAssignmentLoweringTestcallsCallLoweringTestcallsConditionalLoweringTestcallsDestructuringLoweringTestcallsExceptionLoweringTestcallsGotoLoweringTestcallsLoopLoweringTestcallsMatchLoweringTestcallsStaticLoweringTestcallsSwitchLoweringTestcallsCallableSourceTestcallsIndexerTestcallsIndexTestcallsClassDeclarationTestcallsPropertyDeclarationTestcallsSymbolRefTestcallsEffectInspectionTestcallsExpressionLoweringTestcallsArgumentTestcallsBasicBlockTestcallsCallableGraphTestcallsCatchTargetTestcallsExceptionRegionTestcallsExpressionRefTestcallsInstructionTestcallsParameterTestcallsPointRefTestcallsTerminatorTestcallsDispatchTestcallsInstructionEmitterTestcallsLowererTestcallsLoweringScopeTestcallsStatementLoweringTestcallsCallObservationsTestcallsDeriverTestcalls
Relations§
Instantiated in 8
- new Deriver\Deriver\Evaluator\Execution\Call\Preparation\Unpack::apply() packages/deriver/src/Deriver/Evaluator/Execution/Call/Preparation/Unpack.php:66
- new Deriver\Deriver\Evaluator\Execution\Control\CollectionCalls::apply() packages/deriver/src/Deriver/Evaluator/Execution/Control/CollectionCalls.php:66
- new Deriver\Deriver\Evaluator\Execution\Control\PathJoin::structure() packages/deriver/src/Deriver/Evaluator/Execution/Control/PathJoin.php:159
- new Deriver\Deriver\Evaluator\Execution\Control\PathJoin::common() packages/deriver/src/Deriver/Evaluator/Execution/Control/PathJoin.php:170
- new Deriver\Deriver\Evaluator\Execution\Evaluator::execute() packages/deriver/src/Deriver/Evaluator/Execution/Evaluator.php:108
- new Deriver\Deriver\Evaluator\Execution\Evaluator::execute() packages/deriver/src/Deriver/Evaluator/Execution/Evaluator.php:109
- new Deriver\Deriver\Evaluator\Execution\Evaluator::block() packages/deriver/src/Deriver/Evaluator/Execution/Evaluator.php:178
- new Deriver\Deriver\Evaluator\Execution\Evaluator::block() packages/deriver/src/Deriver/Evaluator/Execution/Evaluator.php:185
Method calls 9
- method-call Deriver\Deriver\Evaluator\Execution\Call\Preparation\Unpack::apply() packages/deriver/src/Deriver/Evaluator/Execution/Call/Preparation/Unpack.php:66
- method-call Deriver\Deriver\Evaluator\Execution\Control\CollectionCalls::apply() packages/deriver/src/Deriver/Evaluator/Execution/Control/CollectionCalls.php:66
- method-call Deriver\Deriver\Evaluator\Execution\Control\PathJoin::structure() packages/deriver/src/Deriver/Evaluator/Execution/Control/PathJoin.php:159
- method-call Deriver\Deriver\Evaluator\Execution\Control\PathJoin::common() packages/deriver/src/Deriver/Evaluator/Execution/Control/PathJoin.php:178
- method-call Deriver\Deriver\Evaluator\Execution\Control\PathJoin::common() packages/deriver/src/Deriver/Evaluator/Execution/Control/PathJoin.php:179
- method-call Deriver\Deriver\Evaluator\Execution\Evaluator::execute() packages/deriver/src/Deriver/Evaluator/Execution/Evaluator.php:108
- method-call Deriver\Deriver\Evaluator\Execution\Evaluator::execute() packages/deriver/src/Deriver/Evaluator/Execution/Evaluator.php:109
- method-call Deriver\Deriver\Evaluator\Execution\Evaluator::block() packages/deriver/src/Deriver/Evaluator/Execution/Evaluator.php:178
- method-call Deriver\Deriver\Evaluator\Execution\Evaluator::block() packages/deriver/src/Deriver/Evaluator/Execution/Evaluator.php:185