Proof: Pc 16
Let's prove the following theorem:
if the following are true:
- instruction #2 is
addi dst=5 src=5 imm=1 - the PC at time 16 = 2
then the PC at time 17 = 3
Proof:
Given
| 1 | instruction #2 is addi dst=5 src=5 imm=1 |
|---|---|
| 2 | the PC at time 16 = 2 |
| # | Claim | Reason |
|---|---|---|
| 1 | the PC at time (16 + 1) = 2 + 1 | if instruction #2 is addi dst=5 src=5 imm=1 and the PC at time 16 = 2, then the PC at time (16 + 1) = 2 + 1 |
| 2 | 16 + 1 = 17 | 16 + 1 = 17 |
| 3 | 2 + 1 = 3 | 2 + 1 = 3 |
| 4 | the PC at time (16 + 1) = the PC at time 17 | if 16 + 1 = 17, then the PC at time (16 + 1) = the PC at time 17 |
| 5 | the PC at time 17 = 3 | if the PC at time (16 + 1) = 2 + 1 and the PC at time (16 + 1) = the PC at time 17 and 2 + 1 = 3, then the PC at time 17 = 3 |
Comments
Please log in to add comments