classLoopConvergence
final class LoopConvergence
Restricted visibility: declared "@visibility Deriver\Deriver\Evaluator" and "@visibility Deriver\Deriver\Evaluator\Execution". Code outside that scope must not name this declaration.
Bounds precise loop expansion and retains an explicit residual state.
Properties§
public Context $contextMethods§
public function widen(CallableGraph $callable, State $state): boolWidens an unbounded loop instead of reporting its first iterations as exhaustive.
Parameters
$callable | CallableGraph | Current callable |
$state | State | Loop header entry |
Returns
bool Whether the loop was replaced by a residual exitCalled from 1
Calls 11
- new Lattice line 45
- method-call LoopConvergence::structure() line 46
- function-call
array_uniqueline 50 - function-call
array_keysline 50 - new Term line 51
- class-const TermKind::Uninitialized() line 51
- method-call Lattice::contains() line 53
- method-call Lattice::widen() line 54
- method-call Context::frontier() line 60
- method-call Havoc::symbols() line 66
- new Havoc line 66
public function structure(State $state): stringHashes loop alias and cursor structure without expanding shared value subgraphs.
Parameters
$state | State | Loop header state |
Returns
string Alias and iteration identityCalled from 1
Calls 3
- method-call LoopConvergence::position() line 82
- function-call
hashline 84 - function-call
serializeline 84
public function position(IteratorCursor $iterator): intDistinguishes cursor positions only where they select a known entry. Positions past the known entries of an unknown iterable all read unknown entries, so they share one structure.
Parameters
$iterator | IteratorCursor | Loop cursor |
Returns
int Position, capped after the known entriesTest cases 1
Called from 1
Calls 5
- class-const TermKind::Array() line 96
- method-call Arrays::head() line 99
- new Arrays line 99
- function-call
minline 100 - function-call
countline 100
Test cases 16§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 14
LatticeTestcallsIterationStepTestcallsIteratorCursorTestcallsUnwindingTestcallsEvaluatorTestcallsInstructionTransferTestcallsTransferTestcallsEvaluationTestcallsArithmeticTestcallsAssignmentLoweringTestcallsDestructuringLoweringTestcallsLoopLoweringTestcallsTerminatorTestcallsInstructionEmitterTestcalls