Control Flow as Structured Code Annotations — 1. Static Structure

Control Flow as Structured Code Annotations is a sequence consisting of the following 2 notional machines:
1. Static Structure
2. Dynamic Behavior

Programming Language

imperative / any

Form

Representation

Attribution — Origin / Source

Collected by Peter Donaldson — Own practice, Peter Donaldson and Quintin Cutts

Conceptual Advantage

The notional machine is not an entirely separate representation from the code but acts as a secondary notation to add invisible aspects of the code execution.

Mapping

PLNM
control flow arrows, superimposed on the code
expression rectangular outline around expression, superimposed on the code

Draws Attention To

Static view of control flow (possible paths), identification of expressions.

Use When

Developing understanding of how basic programming constructs work.

Cost

Code needs carefully selected and formatted to enable annotation.

Details

Created by Peter Donaldson and Quintin Cutts / PLAN C project.

Check this research paper

Peter Donaldson and Quintin Cutts
Flexible Low-cost Activities to Develop Novice Code Comprehension Skills in Schools
WiPSCE '19

Two stages to TRACS trace

First, mark code with control flow paths and parts of the code containing expressions. Second, start at the top of the program and execute each line adding or looking up any necessary information from the memory table, expression evaluation or output areas.

Comments or Feedback?

Do you have feedback on this notional machine? Did you find a mistake, or do you have a request for improvement? You can create an Issue on GitHub, where the description is hosted. This way we can see your feedback and address it.

For this, you need a GitHub account. Then follow this link to see the source file of this page. In there, click the ... left of the highlighted line, then pick "Reference in a new issue".

Create an Issue on GitHub