classPending
final class Pending
One path being walked back from a call: what it passed through, and what it still needs.
The steps are held nearest-first, in the order the walk finds them, and turned around only when the path is run. What is still needed is the set of names no step on the path has defined yet; when it is empty, nothing earlier in the program can change the argument and the walk along this path is done.
Properties§
public list<SliceStep> $stepspublic array<string, true> $needspublic bool $truncated = falsepublic bool $exhausted = falseMethods§
public function __construct(
public list<SliceStep> $steps,
public array<string, true> $needs,
public bool $truncated = false,
public bool $exhausted = false,
)Parameters
$steps | list<SliceStep> | The steps found so far, nearest to the call first |
$needs | array<string, true> | The names nothing on the path has defined yet |
$truncated | bool | Whether a bound cut the path short of every way it could have gone |
$exhausted | bool | Whether the budget ran out before the path was walked to its start |
public static function needing(array<string, true> $needs): selfA path that has gone nowhere yet, needing the given names.
Parameters
$needs | array<string, true> |
Returns
selfTest cases 47
DeriverTest::testRunGivesOneSolutionPerArrivalWithOneValuePerGoalcallsDeriverTest::testRunKeepsNoMoreSolutionsThanTheLimitcallsDeriverTest::testRunMarksSolutionsTruncatedWhenTheirPathWasCutShortcallsEntryBinderTest::testBindingsBindEachPropertyOfThisToEveryValueTheClassLeavesItcallsEntryBinderTest::testBindingsLeaveThePropertiesAloneWhereThereIsNoObjectcallsEntryBinderTest::testBindingsLeaveThePropertiesAloneWithoutAReaderOfPropertyWritescallsEntryBinderTest::testBindingsLeaveThePropertiesOpenOnAPathTheBudgetStoppedcallsEntryBinderTest::testParameterBindingsBindMethodParametersFromCallsOnInstancesOfTheClasscallsEntryBinderTest::testParameterBindingsBlameTheBudgetWhenLookingForCallersSpentItcallsEntryBinderTest::testParameterBindingsFollowEveryCallerOfTheBodycallsEntryBinderTest::testParameterBindingsLeaveAParameterNothingCallsOpencallsEntryBinderTest::testParameterBindingsLeaveAParameterOpenOnceTheBudgetIsSpentcallsEntryBinderTest::testParameterBindingsLeaveEverythingOpenOnAPathTheBudgetStoppedcallsEntryBinderTest::testParameterBindingsLeaveTheParameterOpenAndCutShortWhenNoCallCanBeConfirmedcallsEntryBinderTest::testParameterBindingsLeaveTheParameterOpenWithoutCuttingShortWhenNothingCallsItcallsEntryBinderTest::testParameterBindingsMarkUndefinedLocalsAbsentWithoutAskingCallerscallsEntryBinderTest::testParameterBindingsReadWhatTheTopOfAFileIsDeclaredToHoldcallsEntryBinderTest::testParameterBindingsStopAtTheDepthLimitcallsArrivalTest::testAnArrivalAtTheTopOfAFileHasNoBodycallsArrivalTest::testAnArrivalNamesTheBodyAndThePathThatReachedItsStartcallsAssignmentStepsTest::testDeclarationDefinesWhatAGlobalListsButKeepsLookingPastAnUnsetcallsAssignmentStepsTest::testOverWalksBackOverTheLastAssignmentFirstcallsAssignmentStepsTest::testWithinKeepsConditionalWritesTogethercallsBackwardSlicerTest::testAllDoneIsTrueOnlyWhenNoPathNeedsAnythingcallsBackwardSlicerTest::testArriveNamesTheNamedBodyAClosureIsWrittenIncallsBackwardSlicerTest::testBeforeAStatementNotInAnyListArrivesWhereItIscallsBackwardSlicerTest::testBeforeWalksBackOverTheStatementsAheadOfOnecallsBackwardSlicerTest::testBoundMergesRepeatsAndGathersPathsBeyondTheLimitcallsBackwardSlicerTest::testBranchHoldsSeveralRunsAsOneStepcallsBackwardSlicerTest::testLeaveCarriesAFinallyBlockOverItsTryBlockcallsBackwardSlicerTest::testLeaveCarriesPathsOutOfTheirOwnercallsBackwardSlicerTest::testLeaveClosureTakesOnlyTheUseListFromOutsidecallsBackwardSlicerTest::testOverStopsAPathOnceTheBudgetIsSpentcallsBackwardSlicerTest::testOverWalksDeclarationsBlocksLoopsAndConditionAssignmentscallsBackwardSlicerTest::testWalkListStopsOnceEveryPathIsDonecallsLoopPassesTest::testBindingIsAStepOnlyForAPathThatNeedsTheLoopsVariablescallsLoopPassesTest::testBoundSaysWhetherAPathTookOneOfTheLoopsPassescallsLoopPassesTest::testContinuesSaysWhetherAnotherPassCouldChangeWhatIsNeededcallsLoopPassesTest::testEnteringReadsWhatALoopGoesOverBeforeItsFirstPasscallsLoopPassesTest::testExpressionsWalkBackOverAListLastFirstcallsLoopPassesTest::testLeaveBodyFollowsAPointInsideALoopBackThroughEarlierPassescallsLoopPassesTest::testPassWalksBackOverOneWholePasscallsPendingTest::testCutAndExhaustMarkThePathcallsPendingTest::testIsDoneOnceNothingIsNeededOrTheBudgetStoppedItcallsPendingTest::testNeedingStartsAPathThatHasGoneNowherecallsPendingTest::testThenJoinsAPathThatStartedWhereThisOneStandscallsPendingTest::testThroughTakesOneStepFurtherBackcalls
Called from 6
- static-call SqlCatalog\Core\Analysis\Derivation\EntryBinder::parameterValues() packages/sql-catalog/src/Core/Analysis/Derivation/EntryBinder.php:165
- static-call SqlCatalog\Core\Analysis\Derivation\Objects\CallbackEffects::apply() packages/sql-catalog/src/Core/Analysis/Derivation/Objects/CallbackEffects.php:61
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::sliceFrom() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:77
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::sliceFromEnd() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:96
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::walkArms() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:323
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::runs() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:75
Calls 1
- new
selfline 40
public function through(SliceStep $step, array<string, true> $needs): selfThe path, one step further back.
Parameters
$step | SliceStep | |
$needs | array<string, true> | What the path needs once the step is taken |
Returns
selfCalled from 2
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\AssignmentSteps::declaration() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/AssignmentSteps.php:103
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::binding() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:162
public function then(self $further): selfThe path, followed further back by another path that started where this one stands.
Parameters
$further | self |
Returns
selfCalled from 1
public function cut(): selfpublic function exhaust(): selfpublic function isDone(): boolWhether nothing earlier can change what the path needs.
Returns
boolCalled from 2
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::binding() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:154
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::expressions() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:218
public function forward(): list<SliceStep>public function signature(): stringWhat tells this path apart from another that reached the same place.
Returns
stringpublic static function gather(non-empty-list<self> $paths): selfSeveral paths gathered into one, when there are more than it pays to keep apart.
The paths are kept as alternatives of a single step rather than joined value by value, so running it still runs each of them; what is given up is only keeping them apart from the paths that come before them.
Parameters
$paths | non-empty-list<self> |
Returns
selfTest cases 1
Called from 2
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::branch() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:347
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::bound() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:369
Calls 2
- new
selfline 136 - static-call SliceStep::either() line 136
Test cases 71§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 9
PendingTest::testCutAndExhaustMarkThePathcallsPendingTest::testExhaustMarksThePathStoppedByTheBudgetAndKeepsEverythingElsecallsPendingTest::testForwardTurnsTheStepsIntoTheOrderTheyRuncallsPendingTest::testGatherKeepsEveryPathAsAnAlternativeOfOneStepcallsPendingTest::testIsDoneOnceNothingIsNeededOrTheBudgetStoppedItcallsPendingTest::testNeedingStartsAPathThatHasGoneNowherecallsPendingTest::testSignatureTellsPathsApartByWhatTheyNeedAndWhatTheyPassedThroughcallsPendingTest::testThenJoinsAPathThatStartedWhereThisOneStandscallsPendingTest::testThroughTakesOneStepFurtherBackcalls
Other tests reaching this symbol 62
CatalogCommandTestcallsCallEvaluatorTestcallsCalleeReturnsTestcallsCallersTestcallsDeriverTest::testRunGivesOneSolutionPerArrivalWithOneValuePerGoalcallsDeriverTest::testRunKeepsNoMoreSolutionsThanTheLimitcallsDeriverTest::testRunKeepsReadingPastTheSearchBudgetOnlyAtDepthZerocallsDeriverTest::testRunMarksSolutionsTruncatedWhenTheirPathWasCutShortcallsDeriverTest::testRunReadsTheGoalsAfterRunningEachArrivalForwardcallsEntryBinderTest::testBindingsBindEachPropertyOfThisToEveryValueTheClassLeavesItcallsEntryBinderTest::testBindingsLeaveThePropertiesAloneWhereThereIsNoObjectcallsEntryBinderTest::testBindingsLeaveThePropertiesAloneWithoutAReaderOfPropertyWritescallsEntryBinderTest::testBindingsLeaveThePropertiesOpenOnAPathTheBudgetStoppedcallsEntryBinderTest::testParameterBindingsBindMethodParametersFromCallsOnInstancesOfTheClasscallsEntryBinderTest::testParameterBindingsBlameTheBudgetWhenLookingForCallersSpentItcallsEntryBinderTest::testParameterBindingsFollowEveryCallerOfTheBodycallsEntryBinderTest::testParameterBindingsLeaveAParameterNothingCallsOpencallsEntryBinderTest::testParameterBindingsLeaveAParameterOpenOnceTheBudgetIsSpentcallsEntryBinderTest::testParameterBindingsLeaveEverythingOpenOnAPathTheBudgetStoppedcallsEntryBinderTest::testParameterBindingsLeaveTheParameterOpenAndCutShortWhenNoCallCanBeConfirmedcallsEntryBinderTest::testParameterBindingsLeaveTheParameterOpenWithoutCuttingShortWhenNothingCallsItcallsEntryBinderTest::testParameterBindingsMarkUndefinedLocalsAbsentWithoutAskingCallerscallsEntryBinderTest::testParameterBindingsReadWhatTheTopOfAFileIsDeclaredToHoldcallsEntryBinderTest::testParameterBindingsStopAtTheDepthLimitcallsCallbackEffectsTestcallsPropertyWritesTestcallsArrivalTest::testAnArrivalAtTheTopOfAFileHasNoBodycallsArrivalTest::testAnArrivalNamesTheBodyAndThePathThatReachedItsStartcallsAssignmentStepsTest::testDeclarationDefinesWhatAGlobalListsButKeepsLookingPastAnUnsetcallsAssignmentStepsTest::testOverWalksBackOverTheLastAssignmentFirstcallsAssignmentStepsTest::testWithinKeepsConditionalWritesTogethercallsBackwardSlicerTest::testAllDoneIsTrueOnlyWhenNoPathNeedsAnythingcallsBackwardSlicerTest::testArriveNamesTheNamedBodyAClosureIsWrittenIncallsBackwardSlicerTest::testBeforeAStatementNotInAnyListArrivesWhereItIscallsBackwardSlicerTest::testBeforeWalksBackOverTheStatementsAheadOfOnecallsBackwardSlicerTest::testBoundMergesRepeatsAndGathersPathsBeyondTheLimitcallsBackwardSlicerTest::testBranchHoldsSeveralRunsAsOneStepcallsBackwardSlicerTest::testLeaveCarriesAFinallyBlockOverItsTryBlockcallsBackwardSlicerTest::testLeaveCarriesPathsOutOfTheirOwnercallsBackwardSlicerTest::testLeaveClosureTakesOnlyTheUseListFromOutsidecallsBackwardSlicerTest::testOverStopsAPathOnceTheBudgetIsSpentcallsBackwardSlicerTest::testOverWalksDeclarationsBlocksLoopsAndConditionAssignmentscallsBackwardSlicerTest::testWalkArmsWalksEachArmFromItsEndcallsBackwardSlicerTest::testWalkListStopsOnceEveryPathIsDonecallsLoopPassesTest::testBindingIsAStepOnlyForAPathThatNeedsTheLoopsVariablescallsLoopPassesTest::testBoundSaysWhetherAPathTookOneOfTheLoopsPassescallsLoopPassesTest::testContinuesSaysWhetherAnotherPassCouldChangeWhatIsNeededcallsLoopPassesTest::testEnteringReadsWhatALoopGoesOverBeforeItsFirstPasscallsLoopPassesTest::testExpressionsWalkBackOverAListLastFirstcallsLoopPassesTest::testLeaveBodyFollowsAPointInsideALoopBackThroughEarlierPassescallsLoopPassesTest::testPassWalksBackOverOneWholePasscallsLoopPassesTest::testRunsListTheStatementAfterEachNumberOfPassesUpToTheLimitcallsExpressionEvaluatorTestcallsInterpreterTestcallsModelQueriesTestcallsQueryModelInterfaceTestcallsBuilderQueriesTestcallsCallbackModelTestcallsCallModelTestcallsAnalyzerTestcallsJsonReporterTestcallsTextReporterTestcalls
Relations§
Instantiated in 1
Static calls 8
- static-call SqlCatalog\Core\Analysis\Derivation\EntryBinder::parameterValues() packages/sql-catalog/src/Core/Analysis/Derivation/EntryBinder.php:165
- static-call SqlCatalog\Core\Analysis\Derivation\Objects\CallbackEffects::apply() packages/sql-catalog/src/Core/Analysis/Derivation/Objects/CallbackEffects.php:61
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::sliceFrom() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:77
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::sliceFromEnd() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:96
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::walkArms() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:323
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::branch() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:347
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::bound() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:369
- static-call SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::runs() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:75
Method calls 8
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\AssignmentSteps::declaration() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/AssignmentSteps.php:103
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::over() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:280
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::branch() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:347
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::runs() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:92
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::leaveBody() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:108
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::binding() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:154
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::binding() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:162
- method-call SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::expressions() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:218
Type declarations 15
- type SqlCatalog\Core\Analysis\Derivation\Slice\Arrival packages/sql-catalog/src/Core/Analysis/Derivation/Slice/Arrival.php:22
- type SqlCatalog\Core\Analysis\Derivation\Slice\AssignmentSteps packages/sql-catalog/src/Core/Analysis/Derivation/Slice/AssignmentSteps.php:42
- type SqlCatalog\Core\Analysis\Derivation\Slice\AssignmentSteps packages/sql-catalog/src/Core/Analysis/Derivation/Slice/AssignmentSteps.php:95
- type SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::arrive() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:230
- type SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:277
- type SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer::over() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:306
- type SqlCatalog\Core\Analysis\Derivation\Slice\BackwardSlicer packages/sql-catalog/src/Core/Analysis/Derivation/Slice/BackwardSlicer.php:341
- type SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::runs() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:92
- type SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::leaveBody() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:104
- type SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::leaveBody() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:108
- type SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::pass() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:131
- type SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:152
- type SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::entering() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:186
- type SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:196
- type SqlCatalog\Core\Analysis\Derivation\Slice\LoopPasses::expressions() packages/sql-catalog/src/Core/Analysis/Derivation/Slice/LoopPasses.php:218