Pedagogy of Teaching Pointers in the C Programming Language using Graph Transformations
Adwoa Donyina, Reiko Heckel
TL;DR
The paper tackles the challenge of teaching C pointers in introductory courses by proposing a visual pedagogy based on graph transformation and the Groove tool. It formalizes a type graph for pointer structures, memory cells, and addresses, and uses graph constraints to enforce well-formedness and referential integrity while illustrating pointer operations through executable GT rules. An empirical evaluation compares a Spring 2023 revision-class using Groove against a prior-year cohort, showing positive trends in learning outcomes via value-added metrics and student feedback, with ongoing refinement in Fall 2023. The work contributes a concrete graphical representation and rule-based execution framework for pointer manipulation, aiming to improve understanding of memory layout and pointer semantics, with implications for scalable, visually grounded programming education.
Abstract
Visual learners think in pictures rather than words and learn best when they utilize representations based on graphs, tables, charts, maps, colors and diagrams. We propose a new pedagogy for teaching pointers in the C programming language using graph transformation systems to visually simulate pointer manipulation. In an Introduction to C course, the topic of pointers is often the most difficult one for students to understand; therefore, we experiment with graph-based representations of dynamic pointer structures to reinforce the learning. Groove, a graph transformation tool, is used to illustrate the behaviour of pointers through modelling and simulation. A study is presented to evaluate the effectiveness of the approach. This paper will also provide a comparison to other teaching methods in this area.
