Lecture 2: Static and Dynamic Semantics
September 10
- Small-step semantics
- Big-step semantics immediately reduces an expression to a value;
small-step semantics evaluates programs one tiny step at a time.
- Small-step semantics has two kinds of rules. "Reduction"
or "substantative" rules actually do something,
and "compatibility" rules do bookkeeping.
- Homework 1 - prove that
a derivation in the big-step rules implies a derivation in the
small-step rules for the natural number addition language.
- Types: nats and bools
- "Stuckness" - undefined behavior is bad!
- Safety: if e : t and e ->* e', then either
e' -> e'' or else e' value
- Progress: if e : t then
e' -> e'' or else e' value
- Preservation: if e : t and e -> e' then
e' : t
$LastChangedDate: 2008-11-10 11:52:21 -0500 (Mon, 10 Nov 2008) $
$Author: rjsimmon $
$Rev: 1029 $