Authors:
Kaian Cai
;
Martin Henz
;
Kok-Lim Low
;
Xing Ng
;
Jing Soh
;
Kyn-Han Tang
and
Kar Toh
Affiliation:
School of Computing, National University of Singapore, Singapore
Keyword(s):
Learning Programming, Visualization Tools, Integrated Development Environments, Lexical Scoping, First-Class Functions.
Abstract:
A central learning objective of introductory programming courses is a thorough understanding of environments that arise when programs written in modern programming languages run. An awareness is arising in the CSEd community that a mental model based on a runtime stack does not do justice to languages that combine lexical scoping with first-class functions. As a result, debugging and visualization tools designed around a runtime stack are not suitable for this family of languages, which includes Python, JavaScript, Ruby, Lua, Java, and Scheme. As a suitable mental model for environments in these languages, the classical programming textbook “Structure and Interpretation of Computer Programs” (SICP) introduced the environment model of computation using diagrammatic graphics. The SICP authors Hal Abelson and Gerald Jay Sussman designed the environment model to represent the runtime data structures required for executing programs written in such languages while blending out all forms of
control. In this paper, we describe a novel tool for automatically and interactively visualizing the execution environments of programs written in the targeted language family. After introducing the environment model in detail, we highlight the main challenges for its automatic and interactive visualization. We outline the architecture of the tool and its integration into a web-based environment for learning the structure and interpretation of computer programs and conclude with an analysis of the tool’s impact based on feedback from 69 course facilitators in Academic Year 2021/22.
(More)