ERCIM News No.32 - January 1998

Partial Evaluation for Software Engineering

by Renaud Marlet, Scott Thibault and Charles Consel


Software architectures promote flexibility at the expense of performance overhead. The COMPOSE project at IRISA/INRIA Rennes has developed automatic program transformation techniques and tools to systematically improve efficiency while retaining genericity, safety, and adaptability.

Software architectures express how systems should be built from various interacting components. As the size and complexity of software systems increase, the choice of software architectures becomes a major issue, impacting on time-to-market as well as development cost, validation, and maintenance.

Software architectures are designed to be flexible, including aspects such as genericity, extensibility, adaptability. But flexibility impairs efficiency because it is usually not only present at the design level but also in the implementation. Whereas efficiency requires tight integration of components, flexibility calls for greater separation.

Commonly used manual optimizations are ad hoc, tedious, error prone, and unpredictable; they do not scale up and defeat the purposes of software engineering. Other approaches, aiming generating and efficiently composing building blocks, are specific to architectures and component domains, and do not fully exploit all integration opportunities.

We propose a systematic method to improve the efficiency of software architectures: program specialization. This is a general program transformation that exploits information available prior to execution (such as known input values) yielding a specialized program where all computations depending on known information are being performed early. The specialized program is thus faster (due to less computation) while semantically equivalent to the original program. In particular, program specialization can exploit the gluing information and the parameterization of software components in order to better integrate them. It is not specific to a particular software architecture style.

Partial evaluation is the technique that automates program specialization. Therefore it does not conflict with software engineering purposes. We have shown that partial evaluation can improve the performance of a wide range of software architectures and mechanisms:

Partial evaluation can also be performed at run time, thus allowing dynamic software reconfiguration. Furthermore, the program analysis embedded in the partial evaluation process ensures predictability as the user can assess the degree of specialization.

All of the above experiments have been performed using Tempo, a partial evaluator for C developed in our group. Tempo has been applied in various other domains such as operating systems, networking, graphics, and scientific computation. Besides C, Tempo is used as a back-end for specializing Java programs using Harissa, a bytecode-to-C compiler that we have also developed. Similarly, Fortran and C++ programs have been specialized using translators to C.

Our goal is to relieve the programmer of efficiency concerns, letting him concentrate on the functionalities to implement in generic and high-level way. To this end, partial evaluation provides a systematic and automatic means to improve performance while retaining flexibility. Other uses of partial evaluation in software engineering include program understanding.

For more information, see: http://www.irisa.fr/compose

Please contact:

Renaud Marlet - INRIA/IRISA
Tel: +33 2 99 84 75 01
E-mail: marlet@irisa.fr


return to the contents page