Accession Number : ADA339112
Title : Run-time Code Generation and Modal-ML
Corporate Author : CARNEGIE-MELLON UNIV PITTSBURGH PA SCHOOL OF COMPUTER SCIENCE
Personal Author(s) : Wickline, Philip ; Lee, Peter ; Pfenning, Frank
PDF Url : ADA339112
Report Date : JAN 1998
Pagination or Media Count : 15
Abstract : This paper presents early experience with a typed programming language and compiler for runtime code generation. The language is an extension of the SML language with modal operators, based on the lambda(square) language of Davies and Pfenning. It allows programmers to specify precisely, through types, the stages of computation in a program. The compiler generates target code that makes use of runtime code generation in order to exploit the staging information. The target machine is currently a version of the Categorial Abstract Machine, called the CCAM, which we have extended with facilities for runtime code generation. Using this approach, the programmer is able to express the staging that he wants to the compiler directly. It also provides a typed framework in which to verify the correctness of his staging intentions, and to discuss his staging decisions with other programmers. Finally, it supports in a natural way multiple stages of runtime specialization, so that dynamically generated code can be used to generate yet further specialized code. This paper presents an overview of the language, with several examples of programs that illustrate key concepts and programming techniques. Then, it discusses the CCAM and the compilation of lambda(square) programs into CCAM code. Finally, the results of some experiments are shown, to demonstrate the benefits of this style of runtime code generation for some applications.
Descriptors : *COMPILERS, *MACHINE CODING, *HIGH LEVEL LANGUAGES, SOFTWARE ENGINEERING, COMPUTER PROGRAMMING, USER NEEDS, MAN COMPUTER INTERFACE, PROGRAMMERS, USER FRIENDLY.
Subject Categories : Computer Programming and Software
Distribution Statement : APPROVED FOR PUBLIC RELEASE