We are here for three days now, so let’s discuss the actual top: notional machine. We were asked in groups to consider this and our group came up with this answer:
“A notional machines is a model between the source code and an actual machine meant to help a learner”
We see two different types of notional machines, one being stories we tell about code, like ‘a variable is like a box’ or, this nice example from the LOGO manual explaining a list like a stack of boxes that hold values.

But, they can also be representations of source code a a higher level of abstraction:

Mark Guzdial asked an interesting question about this last one, namely: is this the notional machine, or it is a representation of one? That seems to be an open question 🙂
Research questions
Breakout groups also thought about what research questions we could ask and answer about notional machines. I have grouped them into different categories for all breakout groups and added some notes here and there.
How to gather notional machines?
- Observe teachers and see what models they use, both in plenary instruction and during one or one
- Analyze video’s/textbooks/course slides and see what notional machines they use
- Have students read code and record a video of them explaining what the code does
- Observe what students talk about in class, do they use notional machines? Are their explanations consistent with the notional machines teachers have? What terms do learners use when, for what types of code and tasks.
- Think alouds while tracing, debugging, writing code etc.
- Understand not only the notional machines that teachers use, but also which ones they prefer and why
How do we change learner notional machines?
- Have students practice simulating program behavior in a certain way, enforcing a certain machine
How do we organize nm’s?
- How do we sequence notional machines? In what order should they be presented (prescriptive)
- Look at syllabi of courses and see when they use what machines (descriptive)
- Should there be a set of sample notional machines?
About lying
Probably because of Ben duBoulay’s talk on Monday, the topic of lying is present in many groups. Maybe lie is not the right word, but it is introduced now so hard to get people to stop using it. It leads to interesting questions though. For example: how open are we to learners about the limitations? Should we say “it actually does not work this way but… for now it will do”. Robert remarks that there are some psychology results that show that it might be better to tell people that you are lying, and Colleen added that it might be more memorable if a statement is prefaced by “this is a lie”.
Someone compared this with physics too, where they use simplified models too. Is Newtonian gravity a lie? No, it is a simplification that has a use, and will do just fine until learners are at the level of quantum.
Sally adds that this reminds her of the concept of ‘semantic waves’:

Colleen now adds that models can be correct, but for a limited subset of the language. For example, the box metaphor works well, as long as you only have single assignments to a variable (which is exactly what our wipsce 2018 paper found). The nice thing about programming is that we can control the world that learners learn in (contrary to the real world where we cannot really remove complexity.
A word from the organizers
After these breakouts sessions updates, Shriram and Mark will share their perspectives on notional machines. Shriram start by making a distinction between understanding what a program does and what a language does.
Something like PythonTutor helps a student understand what a single program does but not the language as a whole perse (although it might help to understand what the language does).
For Shriram a notional machine is the answer to the question: “What is Python?”
Mark will now show some examples of notional machines, from a historical perspective. As far as Mark knows, this is the first OO lesson in the history of mankind, talking about “Joe the box”.

When Alan Kay taught Smalltalk, this is what he would say “everything is an object” to explain what Smalltalk is, which according to Mark is a notional machine. But it are more design decisions that a useable notional machine. What he would do now is talk more about how the machine executes code. He would say something like: an object gets a message, and checks whether it has a corresponding method, and if so executes it.
So where does this notional machine break (because they are all models, so incorrect)?
For example, for 3+ 4 there is no message passing in Smalltalk, it is just simple addition. A more complicated example is 3 + 4 * 5 – 7 How that works depends on the Smalltalk version!
Now it is Shriram’s turn, and he is going to give some examples from his book How to design programs using Racket. His perspective on notional machines is different, he says it is more like semantic rules defining (so not illustrating) what happens within the machine.
For example:

You can also express parts of the machine in terms of other parts. For example you can say that (and e1 e2) is short for (cond [e1 e2] [else #false]).
Here the model breaks down because the rules do not cover the entire language, but the learner will never really see the lie break down, because in the online lesson method that Shriram uses, students can only use the part of the language that has been explained.
Matthias asks what the difference is between a notional machine and semantics. Shriram says that for him, there is not really a difference, but a formal semantics is not very accessible to most students, so we need simpler things (this relates to Sally’s semantic waves, Sally adds that a notional machine can be seen as a way to make that ‘dip’ happen.
To summarize this discussion, for me a notional machine is a way to tell students what to ‘do’ with a program, how to execute a program in their heads. That can have the form of a formal rule, the form of a story, or (Colleen adds) the form of an example helping a learner to know what to do.
Mark now makes the valuable addition that a notional machine can function as a scaffold, a way to help students understand. If students do not need it (for example because they are coming from a different programming language, or because your notional machine is very aligned with their prior knowledge) you can skip a few, or all of them. That ties into the research questions we described above, about understanding a sequence of notional machines and when to use which, and when students use which.