Proof: Jump Register Help 20
Let's prove the following theorem:
if the following are true:
- instruction #7 is
jumpr addr=2 - the PC at time 20 = 7
- value of cell 2 at time 20 = 21
then the PC at time 21 = 21
Proof:
Given
| 1 | instruction #7 is jumpr addr=2 |
|---|---|
| 2 | the PC at time 20 = 7 |
| 3 | value of cell 2 at time 20 = 21 |
| # | Claim | Reason |
|---|---|---|
| 1 | the PC at time (20 + 1) = value of cell 2 at time 20 | if instruction #7 is jumpr addr=2 and the PC at time 20 = 7, then the PC at time (20 + 1) = value of cell 2 at time 20 |
| 2 | 20 + 1 = 21 | 20 + 1 = 21 |
| 3 | the PC at time (20 + 1) = the PC at time 21 | if 20 + 1 = 21, then the PC at time (20 + 1) = the PC at time 21 |
| 4 | the PC at time 21 = 21 | if the PC at time (20 + 1) = value of cell 2 at time 20 and the PC at time (20 + 1) = the PC at time 21 and value of cell 2 at time 20 = 21, then the PC at time 21 = 21 |
Comments
Please log in to add comments