Chalkstep is a free, browser-based visualizer for the SICP
substitution model of evaluation. You paste a small Scheme program, a
few definitions and one call, and step through it one reduction at a
time. Every step rewrites the expression in place and circles the
sub-expression that changed, so a recursive procedure like
(factorial 5) visibly unwinds down to
120 the way it does on a lecture-hall board.
A Scheme REPL hands you the final value and hides the work. The whole point of the substitution model is the work: an application rewrites to the procedure body with its arguments substituted in, sub-expressions reduce inside-out, and eventually you are left with a value. Chalkstep captures each of those rewrites and lets you move forward, step back, replay them automatically, or jump to any point in the derivation.
It runs a hand-written Scheme interpreter for a practical teaching
subset: define, lambda, if and
cond, quoting, and the arithmetic and comparison
primitives. Recursion, higher-order procedures, and the SICP closure
pattern such as (define add5 (make-adder 5))
all reduce step by step. Parse and runtime problems, unbalanced
parentheses, an unbound variable, applying a non-procedure, show as a
plain inline message instead of a blank board.
if and cond, quoted
data, and numeric and comparison primitives. Structure your program
as one or more defines followed by a single call
expression to step through.