WGLD June 2021 Online Meeting

Talk: A Notional Machine for Teaching Expressions

Online
Mon, Jun 7, 2021


Matthias Hauswirth presenting A Notional Machine for Teaching Expressions at the IFIP Working Group on Language Design June 2021 online meeting on Zoom.

Abstract

Humans consist mostly of water. Programs consist mostly of expressions. If our goal is to teach programming, we need to teach to read, write, and understand expressions. We developed a tool, Expression Tutor, to help teaching and assessing the conceptual understanding of expressions. The tool supports activities such as parsing, typing, evaluating, and unparsing expressions. It essentially repurposes the AST as a “notional machine” for “visual program simulation”, where steps that compilers and program analyses tools do automatically have to be done manually by students who learn to program. To demonstrate that Expression Tutor can be used as a tool in teaching almost any language, we are currently creating brief example sequences of activities as they could be used to teach ideas such as method invocation in Java, list comprehensions in Python, spread syntax in JavaScript, desugaring in Scala, Boolean logic in Racket BSL, currying in Haskell, Church Booleans in lambda calculus, and even elementary algebra. I will briefly present the background, give a demo, and discuss limitations and open questions of our approach. I’d be more than happy to hear critical comments, feedback, and also potential interests in collaborations.