Proof: Get Begin Expr Value 28
Let's prove the following theorem:
if the following are true:
- expression state at time 28 = "begin_expr"
- the expression at time 28 =
__setitem__(locations, "ES", "Spain")
- Value Stack at time 28 = [ ]
then Value Stack at time 29 = [ [ ], [ ] ]
Proof:
Given
1 | expression state at time 28 = "begin_expr" |
---|---|
2 | the expression at time 28 = __setitem__(locations, "ES", "Spain") |
3 | Value Stack at time 28 = [ ] |
# | Claim | Reason |
---|---|---|
1 | Value Stack at time (28 + 1) = [ [ ], Value Stack at time 28 ] | if expression state at time 28 = "begin_expr" and the expression at time 28 = __setitem__(locations, "ES", "Spain") , then Value Stack at time (28 + 1) = [ [ ], Value Stack at time 28 ] |
2 | [ [ ], Value Stack at time 28 ] = [ [ ], [ ] ] | if Value Stack at time 28 = [ ], then [ [ ], Value Stack at time 28 ] = [ [ ], [ ] ] |
3 | Value Stack at time (28 + 1) = [ [ ], [ ] ] | if Value Stack at time (28 + 1) = [ [ ], Value Stack at time 28 ] and [ [ ], Value Stack at time 28 ] = [ [ ], [ ] ], then Value Stack at time (28 + 1) = [ [ ], [ ] ] |
4 | 28 + 1 = 29 | 28 + 1 = 29 |
5 | Value Stack at time (28 + 1) = Value Stack at time 29 | if 28 + 1 = 29, then Value Stack at time (28 + 1) = Value Stack at time 29 |
6 | Value Stack at time 29 = [ [ ], [ ] ] | if Value Stack at time (28 + 1) = Value Stack at time 29 and Value Stack at time (28 + 1) = [ [ ], [ ] ], then Value Stack at time 29 = [ [ ], [ ] ] |
Comments
Please log in to add comments