Skip to main content

1998 | OriginalPaper | Buchkapitel

Multiple Specialization of WAM Code

verfasst von : Michel Ferreira, Luís Damas

Erschienen in: Practical Aspects of Declarative Languages

Verlag: Springer Berlin Heidelberg

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Program specialization is normally supported by global analysis of the program. Compilers use the information deduced to generate more efficient, specialized implementations of the program. This specialization can be single or multiple, depending if each procedure of the program is specialized into one or more versions. We present a Prolog compiler that does multiple specialization, using an algorithm that works over the WAM code, deducing the reachable procedure activations based on local analysis. The idea is to use the analysis that is done in the Prolog to WAM compilation, and that generates local specialized instructions, and to propagate this information through the entire program. The creation of multiple versions of predicates allows the propagation to be interprocedural, and to achieve global program specialization. Results from an implementation generating C code as target language are presented, showing a performance comparable to native code Prolog compilers.

Metadaten
Titel
Multiple Specialization of WAM Code
verfasst von
Michel Ferreira
Luís Damas
Copyright-Jahr
1998
Verlag
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/3-540-49201-1_17

Premium Partner