Representation-based notional machines map from a programming context
to a context that is not a well known analogy
but simply a different representation.
There are different forms of such representations, such as
diagrams, manipulatives, role-plays, and verbalizations.
Some representations are handmade (e.g., a diagram drawn on a board)
while others are machine-generated (e.g., a visualization produced by a tool).
We collected and organized the following 38
representation-based notional machines:
| PL | NM |
| array |
clothesline |
| array element |
clothespin |
| element index |
label on the pin |
| element value |
paper sheet in the pin |
| PL | NM |
| processor |
teacher |
| instruction |
action taken by teacher, reported in list |
| canvas |
drawing area on sheet of paper |
| PL | NM |
| local variable |
box with label at bottom of a frame labeled with function name |
| parameter |
box with label at the top of a frame labeled with function name |
| variable in main |
box with label in a frame called main |
| PL | NM |
| method call |
solid arrow from caller activation to callee activation |
| method return |
dashed arrow from callee activation to caller activation |
| activation |
tall box along lifeline from call arrow to return arrow |
| object |
box at top and lifeline down |
| thread |
line through all calls and returns from start to finish of diagram |
| PL | NM |
| statement |
rectangular node |
| control-flow between statements |
arrow from node to node |
| method entry |
round 'e' node at top |
| method exit |
round 'x' node at bottom |
| PL | NM |
| ... |
... |
| if condition |
diamond-shaped node |
| condition outcome |
label on an arrow coming out of a condition (e.g., true, false) |
| PL | NM |
| ... |
... |
| switch condition |
diamond-shaped node with multiple arrows leaving |
| switch cases |
label on arrows coming out of a switch (including 'default') |
| PL | NM |
| ... |
... |
| || in condition |
'false' arrow to extra diamond node |
| && in condition |
'true' arrow to extra diamond node |
| PL | NM |
| ... |
... |
| back edge |
arrow pointing to a node that came prior in the flow (introducing a cycle) |
| while-, do-while-, for-loop |
cycle in the graph |
| PL | NM |
| control flow |
arrows, superimposed on the code |
| expression |
rectangular outline around expression, superimposed on the code |
| PL | NM |
| ... |
(all aspects from 1-Static Structure) |
| instruction execution |
add current step number to arrow leading in, then execute by adding to or looking up information in memory table, expression evaluator, or output areas |
| expression evaluation |
copy expression, substitute values, and evaluate it in expression evaluation area |
| variable declaration |
find first blank column in memory table and add name of variable in first row; value added underneath if initialised |
| variable assignment |
find variable in the memory table, strike through existing entry, and add entry to row below. |
| conditionals and loops |
evaluate control expression to 'True' or 'False', then follow relevant labelled control path to next instruction |
| PL | NM |
| expression |
tree of nodes linked together |
| operator |
green node |
| operand |
hole in a node where a child node can be attached |
| subexpression inside expression |
subtree connected to a node's hole |
| type of subexpression |
blue tag above subexpressions's root node |
| numerical literal |
tree node labeled with the number |
| variable |
tree node labeled with name of variable of a numeric type |
| unary arithmetic operator (+, -) |
tree node with operator in front of a hole |
| binary arithmetic operator (+, -, *, /, %) |
tree node with operator between two holes |
| PL | NM |
| ... |
(all aspects from 1-Arithmetic) |
| Boolean literal |
leaf tree node labeled with true or with false |
| variable |
leaf tree node labeled with name of variable of type boolean |
| unary negation operator (!) |
tree node with operator in front of a hole |
| binary logical operator (|, &, ||, &&) |
tree node with operator between two holes |
| PL | NM |
| ... |
(all aspects from 2-Logic) |
| null |
tree node containing 'null' |
| this |
tree node containing 'this' |
| instantiation |
tree node with 'new', class name, and a parentheses containing comma-separated holes for constructor parameters |
| variable |
tree node containing name of variable of an Object type |
| instance field access |
tree node containing a hole, a dot, and a field name |
| instance method invocation |
tree node with a hole, a dot, and parentheses containing comma-separated holes for method parameters |
| class field access |
tree node containing class name, a dot, and a field name |
| class method invocation |
tree node with class name, a dot, and parentheses containing comma-separated holes for method parameters |
| PL | NM |
| ... |
(all aspects from 3-Objects) |
| array allocation |
tree node with 'new', element type, and [hole] for each dimension |
| array length |
tree node with a hole and '.length' |
| array element access |
tree node with a hole, and [hole] |
| PL | NM |
| ... |
(all aspects from 4-Arrays) |
| binary comparison operator (==, !=, <, <=, >=, >) |
tree node with operator between two holes |
| ternary conditional operator (?:) |
tree node with a hole for the condition, '?', a hole for the then-value, ':', and a hole for the else-value |
| PL | NM |
| function |
cell transforming input to output |
| PL | NM |
| Object |
Type written and underlined in a rectangle |
| variable |
variable name followed by a small box |
| int |
number written in a small box |
| reference |
arrow originating from a small box |
| null |
X written in a small box |
| local variable |
free floating |
| instance variable |
shown inside an object |
| PL | NM |
| int |
number written on paper in a small blue pocket |
| int array |
sequence of int variables |
| variable |
variable name followed by a small box |
| stack frame |
rectangle with the method name written on the side containing all local variables |
| reference |
pocket containing a remote control with a ribbon to the referent |
| null |
empty pocket with an X shown in the back |
| PL | NM |
| ... |
(all aspects of Physical Java 1) |
| object |
a small stuffed animal with a resemblance to the name of the object |
| instance variables |
(not represented) |
| PL | NM |
| ... |
(all aspects of Physical Java 1) |
| object |
object type written/underlined in a rectangle |
| int |
number written in a small box |
| instance variables |
shown in an object |
| PL | NM |
| ... |
(all aspects of Physical Java 3) |
| reference |
arrow originating from a small box |
| null |
X written in a small box |
| PL | NM |
| ... |
(all aspects of Physical Java 4) |
| local variable |
free floating variable |
| stack frame |
(not represented) |
| PL | NM |
| ... |
(all aspects of Physical Java 2) |
| variable type |
sticky note with the name of the type next to the pocket that holds the reference |
| parent reference |
a remote control that only has buttons corresponding to the things that the parent object knows how to do. |
| child object |
a stuffed animal that - as a child - 'does what it wants' and not necessarily what the parent would do. |
| PL | NM |
| stack frame |
red rectangle, with method name and line number in left compartment, boxes for paremeters and local variables in right compartment |
| object |
purple rectangle, with class name in left compartment, boxes for instance variables in right compartment |
| array |
blue rectangle consisting of boxes for elements |
| static fields |
yellow rectangle, with class name in left compartment, boxes for class variables in right compartment |
| variable |
box inside a rectangle |
| reference value |
solid arrow pointing to a rectangle |
| primitive value |
value written inside a box |
| callee-caller relationship |
dashed red arrow from callee stack frame to caller stack frame |
| PL | NM |
| memory |
table of identifer and value |
| instruction |
update of state according to defined rules |
| variable |
entry in the table |
| conditional |
conditional evaluator (flag) that affects the 'program counter' |
| control flow |
program counter that identifies next line to get executed and is updated according to a set of rules |
| PL | NM |
| ... |
... |
| method table |
table of identifier and starting line |
| scope |
'sub-table' area in the memory |
| parameter |
entry in the memory sub-table of a function call |
| PL | NM |
| ... |
... |
| heap |
object table of address and value |
| reference |
addresss used as a value (denoted in <...>) |
| object |
entry in object table with address and value |
| PL | NM |
| ... |
... |
| method |
entry in the table of sub-routines |
| object |
entry in object table with address and value(s) |
| PL | NM |
| frame |
group of elements with function name |
| parameter |
labeled box inside frame |
| local variable |
labeled box inside frame |
| PL | NM |
| object |
red rounded rectangle, with class name containing instance variables |
| instance variable |
box inside object, with name, type, value |
| PL | NM |
| stack |
one side of the drawing (labeled stack), containing zero or more stacked 'stack frame' rectangles |
| stack frame |
grey rectangle, with method name, containing local variables and parameters of the method |
| local variable |
box inside stack frame, with name, type, value |
| parameter |
box inside stack frame, with name, type, value |
| PL | NM |
| ... |
(all aspects of 1 - Objects and 2 - Stack Frames) |
| reference value |
arrow from a variable rectangle (anywhere, i.e., in the stack or the heap) to an object rounded rectangle |
| null value |
a ground symbol (i.e., the absence of an arrow) |
| PL | NM |
| ... |
(all aspects of 1 - Objects, 2 - Stack Frames, 3 - References) |
| array |
red rounded rectangle on the heap, labeled with array type |
| array element |
a field in the array, with index, type, and value |
| array length |
a field in the array, with name 'length' and type int, and a value corresponding to the number of elements |
| PL | NM |
| variable |
typed box/memory location |
| statement |
changes a memory location |
| object |
collection of boxes in memory |
| method |
changes an object |
| PL | NM |
| variable |
clothespin |
| variable name |
label on the pin |
| value |
paper sheet in the pin |
| PL | NM |
| variable |
table heading |
| value |
last element listed in the column |
| PL | NM |
| literal string |
pronounce each character in string |
| variable |
pronounce 'the variable' and give its whole name |