Function Context Stack at time s
each element in the stack contains the context of the running program at a particular scope
Format:
Context Stack at time s
Input:
Output:
Conditional properties that reference this function:
if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = Python list elements
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ Python list elements, ys ], rest ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ Python list elements, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = Python list elements
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = assign statement with target x and expression (Python list elements)
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = obj_name.method_name(args)
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = assign statement with target target and expression (obj_name.method_name(args))
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ obj_name.method_name(args), ys ], rest ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [
(link)obj.append(x)
, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time tif the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = obj.name(el)
- Expression Stack at time t = [ [ ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ function call with name: "__getitem__" and arguments: args, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ function call with name: "len" and arguments: args, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ name."pop"(args), ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ function call with name: "__contains__" and arguments: args, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ Python dictionary entries, ys ], rest ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ Python dictionary entries, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ entry key: value, ys ], rest ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ entry key: value, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = assign statement with target x and expression (Python dictionary elements)
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ function call with name: "__setitem__" and arguments: args, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = a class named name with bases: bases
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = pair ("class", class_name)
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = a method named method_name with parameters params
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ obj_name.method_name(args), ys ], rest ] ]
- value at obj_name in map (Variables Map at time t) = Python reference index
- the element at index index of stack (Python Object Store at time t) = Python object: [ entry "__class_name__": class_name, e_rest ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is method_name = params
- Parameters List at time t = None
- Value Stack at time t = [ values, v_stack ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- Return Value at time t = [ r, [ ] ]
- Expression Stack at time t = [ [ ], [ [ name.method(args), ys ], rest ] ]
- Value Stack at time t = [ next_level, other_levels ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = obj.mn(args)
- Expression Stack at time t = [ [ ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = assign statement with target x and expression (obj_name.method_name(args))
- Expression Stack at time t = [ [ ], [ ] ]
- Value Stack at time t = [ [ value, [ ] ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = assign statement with target x and expression (Python constructor with name: name and arguments: args)
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ Python constructor with name: class_name and arguments: args, ys ], rest ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ Python constructor with name: class_name and arguments: args, ys ], rest ] ]
- Value Stack at time t = [ evaluated, stack ]
- method parameters where the Class Map is (Class Map at time t), class name is class_name, and method name is "__init__" = params
- Parameters List at time t = None
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- Return Value at time t = [ r, [ ] ]
- Expression Stack at time t = [ [ ], [ [ Python constructor with name: clss_name and arguments: args, ys ], rest ] ]
- Value Stack at time t = [ next_level, other_levels ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = assign statement with target x and expression (Python constructor with name: class_name and arguments: args)
- Expression Stack at time t = [ [ ], [ ] ]
- Value Stack at time t = [ [ value, [ ] ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = assign statement with target x and expression (obj.attr)
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = assign statement with target x and expression (obj.attr)
- Expression Stack at time t = [ [ ], [ ] ]
- Value Stack at time t = [ [ value, [ ] ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ obj.attr, ys ], rest ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ obj.attr, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = obj.key = value
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ obj.key = value, [ ] ], [ ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ obj.attribute = val, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = x.y = z
- Expression Stack at time t = [ [ ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = pair ("method", mname)
- Context Stack at time t = [ program context with variables: varis and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
then Variables Map at time (t + 1) = varis
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = pair ("method", mname)
- Context Stack at time t = [ program context with variables: varis and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
then the line at time (t + 1) = line
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = pair ("method", mname)
- Context Stack at time t = [ program context with variables: varis and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
then the tab at time (t + 1) = tab
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = pair ("method", mname)
- Context Stack at time t = [ program context with variables: varis and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
then Expression Stack at time (t + 1) = expr_stack
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = pair ("method", mname)
- Context Stack at time t = [ program context with variables: varis and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
then Context Stack at time (t + 1) = rest
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = pair ("method", mname)
- Context Stack at time t = [ program context with variables: varis and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
then Value Stack at time (t + 1) = value_stack
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = pair ("method", mname)
- Context Stack at time t = [ program context with variables: varis and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
then Control Map at time (t + 1) = control_map
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
for target in iterable:
- iterable is a variable
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
for target in iterable:
- Expression Stack at time t = [ [ ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
for target in iterable_ex:
- value at j in map (Control Map at time t) = trio ("for", i, [ elem, rest ])
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
for target in iterable_ex:
- value at j in map (Control Map at time t) = trio ("for", i, [ ])
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = trio ("for", for_line, iterable)
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- number of lines = i - 1
- value at (j - 1) in map (Control Map at time t) = trio ("for", for_line, iterable)
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k > j
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = pair ("while", while_line)
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- number of lines = i - 1
- value at (j - 1) in map (Control Map at time t) = pair ("while", while_line)
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- number of lines = i - 1
- value at (j - 1) in map (Control Map at time t) = pair ("if", if_value)
then Context Stack at time (t + 1) = Context Stack at time t
(link)if "break" state at t = "breaking", then Context Stack at time (t + 1) = Context Stack at time t
(link)if "continue" state at t = "continuing", then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = c
- c is constant
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = x
- x is a variable
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = function call with name: name and arguments: args
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- Expression Stack at time t = [ [ x, ys ], rest ]
- Value Stack at time t = [ values, v_rest ]
- x is constant
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- Expression Stack at time t = [ [ x, ys ], rest ]
- Value Stack at time t = [ values, v_rest ]
- x is a variable
then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ function call with name: name and arguments: args, ys ], rest ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ function call with name: "__add__" and arguments: args, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ function call with name: "__mul__" and arguments: args, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ function call with name: "__eq__" and arguments: args, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ function call with name: "__lt__" and arguments: args, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Expression Stack at time t = [ [ ], [ [ function call with name: "__gt__" and arguments: args, ys ], rest ] ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- Expression Stack at time t = [ [ ], [ [ function call with name: name and arguments: args, ys ], rest ] ]
- Value Stack at time t = [ values, v_rest ]
- there is a function named name with parameters params at line line
- Parameters List at time t = None
then Context Stack at time (t + 1) = Context Stack at time t
(link)if Parameters List at time t = [ var, frest ], then Context Stack at time (t + 1) = Context Stack at time t
(link)if Parameters List at time t = [ ], then Context Stack at time (t + 1) = [ program context with variables: (Variables Map at time t) and expression state: (expression state with expression stack: (Expression Stack at time t) values: (Value Stack at time t) line: (the line at time t) tab: (the tab at time t)) and control map: (Control Map at time t), Context Stack at time t ]
(link)if the following are true:
- Return Value at time t = [ r, [ ] ]
- Expression Stack at time t = [ [ ], [ [ function call with name: name and arguments: args, ys ], rest ] ]
- Value Stack at time t = [ next_level, other_levels ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
target = expr
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
target = expr
- Expression Stack at time t = [ [ ], [ ] ]
- Value Stack at time t = [ [ value, [ ] ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
if expr:
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
if expr:
- Expression Stack at time t = [ [ ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
elif test:
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
elif test:
- value at j in map (Control Map at time t) = pair ("if", False)
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
elif test:
- value at j in map (Control Map at time t) = pair ("if", True)
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
elif test:
- Expression Stack at time t = [ [ ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
else:
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab k = s
- k < j
- value at (j - 1) in map (Control Map at time t) = pair ("if", if_value)
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
while test:
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
while test:
- Expression Stack at time t = [ [ ], [ ] ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
break
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
continue
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j = function definition where name: name and parameters: params
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
return rex
- Expression Stack at time t = [ ]
then Context Stack at time (t + 1) = Context Stack at time t
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
return rex
- Context Stack at time t = [ program context with variables: vars and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
- Expression Stack at time t = [ [ ], [ ] ]
then Variables Map at time (t + 1) = vars
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
return rex
- Context Stack at time t = [ program context with variables: vars and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
- Expression Stack at time t = [ [ ], [ ] ]
then the line at time (t + 1) = line
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
return rex
- Context Stack at time t = [ program context with variables: vars and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
- Expression Stack at time t = [ [ ], [ ] ]
then the tab at time (t + 1) = tab
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
return rex
- Context Stack at time t = [ program context with variables: vars and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
- Expression Stack at time t = [ [ ], [ ] ]
then Control Map at time (t + 1) = control_map
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
return rex
- Context Stack at time t = [ program context with variables: vars and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
- Expression Stack at time t = [ [ ], [ ] ]
then Context Stack at time (t + 1) = rest
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
return rex
- Context Stack at time t = [ program context with variables: vars and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
- Expression Stack at time t = [ [ ], [ ] ]
then Expression Stack at time (t + 1) = expr_stack
(link)if the following are true:
- the line at time t = i
- the tab at time t = j
- statement at line i, tab j =
return rex
- Context Stack at time t = [ program context with variables: vars and expression state: (expression state with expression stack: expr_stack values: value_stack line: line tab: tab) and control map: control_map, rest ]
- Expression Stack at time t = [ [ ], [ ] ]
then Value Stack at time (t + 1) = value_stack
(link)
Comments
Please log in to add comments