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