URM Basic Lemmas #
This file contains basic lemmas and helper operations for URM types.
Main definitions #
Instr.IsJump: predicate for jump instructionsInstr.JumpsBoundedBy: checks if jump targets are boundedInstr.capJump: caps jump targets to a given length
Main results #
Regs.write_read_self,Regs.write_read_of_ne: register read/write lemmasState.isHalted_iff,State.ext: state lemmasJumpsBoundedBy.mono: bounded jumps are monotonic in the boundJumpsBoundedBy.shiftJumps: shifting preserves bounded jumpsProgram.mem_maxRegister: instruction maxRegister bounded by program maxRegister
Register Lemmas #
State Lemmas #
Instruction Lemmas #
Jump Instructions #
An instruction is a jump instruction.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Z instruction is not a jump.
S instruction is not a jump.
T instruction is not a jump.
J instruction is a jump.
shiftJumps is identity for non-jumping instructions.
Bounded Jump Targets #
An instruction's jump target is bounded by a given length. Non-jump instructions trivially satisfy this.
Equations
- Cslib.URM.Instr.JumpsBoundedBy len (Cslib.URM.Instr.J a a_1 a_2) = (a_2 ⤠len)
- Cslib.URM.Instr.JumpsBoundedBy len xā = True
Instances For
Equations
- One or more equations did not get rendered due to their size.
Non-jumping instructions have bounded jumps for any length.
JumpsBoundedBy is monotonic: if bounded for len1, then bounded for any len2 ā„ len1.
shiftJumps preserves bounded jumps with adjusted bound.
Jump Target Capping #
Cap a jump target to be at most len. Non-jump instructions are unchanged.
Equations
- Cslib.URM.Instr.capJump len (Cslib.URM.Instr.Z n) = Cslib.URM.Instr.Z n
- Cslib.URM.Instr.capJump len (Cslib.URM.Instr.S n) = Cslib.URM.Instr.S n
- Cslib.URM.Instr.capJump len (Cslib.URM.Instr.T m n) = Cslib.URM.Instr.T m n
- Cslib.URM.Instr.capJump len (Cslib.URM.Instr.J m n q) = Cslib.URM.Instr.J m n (min q len)
Instances For
capJump always produces an instruction with bounded jump.
capJump is idempotent: capping twice is the same as capping once.
Any instruction in a program has maxRegister at most the program's maxRegister.