[clean-list] Transformations

Erik Zuurbier EZuurbier@Abz.nl
Fri, 6 Oct 2000 16:09:44 +0200


Hi,

When Clean will seriously incorporate program-transformations, will those be
only transformations that conserve the exact I/O relationships of the
original function, or will things such as the following once be possible?

Say I have a function that sorts a list of personnel data lo to hi by
surname. But I don't care in what order persons with equal surnames appear.
Say this function does not perform too well. So I would like to transform it
in a controlled way to a version that still still sorts people lo to hi by
surname, but it is okay if the new sorting function treats equal surnames
differently.

'In a controlled way' for me is one for which I don't have to completely
recode the algorithm manually, that the IDE helps me prove that the
algorithms are 'equivalent enough' and that I can somehow retain the
original algorithm in the source-text, for instance because to me it
expresses more clearly what the function is about.

Expecting a Clean transformation to automatically turn bubble sorts into
heap sorts may be asking a bit too much (and not to useful if you expect
programmers to use standard sorts and not to program them themselves), but
are there any other examples?

Erik Zuurbier