Running word-RAM programs over a larger basis #
A map of bases φ : B.Hom B' (Cslib.WordRAM.Basis.Hom) sends every operation of B to an
operation of B' with the same meaning at every word size. Replacing each operation of a program
by its image (Cslib.WordRAM.Program.mapOp, Cslib.WordRAM.Code.mapOp) leaves every other
instruction in place, so the translated program takes exactly the same steps: the same states,
faults, outputs and instruction counts (Cslib.WordRAM.step_mapOp). Decision procedures and
the classes of Cslib.WordRAM.LinearTime and Cslib.WordRAM.PolynomialTime therefore grow with
the basis. This is the word-RAM analogue of translating circuits along a map of signatures
(Cslib.Circuits.Circuit.mapOp), with a budget of one instruction for every operation.
A result proved over a small basis thus holds over every basis containing it: over
Cslib.WordRAM.Basis.standard, and over any other basis that interprets the same operations in the
same way. The converse direction, simulating an operation by a program over a smaller basis with an
instruction budget, is not formalized here.
Main definitions #
Cslib.WordRAM.Op.mapOp,Cslib.WordRAM.Instr.mapOp,Cslib.WordRAM.Program.mapOp,Cslib.WordRAM.Code.mapOp: translation along a map of bases.
Main results #
Cslib.WordRAM.Op.eval_mapOp,Cslib.WordRAM.step_mapOp: translated instructions have the same effect.Cslib.WordRAM.executes_mapOp_iff,Cslib.WordRAM.Exec.mapOp: translated programs halt in the same way, with the same instruction count.Cslib.WordRAM.Code.assemble_mapOp: translation commutes with assembly.Cslib.WordRAM.DecidableInTime.mapOp,Cslib.WordRAM.LinearTime.mapOp,Cslib.WordRAM.PolynomialTime.mapOp: decision transfers to a larger basis with the same time bound and word-size threshold.
References #
Instructions #
A translated data instruction reads the word size only if the instruction does.
A translated program reads the word size only if the program does.
A translated structured program reads the word size only if the program does.
Runs #
Structured programs #
Decision #
Translate each member of a width-indexed family.
Instances For
Translation preserves the code-length bound.
Translation preserves family decision at the same width and instruction count.
Nonuniform decision grows with the operation basis, preserving code length.
Uniform decision grows with the operation basis.
Linear time over a basis is linear time over every larger basis.
Uniform linear time grows with the operation basis.
Polynomial time over a basis is polynomial time over every larger basis.
Uniform polynomial time grows with the operation basis.