Denotations as Rewrite Rules
Op. semantics reduces programs to values.
- A program is a phrase [[C: comm]]s0.
- Values are from semantic domains.
- Booleans, numerals, locations, storage vectors.
- Equational definitions get rewrite rules.
- Denotation: f(x1, x2, ..., xn) = v
- Rule: f(x1, x2, ..., xn) => v
- Computation is a sequence of rewrite steps p0
=>* pn.
- p0
=> p1
=> ...=> pn.
- Each computation step pi => pi+1 replaces
a subphrase (the redex) in pi according to some rewrite rule.
- If pn is a value, computation terminates.
Which properties shall semantics fulfill?
Author: Wolfgang Schreiner
Last Modification: March 26, 1998