
Sounds to me like your describing Sittampalam's and de Moor's MAG system. http://web.comlab.ox.ac.uk/oucl/research/areas/progtools/mag.htm John -- Jon Fairbairn wrote:
The background is that an automatic programme transformation system never knows as much about the problem as the programmer, so it has little chance of making the right decisions. In addition, of course, the prerequisites for certain transformations are undecidable. As a result, although research has been done on automatic programme transformation for a long time, people still rewrite programmes by hand. The same applies to ordinary compilation (after all, compilation _is_ automatic programme transformation): strictness analysis is fine, but if your programme needs strictness and the compiler can't spot it, you have to annotate by hand anyway.
So, roughtly speaking, the idea is that a programme would consist of two objects, the unoptimised source code, and an optimising compiler written specifically for that programme. Obviously we'd provide default_compile, so that to begin with one would need do nothing special. <more description clipped>