PublicaHier finden Sie wissenschaftliche Publikationen aus den Fraunhofer-Instituten.
Eu2C - Lisp to C compiler
: Fraunhofer-Institut für Software und Systemtechnik -ISST-, Berlin
|Fraunhofer ISST ()|
| compiler; efficiency of storage; integration; Kompiler; Laufzeiteffizienz; Lisp; modul-compilation; Modulkompilation; optimization of program; Programmoptimierung; runtime efficiency; Speicherplatzeffizienz; typ inference; Typinferenz|
Eu2C is a EuLisp to C compiler developed as part of the APPLY project at theFraunhofer-Institute for Software Engineering and Systems Engineering. There are two main problems for Lisp users: 1. the efficiency, by which we mean both the runtime efficiency and the efficiency of storage use and 2. the unsatisfactory integration capability of Lisp programs with other programs. Our way of solving these problems is to compile Lisp applications into C. The aims of the Eu2C development were -efficient execution of Lisp applications comparable to that of C-programs and -simple integration of Lisp programs into non-Lisp environments. To implement and describe the runtime system and to achieve high performance of the C-programs generated we must have a language that can handle C-data types and C-values. For this purpose we have developed a typed Lisp-like implementation language called TAIL. You can describe the representation of data, the type schemes and the type lattice with TAIL. Thus we have the possibility to carry out experiments with different data representations or type schemes without changing the Eu2C-compiler. TAIL can also be used as the basis for the implementation of other Lisp dialects. A type inference system has a great effect on the speed of Lisp programs. With a good type inference system you can reduce the number of dynamic type checks and replace calls of generic functions by direct calls of methods. A C-compiler has the best results for optimization of C-programs if the C-programs look like programs written by experienced programmers. We call this kind of C-code "natural C-code". Our approach is, for example, to use the parameter passing mechanism of C instead of using a special Lisp stack to achieve very fast function calls.