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