Citation
Bueno Carrillo, Francisco and Hermenegildo, Manuel V.
(1991).
Towards an automatic translation algorithm from Prolog to the Andorra Kernel Language.
In: "6° Convegno sulla Programmazione Logica (GULP '91 )", 12-14 Jun 1991, Pisa, Italia. pp. 438-503.
Abstract
The Andorra family of languages (which includes the Andorra Kernel Language
-AKL) offers the advantage of supporting simultaneously the programming
styles of Prolog and committed choice languages. However, Prolog programs
cannot be executed directly on the AKL. This is due to a number of factors,
from more or less trivial syntactic differences to more involved issues such as
the treatment of cut and making the exploitation of certain types of parallelism
possible. These differences can be bridged, however, through program analysis and transformation. This paper provides basic guidelines for constructing
an automatic compiler of Prolog programs into AKL. First we revisit the Andorra Kernel Language flow of control and then introduce t he basic translation
paradigms for dealing with each type of transformation needed. Finally, we
present a basic translation algorithm. The translation process benefits from
an abstract interpretation-based global analysis of the program. We also put
special attention on a style of translation which attempts to achieve independent and-parallel execution where possible, since this type of parallel execution
preserves through the translation the user-perceived "complexity" of the originai Prolog program. This process is simplified in part by making use of some
compile-time analysis technology developed in the context of the &-Prolog compiler.