Abstract

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

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call