University of Virginia, Department of Computer Science
CS655: Programming Languages
Spring 2000

Notes Errata

This page collects errors in the Turbak & Gifford, Applied Semantics of Programming Languages notes.

Termination Proofs (p. 64-65, noticed by Andrea Rowan)

The proofs for pop, swap and exec apply rule 3.7 incorrectly. Step 2 and 3 of the pop proof are:
   = 1 + Ecom[[pop]] + Eseq[[Q]] + Ecom[[Vtop]] + Estack[[S]]     
   = 1 + Ecom[[Vtop]] + Eseq[[Q]] + Estack[[S]]                  by 3.7
but rule 3.7 says, Ecom[[C]] = 1, C not an executable sequence. So, we should replace Ecom[[pop]] with 1 (they confused thing further by moving the expressions around):
   = 1 + Ecom[[pop]] + Eseq[[Q]] + Ecom[[Vtop]] + Estack[[S]]     
   = 1 + 1           + Eseq[[Q]] + Ecom[[Vtop]] + Estack[[S]]    by 3.7
   = 1 + 1 + Ecom[[Vtop]] + Eseq[[Q]] + Estack[[S]]
   = (more than 1)        + Econfig[[<Q, S>]]
The proofs still work, since all we care about is that the energy is reduced by at least 1 when the pop transition is fired.

The mistake is similar for swap and exec.


CS 655 University of Virginia
CS 655: Programming Languages
cs655-staff@cs.virginia.edu
Last modified: Mon Feb 26 12:48:29 2001