Proof: Write Skip Line Control Map At 58
Let's prove the following theorem:
if the following are true:
- the line at time 58 = 3
- the tab at time 58 = 0
- statement at line 3, tab 1 =
a = __add__(a, 1)
- Control Map at time 58 = [ entry 0: (pair ("while", 2)), [ ] ]
then Control Map at time 59 = [ entry 0: (pair ("while", 2)), [ ] ]
Proof:
Given
1 | the line at time 58 = 3 |
---|---|
2 | the tab at time 58 = 0 |
3 | statement at line 3, tab 1 = a = __add__(a, 1) |
4 | Control Map at time 58 = [ entry 0: (pair ("while", 2)), [ ] ] |
# | Claim | Reason |
---|---|---|
1 | 1 > 0 | 1 > 0 |
2 | Control Map at time (58 + 1) = Control Map at time 58 | if the line at time 58 = 3 and the tab at time 58 = 0 and statement at line 3, tab 1 = a = __add__(a, 1) and 1 > 0, then Control Map at time (58 + 1) = Control Map at time 58 |
3 | Control Map at time (58 + 1) = [ entry 0: (pair ("while", 2)), [ ] ] | if Control Map at time (58 + 1) = Control Map at time 58 and Control Map at time 58 = [ entry 0: (pair ("while", 2)), [ ] ], then Control Map at time (58 + 1) = [ entry 0: (pair ("while", 2)), [ ] ] |
4 | 58 + 1 = 59 | 58 + 1 = 59 |
5 | Control Map at time (58 + 1) = Control Map at time 59 | if 58 + 1 = 59, then Control Map at time (58 + 1) = Control Map at time 59 |
6 | Control Map at time 59 = [ entry 0: (pair ("while", 2)), [ ] ] | if Control Map at time (58 + 1) = Control Map at time 59 and Control Map at time (58 + 1) = [ entry 0: (pair ("while", 2)), [ ] ], then Control Map at time 59 = [ entry 0: (pair ("while", 2)), [ ] ] |
Comments
Please log in to add comments