next up previous contents
Next: Assign Up: Evaluation Rules Previous: Block   Contents



Evaluating a Stmt or sequence of Stmts produces a binding. Note that the binding resulting from the evaluation of a sequence of Stmts is simply the overlay (operator `+') of the bindings resulting from evaluating each Stmt in the sequence, and does not include the context C.

Eval( { } , C) = emptybinding

Eval( { Stmt_1; Stmt_2 ...; Stmt_n } , C) =
  val b0 = Eval( Stmt_1 , C);
  val b1 = Eval( { Stmt_2; ...; Stmt_n }, operator+(C, b0));
  return operator+(b0, b1);

These rules apply to constructs in the ``extended'' language. There are three possibilities for a Stmt: Assign, Iterate, and FuncDef. They are covered in the next three sections.

Allan Heydon, Roy Levin, Timothy Mann, Yuan Yu