Partial evaluation is program transformation that automates a program specialization process. JSpec is a partial evaluator for Java programs. It is currently being applied in various domains such as image processing, checkpointing, computer graphics, scientific computation and software engineering.
The features of JSpec and some applications of JSpec are described in detail in a number of scientific publications:
JSpec is a partial evaluator for Java programs. It is being developed in the Compose project at IRISA / INRIA - LABRI (France).
JSpec is an off-line specializer; it is divided into two phases: analysis and specialization.
The input to the analysis phase consists of a program and a description of which inputs will be known during specialization and which will be unknown. Based on this knowledge, dependency analyses propagate information about known and unknown values throughout the code and produce an annotated program, indicating how each program construct should be transformed during specialization. Because Java is an imperative language including references, the analysis phase performs alias and side-effect analyses in addition to binding-time analyses. The accuracy of these analyses is targeted towards keeping track of known values across methods, objects, and references. In the future, JSpec will be controlled using specialization class declarations.
Following the analysis phase, the specialization phase generates a specialized program based on the annotated program and the values of the known inputs. JSpec can generate source Java programs or source C programs executing under the Harissa environment, or make use of the Tempo run-time specialization facilities to at run time generate binary programs executing under the Harissa environment. There is currently no run-time specialization back-end for generating Java bytecode at run time.
For reference, the JSpec documentation (also included in the JSpec distribution, below) is directly accessible.
Version 0.2 of JSpec is publically available as a binary-only release, from IRISA's FTP site. We plan to make JSpec available with complete source code, but we still have a few licencing issues to sort out.