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