Proceedings Eighth Working Conference on Reverse Engineering (2001)
Oct. 2, 2001 to Oct. 5, 2001
G. Villavicencio , Universidad Cat'olica de Santiago del Estero
J.N. Oliveira , Universidade do Minho
This paper sketches a discipline for reverse engineering which combines formal and semi-formal methods. A mong the former is thealgebra of programming, which we apply in "reverse order" so as to reconstruct formal specifications of legacy code. The latter includes code slicing, used as a means of trimming down the complexity of handling the formal semantics of all program variables at the same time. A strong point of the approach is its constructive style. Reverse calculations go as far as imploding auxiliary variables, introducing mutual recursion (if applicable) and transforming semantic functions into standard generic programming schemata such as cata/paramorphisms. We illustrate the approachby reversing a piece of code (from C to Haskell) already studied in the code-slicing literature: the word-count ( wc ) program.
G. Villavicencio and J. Oliveira, "Reverse Program Calculation Supported by Code Slicing," Proceedings Eighth Working Conference on Reverse Engineering(WCRE), Suttgart, Germany, 2001, pp. 35.