Proof: Addi Zero Insn 5
Let's prove the following theorem:
if the following are true:
- instruction #11 is
addi dst=3 src=0 imm=3
- the PC at time 5 = 11
then value of cell 3 at time 6 = 3
Proof:
Given
1 | instruction #11 is addi dst=3 src=0 imm=3 |
---|---|
2 | the PC at time 5 = 11 |
# | Claim | Reason |
---|---|---|
1 | value of cell 3 at time (5 + 1) = 3 | if instruction #11 is addi dst=3 src=0 imm=3 and the PC at time 5 = 11, then value of cell 3 at time (5 + 1) = 3 |
2 | 5 + 1 = 6 | 5 + 1 = 6 |
3 | value of cell 3 at time (5 + 1) = value of cell 3 at time 6 | if 5 + 1 = 6, then value of cell 3 at time (5 + 1) = value of cell 3 at time 6 |
4 | value of cell 3 at time 6 = 3 | if value of cell 3 at time (5 + 1) = value of cell 3 at time 6 and value of cell 3 at time (5 + 1) = 3, then value of cell 3 at time 6 = 3 |
Comments
Please log in to add comments