Reverse Engineering through Formal Transformation: Knuth's 'Polynomial Addition' Algorithm
Open Access
- 1 January 1994
- journal article
- Published by Oxford University Press (OUP) in The Computer Journal
- Vol. 37 (9) , 795-813
- https://doi.org/10.1093/comjnl/37.9.795
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.Keywords
This publication has 0 references indexed in Scilit: