Proof: Do Stack At Unchanged 68
Let's prove the following theorem:
if the following are true:
- expression state at time 68 = "return"
- stack at time 68 = [ program context with variables: [ entry p: (Python reference 0), [ ] ] and expression state: (expression state with parent stack: [ ] arguments: [ ] values: [ ] line: 9 tab: 0) and control map: [ entry 0: (pair ("class", "Person")), [ ] ], [ ] ]
then stack at time 69 = [ program context with variables: [ entry p: (Python reference 0), [ ] ] and expression state: (expression state with parent stack: [ ] arguments: [ ] values: [ ] line: 9 tab: 0) and control map: [ entry 0: (pair ("class", "Person")), [ ] ], [ ] ]
Proof:
Given
1 | expression state at time 68 = "return" |
---|---|
2 | stack at time 68 = [ program context with variables: [ entry p: (Python reference 0), [ ] ] and expression state: (expression state with parent stack: [ ] arguments: [ ] values: [ ] line: 9 tab: 0) and control map: [ entry 0: (pair ("class", "Person")), [ ] ], [ ] ] |
# | Claim | Reason |
---|---|---|
1 | stack at time (68 + 1) = stack at time 68 | if expression state at time 68 = "return", then stack at time (68 + 1) = stack at time 68 |
2 | stack at time (68 + 1) = [ program context with variables: [ entry p: (Python reference 0), [ ] ] and expression state: (expression state with parent stack: [ ] arguments: [ ] values: [ ] line: 9 tab: 0) and control map: [ entry 0: (pair ("class", "Person")), [ ] ], [ ] ] | if stack at time (68 + 1) = stack at time 68 and stack at time 68 = [ program context with variables: [ entry p: (Python reference 0), [ ] ] and expression state: (expression state with parent stack: [ ] arguments: [ ] values: [ ] line: 9 tab: 0) and control map: [ entry 0: (pair ("class", "Person")), [ ] ], [ ] ], then stack at time (68 + 1) = [ program context with variables: [ entry p: (Python reference 0), [ ] ] and expression state: (expression state with parent stack: [ ] arguments: [ ] values: [ ] line: 9 tab: 0) and control map: [ entry 0: (pair ("class", "Person")), [ ] ], [ ] ] |
3 | 68 + 1 = 69 | 68 + 1 = 69 |
4 | stack at time (68 + 1) = stack at time 69 | if 68 + 1 = 69, then stack at time (68 + 1) = stack at time 69 |
5 | stack at time 69 = [ program context with variables: [ entry p: (Python reference 0), [ ] ] and expression state: (expression state with parent stack: [ ] arguments: [ ] values: [ ] line: 9 tab: 0) and control map: [ entry 0: (pair ("class", "Person")), [ ] ], [ ] ] | if stack at time (68 + 1) = stack at time 69 and stack at time (68 + 1) = [ program context with variables: [ entry p: (Python reference 0), [ ] ] and expression state: (expression state with parent stack: [ ] arguments: [ ] values: [ ] line: 9 tab: 0) and control map: [ entry 0: (pair ("class", "Person")), [ ] ], [ ] ], then stack at time 69 = [ program context with variables: [ entry p: (Python reference 0), [ ] ] and expression state: (expression state with parent stack: [ ] arguments: [ ] values: [ ] line: 9 tab: 0) and control map: [ entry 0: (pair ("class", "Person")), [ ] ], [ ] ] |
Comments
Please log in to add comments