| DAIMI |
This is the web page for the 2nd-part course Partial Evaluation for Imperative and Object-Oriented Languages [PEIOOL] taught here at DAIMI during the 4th quarter (spring 2004).
| Course description |
This course gives an introduction to the program specialization technique of partial evaluation and its application to imperative and object-oriented languages (C and Java). We will cover the enabling principles and provide an insight into the advanced program analysis techniques needed to specialize realistic programs. Interactive sessions and a practical project will provide hands-on experience.
Partial evaluation is a program transformation technique that specializes programs to their usage context. Partial evaluation can be seen as a highly aggressive form of optimization that transforms the program according to invariants provided by the programmer. During the course we will investigate its applications within domains such as automatic compiler generation, image processing, operating systems, and scientific computations.
| Examination |
| Course plan |
| Date | Content | Litterature | Assignment |
| 31/3 | Generative programming:
|
(none) | |
| 6/4 | Lectures cancelled: vacation | ||
| 13/4 | Basics of PE for imperative languages:
|
Skim Chapter 10 of Generative Programming: Methods, Tools and
Applications. Krzysztof Czarnecki and Ulrich W. Eisenecker,
Addison-Wesley 2000. [HANDOUT] Read Tutorial Notes on Partial Evaluation. Charles Consel and Olivier Danvy. Proceedings of POPL93, the 1993 ACM Symposium on Principles of Programming Languages, pp. 493-501. Read appropriate parts of the M4 manual: C-h i m M4 RET in Emacs |
Exercise 1: power and convolution filter using generative programming techniques |
| 20/4 | Advanced topics in PE for imperative languages:
|
Read Chapter 11 of Partial Evaluation and
Automatic Program Generation, without worrying about 11.6 and 11.7. A Uniform Approach for Compile-Time and Run-Time Specialization | tempo/examples/README.txt: Learn to use Tempo. Email me whether you could get through (1)-(4) and the source code of exercise (5), with timings (is it faster?). |
| 28/4 | Lectures were cancelled :( | Static and Dynamic Program Compilation by Interpreter Specialization
Accurate Binding-Time Analysis for Imperative Languages: Flow, Context, and Return Sensitivity (Some papers contain various formalizations, and not all of you have the background for understanding those parts, so feel free to skip them; an informal understanding is sufficient.) |
Specialize the convolution example from exercise 1, using Tempo. Measure the speedup, comparing to your generative programming version if you have one. Include the specialized program in the answer. |
| 5/5 | usingMore BTA and specialization:
|
Effective Specialization of Realistic Programs via Use Sensitivity
Optional reading (will not be covered in class): Towards Bridging the Gap Between Programming Languages and Partial Evaluation |
Exercise 4: bytecode interpreter specialization |
| 12/5 | Basics of PE for object-oriented languages:
|
Partial Evaluation for Class-Based Object-Oriented Languages
Automatic Program Specialization for Java |
Exercise 5: structured interpreter specialization and power using function pointers |
| 19/5 | More about PE for object-oriented languages
|
Declarative Specialization for Object-Oriented-Program Specialization
Supporting objects in run-time bytecode specialization |
Exercise 6: specializing object-oriented programs using Tempo |
| Practicalities |