Shifting counter programs above a choice register #
A nondeterministic counter program reads its choice bit in register 0. Deterministic code
written for registers 0, 1, … runs unchanged inside such a program once each register i is
renamed to i + 1. Expr.shift and Instr.shift perform this renaming, keeping labels.
padded b code places code at label b of a standalone program, so that existing deterministic
correctness lemmas apply to it, and Reaches.unpad transfers their runs to the shifted copy placed
at the same label of another program, as oblivious runs that never read the choice.
Main definitions #
Turing.CounterProgram.Expr.shift,Turing.CounterProgram.Instr.shift: register renaming.Turing.CounterProgram.padded: code placed at a label after halting padding.
Main results #
Turing.CounterProgram.Reaches.shift: deterministic runs lift to shifted code.Turing.CounterProgram.Reaches.unpad: runs of padded code lift to its shifted placement.
Rename every register i to i + 1.
Instances For
Rename every register i to i + 1, keeping the labels.
Instances For
Deterministic runs of code lift to its shift, below a register c at most B.
A list of instructions placed at the label b, after halts.
Instances For
Unpadding: a deterministic run of code placed by padded is an oblivious run of its
shift placed in another program.