Quiz. Simple Imperative Language - Evaluation [003v]

  1. What does the following evaluate to? \[ \langle (x := x - 1), \sigma [x \mapsto 2] \rangle \]
  2. What does the following evaluate to? \[ \langle \texttt {if } x + 1 \leq 3 \texttt { then } x := x - 1, \sigma [x \mapsto 1] \rangle \]
  3. What does the following evaluate to? \[ \langle \texttt {while } (x + 1 \leq 3) \texttt { then } x := x - 1, \sigma [x \mapsto 1] \rangle \]
  4. Is the following a total function? \[ \langle e, \sigma \rangle \Downarrow n \]
  5. Is the following a total function? \[ \langle s, \sigma \rangle \Downarrow \sigma ' \]