Callback-action bounds for the controller #
The actual controller runs in OptionT (StateM σ): a callback can return either Boolean or
reject, while its state records the charge even on rejection. The chosen clock can count edge
calls, membership calls, or actions inside the callbacks. No correctness hypothesis on replies
or tallies is used. Every initial provider state is covered, including ties, rejecting calls
and fuel exhaustion.
Main results #
scanNextRound_clock: with edge costEand membership costM, a round costs at mostn * (M + n * (E + M)).runController_clock: at mostn³ * E + (n³ + n² + 1) * M, including the final target membership call. Thus edges cost at mostn³calls and membership at mostn³ + n² + 1.runController_scan_clock: composing the streaming membership scan gives the degree-five boundn³ + (n³ + n² + 1) * (n * (2*n + 2))on primitive callback actions.
These are bounds on the state clock, not physical runtime or workspace. In particular they
do not implement the callbacks or certify native halting; those obligations remain in #6747.
A primitive callback can record one action before returning a value or rejection. The weighted
bound also composes with a membership routine's own action bound. See the ordinary-import client
CslibFrontierTests.DoubleCountingControllerClock for separate counters and composition with
Scan.tallyM_clock.
Arbitrary replying or rejecting callbacks cost at most one membership test per vertex, then at most one edge and one membership test per predecessor. Tied rounds are covered.
A fuel-bounded run spends at most the round budget per unit of fuel, plus one terminal
membership budget. Only radii below limit need a membership certificate.
The actual controller uses at most n³ edge calls and n³+n²+1 membership calls.
Set (E,M) to (1,0) or (0,1) for separate counters; arbitrary weighted callback clocks
compose through the same statement. The final state includes charges on rejecting branches.
Composing the real membership scan costs at most a degree-five polynomial in n primitive
callback actions. Each inner selection, destination read and edge callback costs at most one;
the final tally check costs none. The outer edge query also costs at most one. Rejection retains
its charge. This composes action clocks, not physical runtime or native workspace.