Proof: Byte 3 Stays the Same 13
Let's prove the following theorem:
if the following are true:
- instruction #5 is
beq left=3 right=4 imm=1
- the PC at time 13 = 5
- value of cell 3 at time 13 = 3
then value of cell 3 at time 14 = 3
Proof:
Given
1 | instruction #5 is beq left=3 right=4 imm=1 |
---|---|
2 | the PC at time 13 = 5 |
3 | value of cell 3 at time 13 = 3 |
# | Claim | Reason |
---|---|---|
1 | value of cell 3 at time (13 + 1) = value of cell 3 at time 13 | if instruction #5 is beq left=3 right=4 imm=1 and the PC at time 13 = 5, then value of cell 3 at time (13 + 1) = value of cell 3 at time 13 |
2 | 13 + 1 = 14 | 13 + 1 = 14 |
3 | value of cell 3 at time (13 + 1) = value of cell 3 at time 14 | if 13 + 1 = 14, then value of cell 3 at time (13 + 1) = value of cell 3 at time 14 |
4 | value of cell 3 at time 14 = value of cell 3 at time 13 | if value of cell 3 at time (13 + 1) = value of cell 3 at time 14 and value of cell 3 at time (13 + 1) = value of cell 3 at time 13, then value of cell 3 at time 14 = value of cell 3 at time 13 |
5 | value of cell 3 at time 14 = 3 | if value of cell 3 at time 14 = value of cell 3 at time 13 and value of cell 3 at time 13 = 3, then value of cell 3 at time 14 = 3 |
Comments
Please log in to add comments