What is Tempo?
Partial evaluation is program transformation that automates a program specialization process. Tempo is a partial evaluator for C programs. It has been applied in various domains specified as functioning systems and networking, device graphics, scientific computation, application engineering and domain particular languages. A first workshop on Tempo has been organized in March 1998. Tempo is now being distributed. Its documentation is accessible on line, as fine as tutorial slides.An Overview of Tempo
Tempo is a partial evaluator for C programs. It is being developed in the Compose project at IRISA / INRIA - LABRI (France).Tempo is an off-line specializer; it is divided into two phases: analysis and specialization.
- The input to the inspection phase consists of a program and a description of which inputs volition be known during specialization and which volition be unknown. Based on this knowledge, dependency analyses propagate data about known and unidentified values throughout the code and create an annotated program, indicating how all program build have to be transformed during specialization. Because C is an imperative tongue including pointers, the inspection phase performs pseudonym and side-effect analyses in supplement to binding-time analyses. The accuracy of these analyses is targeted towards keeping track of known values throughout procedures, data structures, and pointers.
Following the inspection phase, the specialization phase generates a specialized program according to the annotated program and the values of the known inputs. Tempo can specialize programs at compile time (i.e., source-to-source tranformation) as fine as run time (i.e., run-time binary code generation).
Program Analysis
As a archetypal step, the person provides a program and specifies what arguments (including earth variables) are static. For example, the person provides the following code for a miniprintf function, and specifies in this way that the archetypal disagreement is fixed whereas the second is dynamic: miniprintf(S,D).miniprintf(char fmt[], int val[]) { int i = 0; while( *fmt != '\0' ) { if( *fmt != '%' ) putchar(*fmt); else switch(*++fmt) { case 'd' : putint(val[i++]); break; case '%' : putchar('%'); break; default : prterror(*fmt); break; } fmt++; } } From this Tempo produces a program document alongside inspection annotations. These annotations can be visualized using colors that emphasize the propagation of the known/unknown data throughout the program. /* LEGEND: STATIC DYNAMIC */ miniprintf(char fmt[], int val[]) { int i = 0; while( *fmt != '\0' ) { if( *fmt != '%' ) putchar(*fmt); else switch(*++fmt) { case 'd' : putint(val[i++]); break; case '%' : putchar('%'); break; default : prterror(*fmt); break; } fmt++; } }The blue color (bold visage for dreary and pale display) portray static constructions, i.e. values that can be computed at specialization time. The red color (standard font for dreary and pale display) is for dynamic expressions, whose value cannot be precomputed knowing lone the static arguments. Basically, everything in blue (bold) volition disappear after specialization; lone red (standard font) parts volition remain.
The visualization of the inspection is extremely crucial for the person to assess the amount of specialization in the code. Furthermore, the analysis speeds up the specialization procedure (as opposed to on-line partial evaluators). The inspection is inter-procedural and takes into document pointer aliases and side-effects.
Compile-Time Specialization
When the person is satisfied alongside the inspection (i.e., what the user expects to specialize certainly appears as static), genuine specialization values must be provided. For example, giving "<%d,%d>" as the actual specialization value for the fmt disagreement of the miniprintf() function yields the following specialized code.miniprintf_1(int val[]) { putchar( '<' ); putint ( val[0] ); putchar( ',' ); putint ( val[1] ); putchar( '>' ); } Many specializations can be made, sharing the identical analysis. Only different specialization values have to be provided. Runtime Specialization
Tempo can additionally execute runtime specialization, using optimized binary code templates. A dedicated runtime specializer is generated from the analysis of the program. In the case of the miniprintf function, Tempo generates a runtime specializer rts_miniprintf_1() which can be used as in the following example./* * Some energetic implementation environment for changeable 'format' */ spec_printf = rts_miniprintf_1(format); ... (*spec_printf)(val1); /* <=> miniprintf(format,val1) */ (*spec_printf)(val2); /* <=> miniprintf(format,val2) */The function rts_miniprintf_1() is a dedicated runtime specializer. It returns a pointer to the specialized function. Several specialized versions can additionally be generated and used at the identical time.
Applications of Tempo
Tempo has been successfully applied in assorted domains, yielding substantial speedups.- Operating scheme and networking:
- Sun RPC, Chorus IPC, BSD packet filter, Unix signals, energetic networks,
- Computer graphics (various filtering algorithms),
- Scientific computation (trajectory, FFT, math libraries),
- Software architectures and mechanisms:
- Domain particular languages GAL, PLAN-P),
- Selective broadcast (implicit invocation),
- Pattern matching,
- Interpreters,
- Software layers,
- Generic libraries.
Besides C, Tempo is currently being used as a back-end for specializing Java programs using Harissa, a JavaVM-to-C compiler. Fortran and C++ programs have additionally been specialized using translators to C.
Projects Related to Tempo
Cyclone Cyclone is a mobile code scheme being developed as part of the SwitchWare active-network project at the University of Pennsylvania. Cyclone uses two ideas to create mobile code harmless as well as fast: run-time code generation and proof-carrying code. Cyclone relies on Tempo's inspection front-end (i.e. the binding-time analysis) and on TAL/T, an expansion of the TAL typed gathering language.Workshop
A studio (actually nearer to a ``winter school'') on Tempo has been organized at IRISA, March 16-18, 1998. The aim of this studio was to current a three-day tutorial on Tempo and its applications to genuine size programs. We had 24 participants, coming from universities as fine as industries. We believe it was a ample success. The talks are now accessible on-line.Depending on request, if the distribution of Tempo is a success, we power arrange another studio later. It would less be akin a ``winter school'' but fairly akin a genuine studio alongside users presenting applications and open discussions concerning imaginable improvements. It would be preceded by an optional one-day tutorial for group not knowing partial evaluation or Tempo.
Distribution
The Tempo specializer has been made publically accessible under a licence in April 1998. At of March 99, it was being used by concerning thirty people around the world. The binary type of Tempo has fair (July 2000) been made accessible without any restrictions, and we anticipate a complete unrestricted source publish under GPL to prosecute soon.Getting admission to Tempo no longer requires signing a licence agreement. Tempo is merely accessible via anonymous FTP, as described below. In any case, we would very much akin to comprehend from you if you are an active Tempo user. If you are, delight additionally let us cognize if and for what purpose you are using Tempo, by sending an email to [email protected]. We volition by default add you to our tempo conversation mailing catalog [email protected], where forthcoming Tempo releases volition be announced, and Tempo users can discuss practical problems using Tempo.
Tempo can be downloaded :
- Here is a Tempo publish that have been made publically available: i386 Linux
- Most latest Tempo binary allocation for i386 Linux (tested on RedHat 6.1).
In case of any issue alongside getting or installing the distribution, get in contact alongside us: mailto:[email protected]
References
Here are broad document concerning Tempo and its architecture. More focused and up-to-date data concerning Tempo can be established in the chief on-line papers tank. [CHN+96] A Uniform Approach for Compile-Time and Run-Time Specialization. Research Report 2775. INRIA, January 1996. C. Consel, L. Hornof, J. Noyé, F. Noel, and E.N. Volanschi. Revised type in Partial Evaluation, International Seminar, Dagstuhl Castle, LNCS 1110, Springer-Verlag, pages 54-72. [CHL+98] Tempo: Specializing Systems Applications and Beyond C. Consel, L. Hornof, J. Lawall, R. Marlet, G. Muller, J. Noyé, S. Thibault, N. Volanschi. To appear in ACM Computing Surveys, Symposium on Partial Evaluation, 1998. [CMVM97] Adaptabilité et évaluation partielle : Tempo, un spécialiseur pour le langage C. C. Consel, G. Muller, N. Volanschi, R Marlet. Apr 1997. (In French.)Contact Information
- Developers and maintainers: [email protected]
- Tempo Specializer residence page: tempo