Slide 8.4: Logical inference rules
Slide 8.6: Reduction rules for integer arithmetic expressions (cont.)
Home

Reduction Rules for Arithmetic Expressions


We use the notion of inference rules to describe the way the control operates to reduce an expression to its value. There are several styles in current use to how these rules are written: Structural operational semantics will be used in the following examples. The abstract syntax for integer arithmetic expressions are as follows:
   E ::= E1 '+' E2 | E1 '–' E2 | E1 '*' E2 | '(' E1 ')' | N
   N ::= N1 D | D
   D ::= '0' | '1' | … | '9' 
Same as the denotational semantics, the symbols < and > enclosing a nonterminal are removed. For example,
   <N> ::= <N> <D> | <D>    N ::= N D | D
Terminal symbols are enclosed by single quotes. For the time being, we can ignore the storage, since this grammar does not include identifiers. We use the following notation: