Proof: Write Stmt Control Map At Unchanged Expr57
Let's prove the following theorem:
if the following are true:
- the line at time 57 = 2
- the tab at time 57 = 0
- statement at line 2, tab 0 =
while __lt__(a, 2):
- expression state at time 57 = "end_expr"
- Control Map at time 57 = [ entry 0: (pair ("while", 2)), [ ] ]
- Return Value at time 57 = False
then Control Map at time 58 = [ entry 0: (pair ("while", 2)), [ ] ]
Proof:
Given
1 | the line at time 57 = 2 |
---|---|
2 | the tab at time 57 = 0 |
3 | statement at line 2, tab 0 = while __lt__(a, 2): |
4 | expression state at time 57 = "end_expr" |
5 | Control Map at time 57 = [ entry 0: (pair ("while", 2)), [ ] ] |
6 | Return Value at time 57 = False |
# | Claim | Reason |
---|---|---|
1 | Control Map at time (57 + 1) = Control Map at time 57 | if the line at time 57 = 2 and the tab at time 57 = 0 and statement at line 2, tab 0 = while __lt__(a, 2): and expression state at time 57 = "end_expr" and Return Value at time 57 = False, then Control Map at time (57 + 1) = Control Map at time 57 |
2 | Control Map at time (57 + 1) = [ entry 0: (pair ("while", 2)), [ ] ] | if Control Map at time (57 + 1) = Control Map at time 57 and Control Map at time 57 = [ entry 0: (pair ("while", 2)), [ ] ], then Control Map at time (57 + 1) = [ entry 0: (pair ("while", 2)), [ ] ] |
3 | 57 + 1 = 58 | 57 + 1 = 58 |
4 | Control Map at time (57 + 1) = Control Map at time 58 | if 57 + 1 = 58, then Control Map at time (57 + 1) = Control Map at time 58 |
5 | Control Map at time 58 = [ entry 0: (pair ("while", 2)), [ ] ] | if Control Map at time (57 + 1) = Control Map at time 58 and Control Map at time (57 + 1) = [ entry 0: (pair ("while", 2)), [ ] ], then Control Map at time 58 = [ entry 0: (pair ("while", 2)), [ ] ] |
Comments
Please log in to add comments