Clocked machine execution as a typed program #
The transition-choice and query handlers express one machine run in the shared OracleComp
language. A deterministic handler returns its action; a fair-coin handler samples a bit and
selects that branch. The handlers are explicit semantic parameters: an arbitrary handler need
not be fair, efficient, or even respect the choices supplied by the transition table.
Each unit of fuel executes one table instruction. Submitting a query costs one instruction; writing its buffer and reading its reply cost ordinary instructions. The handler's internal computation is external to this clock. Resource predicates must fix the intended choice handler and separately account for substituted oracle implementations.
Clock exhaustion retains the entire configuration. Pausing and resuming, and replacing either handler by another program, preserve the program itself, hence its interaction with every stateful interpreter and the final private state.
The interpreter and proof patterns are adapted from the cslib crypto branch's fair-coin
interpreter at 5ff69ca93402e7c947208dc56396d6d86203ccd8 to the common choice mechanism and
the typed program interface of cslib PR #1129.
Main definitions #
Turing.MultiTapeMachine.runConfigFrom: a clocked run retaining all tapes and channels.Turing.MultiTapeMachine.runFrom,Turing.MultiTapeMachine.run: observe the output word.
Main results #
Turing.MultiTapeMachine.runConfigFrom_add: exact pause/resume equality of programs.Turing.MultiTapeMachine.interpret_runConfigFrom: interpretation commutes with execution.Turing.MultiTapeMachine.runConfigFrom_toTM: deterministic execution is the upstream run.
Unfold a bounded run, retaining the entire configuration on halting or clock exhaustion.
Instances For
Observe only the output word after a bounded execution.
Instances For
Run from blank work and communication tapes.
Instances For
Pausing and resuming preserves the entire program and uses the sum of the two clocks.
Resume a paused execution and then observe its output.
Substituting either handler commutes with clocked execution, before interpreting any effects. In particular, substitution does not reset the private state shared by calls.
Substituting handlers preserves the complete output program.
Every supported execution writes at most one output symbol per instruction, regardless of the sizes of oracle replies or the private state shared by the handlers.
Observing only the output preserves the supported-output bound.
The deterministic run program computes exactly the iterated deterministic step.
Removing the empty channels from a deterministic run program gives the upstream clocked run.