Proof: Pc 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 the PC at time 3 = 9
Proof:
Given
1 | instruction #8 is addi dst=3 src=0 imm=2 |
---|---|
2 | the PC at time 2 = 8 |
# | Claim | Reason |
---|---|---|
1 | the PC at time (2 + 1) = 8 + 1 | if instruction #8 is addi dst=3 src=0 imm=2 and the PC at time 2 = 8, then the PC at time (2 + 1) = 8 + 1 |
2 | 2 + 1 = 3 | 2 + 1 = 3 |
3 | 8 + 1 = 9 | 8 + 1 = 9 |
4 | the PC at time (2 + 1) = the PC at time 3 | if 2 + 1 = 3, then the PC at time (2 + 1) = the PC at time 3 |
5 | the PC at time 3 = 9 | if the PC at time (2 + 1) = 8 + 1 and the PC at time (2 + 1) = the PC at time 3 and 8 + 1 = 9, then the PC at time 3 = 9 |
Comments
Please log in to add comments