Function Setting Key-Value Pairs in Maps

result of setting key key to value value in map vars

Format:

result of storing value at key: key in map: vars

Input:

list vars -
variable key -
number value -

Output:

list - None

Properties that reference this function:

result of storing value at key: key in map: entries = output of function store_compute where input key is key, value is value, map is entries, and processed map is [ ] (Set Key Value)

Conditional properties that reference this function:

  • if the following are true:
    • Expression Stack at time t = [ [ ], [ [ function call with name: "__setitem__" and arguments: args, ys ], rest ] ]
    • Value Stack at time t = [ [ value, [ key, [ Python reference idx, [ ] ] ] ], [ next_level, other_levels ] ]
    • the element at index idx of stack (Python Object Store at time t) = Python dictionary entries

    then Python Object Store at time (t + 1) = result of storing (Python dictionary (result of storing value at key: key in map: entries)) at index idx of stack (Python Object Store 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 Class Map at time (t + 1) = result of storing [ entry "bases": bases, [ entry "methods": [ ], [ entry "line": i, [ ] ] ] ] at key: name in map: (Class Map 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 Control Map at time (t + 1) = result of storing (pair ("class", name)) at key: j in map: (Control Map 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
    • value at class_name in map (Class Map at time t) = class_map
    • value at "methods" in map class_map = methods_map

    then Class Map at time (t + 1) = result of storing (result of storing (result of storing [ entry "params": params, [ entry "line": i, [ ] ] ] at key: method_name in map: methods_map) at key: "methods" in map: class_map) at key: class_name in map: (Class Map 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 Variables Map at time (t + 1) = result of storing value at key: x in map: (Variables Map 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 Variables Map at time (t + 1) = result of storing value at key: x in map: (Variables Map 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 Variables Map at time (t + 1) = result of storing value at key: x in map: (Variables Map at time t)

    (link)
  • if the following are true:
    • Expression Stack at time t = [ [ ], [ [ obj.attribute = val, ys ], rest ] ]
    • Value Stack at time t = [ [ value, [ Python reference idx, [ ] ] ], [ next_level, other_levels ] ]
    • the element at index idx of stack (Python Object Store at time t) = Python object: entries

    then Python Object Store at time (t + 1) = result of storing (Python object: (result of storing value at key: attribute in map: entries)) at index idx of stack (Python Object Store 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:
    • Expression Stack at time t = [ [ ], [ ] ]
    • Value Stack at time t = [ [ Python reference index, [ ] ], v_stack ]
    • the element at index index of stack (Python Object Store at time t) = Python list elements

    then Control Map at time (t + 1) = result of storing (trio ("for", i, elements)) at key: j in map: (Control Map 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 Variables Map at time (t + 1) = result of storing elem at key: target in map: (Variables Map 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 Control Map at time (t + 1) = result of storing (trio ("for", i, rest)) at key: j in map: (Control Map 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 = c
    • c is constant

    then Variables Map at time (t + 1) = result of storing c at key: x in map: (Variables Map 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 = c
    • c is a variable

    then Variables Map at time (t + 1) = result of storing (value at c in map (Variables Map at time t)) at key: x in map: (Variables Map at time t)

    (link)
  • if the following are true:
    • expression state at time t = "call_build_args"
    • Parameters List at time t = [ var, frest ]
    • Argument Values at time t = [ value, vrest ]

    then Function Variables Map at time (t + 1) = result of storing value at key: var in map: (Function Variables Map 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 (function call with name: name and arguments: args)
    • expression state at time t = "end_expr"

    then Variables Map at time (t + 1) = result of storing (Return Value at time t) at key: x in map: (Variables Map 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 test:
    • expression state at time t = "end_expr"
    • Return Value at time t = True

    then Control Map at time (t + 1) = result of storing (pair ("if", True)) at key: j in map: (Control Map 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 test:
    • expression state at time t = "end_expr"
    • Return Value at time t = False

    then Control Map at time (t + 1) = result of storing (pair ("if", False)) at key: j in map: (Control Map 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 state at time t = "end_expr"
    • Return Value at time t = True

    then Control Map at time (t + 1) = result of storing (pair ("if", True)) at key: j in map: (Control Map 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" statement with condition (function call with name: name and arguments: args)
    • expression state at time t = "end_expr"
    • Return Value at time t = True

    then Control Map at time (t + 1) = result of storing (pair ("while", i)) at key: j in map: (Control Map 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 state at time t = "end_expr"

    then Variables Map at time (t + 1) = result of storing (Return Value at time t) at key: x in map: (Variables Map 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 state at time t = "end_expr"

    then Variables Map at time (t + 1) = result of storing (Return Value at time t) at key: x in map: (Variables Map at time t)

    (link)
  • if the following are true:
    • expression state at time t = "call_function_begin"
    • Value Stack at time t = [ [ value, [ key, [ Python reference idx, [ ] ] ] ], stack ]
    • the expression at time t = function call with name: "__setitem__" and arguments: [ obj, rest ]
    • the element at index idx of stack (Python Object Store at time t) = Python dictionary entries

    then Python Object Store at time (t + 1) = result of storing (Python dictionary (result of storing value at key: key in map: entries)) at index idx of stack (Python Object Store 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 Class Map at time (t + 1) = result of storing [ entry "bases": bases, [ entry "methods": [ ], [ entry "line": i, [ ] ] ] ] at key: name in map: (Class Map 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 Control Map at time (t + 1) = result of storing (pair ("class", name)) at key: j in map: (Control Map 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
    • value at class_name in map (Class Map at time t) = class_map
    • value at "methods" in map class_map = methods_map

    then Class Map at time (t + 1) = result of storing (result of storing (result of storing [ entry "params": params, [ entry "line": i, [ ] ] ] at key: method_name in map: methods_map) at key: "methods" in map: class_map) at key: class_name in map: (Class Map 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 state at time t = "end_expr"

    then Variables Map at time (t + 1) = result of storing (Return Value at time t) at key: x in map: (Variables Map 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 state at time t = "end_expr"

    then Variables Map at time (t + 1) = result of storing (Return Value at time t) at key: x in map: (Variables Map 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 state at time t = "end_expr"

    then Variables Map at time (t + 1) = result of storing (Return Value at time t) at key: x in map: (Variables Map at time t)

    (link)
  • if the following are true:
    • expression state at time t = "call_function_begin"
    • Value Stack at time t = [ [ value, [ Python reference idx, [ ] ] ], stack ]
    • the expression at time t = obj.attribute = val
    • the element at index idx of stack (Python Object Store at time t) = Python object: entries

    then Python Object Store at time (t + 1) = result of storing (Python object: (result of storing value at key: attribute in map: entries)) at index idx of stack (Python Object Store 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:
    • expression state at time t = "end_expr"
    • Return Value at time t = Python reference index
    • the element at index index of stack (Python Object Store at time t) = Python list elements

    then Control Map at time (t + 1) = result of storing (trio ("for", i, elements)) at key: j in map: (Control Map 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 Variables Map at time (t + 1) = result of storing elem at key: target in map: (Variables Map 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 Control Map at time (t + 1) = result of storing (trio ("for", i, rest)) at key: j in map: (Control Map at time t)

    (link)
  • if the following are true:
    • Parameters List at time t = [ var, frest ]
    • Argument Values at time t = [ value, vrest ]

    then Function Variables Map at time (t + 1) = result of storing value at key: var in map: (Function Variables Map 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 Variables Map at time (t + 1) = result of storing value at key: target in map: (Variables Map 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 = [ [ ], [ ] ]
    • Value Stack at time t = [ [ True, [ ] ], [ ] ]

    then Control Map at time (t + 1) = result of storing (pair ("if", True)) at key: j in map: (Control Map 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 = [ [ ], [ ] ]
    • Value Stack at time t = [ [ False, [ ] ], [ ] ]

    then Control Map at time (t + 1) = result of storing (pair ("if", False)) at key: j in map: (Control Map 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 expr:
    • Expression Stack at time t = [ [ ], [ ] ]
    • Value Stack at time t = [ [ True, [ ] ], [ ] ]

    then Control Map at time (t + 1) = result of storing (pair ("if", True)) at key: j in map: (Control Map 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" statement with condition (function call with name: name and arguments: args)
    • Expression Stack at time t = [ [ ], [ ] ]
    • Value Stack at time t = [ [ True, [ ] ], [ ] ]

    then Control Map at time (t + 1) = result of storing (pair ("while", i)) at key: j in map: (Control Map at time t)

    (link)


Comments

Please log in to add comments