In this paper we will take a detailed look at a larger example of prog
ram analysis by transformation. We will be considering Algorithm 2.3.3
.A from Knuths 'Fundamental Algorithms' Knuth (1968) (p. 357) which is
an algorithm for the addition of polynomials represented using four-d
irectional links. Knuth (1974) describes this as having ''a complicate
d structure with excessively unrestrained goto statements'' and goes o
n to say ''I hope someday to see the algorithm cleaned up without loss
of its efficiency''. Our aim is to manipulate the program, using sema
ntics-preserving operations, into an equivalent, high-level specificat
ion. The transformations are carried out in the WSL language, a 'wide
spectrum language' which includes both low-level program operations an
d high level specifications, and which has been specifically designed
to be easy to transform.