Observation laws for randomized loop segments #
LoopSegmentLaw packages the existing LoopSegment execution relation with an exact observation
law, a supported-path instruction bound and a pathwise random-query bound. The witness still
contains the complete joint distribution of native data and instruction count. No additional
execution semantics or expected-time relaxation is introduced.
Segments may stop while the loop condition still holds. Closing a segment into a complete loop requires the explicit exit postcondition and charges the final two instructions.
Main definitions #
Cslib.WordRAM.LoopSegmentLaw: an observation law for an existing loop segment.
Main results #
LoopSegmentLaw.single,LoopSegmentLaw.trans: compose exact observation laws and path budgets.LoopSegmentLaw.finish: obtain the existingExecRandLawfor the completed loop.
References #
Original packaging of the existing LoopSegment and ExecRandLaw interfaces.
A finite loop segment using at most T instructions on every supported path, with a pathwise
random-call bound and the exact law of an observation of its final data.
Zero iterations observe the starting data and use no instructions or random calls.
Enlarge budgets and weaken the supported-path postcondition.
Rewrite only the exact observation law.
A single active body execution pays the existing two-instruction loop-header allowance.
Segment laws compose through the observed intermediate state. The continuation witness is chosen per state; no uniqueness of partial loop segments is assumed.
An explicit supported exit condition closes the loop and pays its final exit check.