Proof: Write Test Call End in Block 10
Let's prove the following theorem:
if the following are true:
- the line at time 10 = 1
- the tab at time 10 = 0
- statement at line 1, tab 0 =
if __eq__(1, 3):
- expression state at time 10 = "end_expr"
- Return Value at time 10 = False
- Control Map at time 10 = [ ]
then Control Map at time 11 = [ pair ("if", False), [ ] ]
Proof:
Given
1 | the line at time 10 = 1 |
---|---|
2 | the tab at time 10 = 0 |
3 | statement at line 1, tab 0 = if __eq__(1, 3): |
4 | expression state at time 10 = "end_expr" |
5 | Return Value at time 10 = False |
6 | Control Map at time 10 = [ ] |
# | Claim | Reason |
---|---|---|
1 | Control Map at time (10 + 1) = [ pair ("if", False), Control Map at time 10 ] | if the line at time 10 = 1 and the tab at time 10 = 0 and statement at line 1, tab 0 = if __eq__(1, 3): and expression state at time 10 = "end_expr" and Return Value at time 10 = False, then Control Map at time (10 + 1) = [ pair ("if", False), Control Map at time 10 ] |
2 | [ pair ("if", False), Control Map at time 10 ] = [ pair ("if", False), [ ] ] | if Control Map at time 10 = [ ], then [ pair ("if", False), Control Map at time 10 ] = [ pair ("if", False), [ ] ] |
3 | Control Map at time (10 + 1) = [ pair ("if", False), [ ] ] | if Control Map at time (10 + 1) = [ pair ("if", False), Control Map at time 10 ] and [ pair ("if", False), Control Map at time 10 ] = [ pair ("if", False), [ ] ], then Control Map at time (10 + 1) = [ pair ("if", False), [ ] ] |
4 | 10 + 1 = 11 | 10 + 1 = 11 |
5 | Control Map at time (10 + 1) = Control Map at time 11 | if 10 + 1 = 11, then Control Map at time (10 + 1) = Control Map at time 11 |
6 | Control Map at time 11 = [ pair ("if", False), [ ] ] | if Control Map at time (10 + 1) = Control Map at time 11 and Control Map at time (10 + 1) = [ pair ("if", False), [ ] ], then Control Map at time 11 = [ pair ("if", False), [ ] ] |
Comments
Please log in to add comments