Results 1 -
3 of
3
wamcc: Compiling Prolog to C
- IN 12TH INTERNATIONAL CONFERENCE ON LOGIC PROGRAMMING
, 1995
"... We present the wamcc system, a Prolog compiler that translates Prolog to C via the WAM. This approach has some interesting consequences: simplicity, efficiency, portability, extensibility and modularity. Indeed the system does not incorporate complex optimizations but is as efficient as Quintus Prol ..."
Abstract
-
Cited by 34 (5 self)
- Add to MetaCart
We present the wamcc system, a Prolog compiler that translates Prolog to C via the WAM. This approach has some interesting consequences: simplicity, efficiency, portability, extensibility and modularity. Indeed the system does not incorporate complex optimizations but is as efficient as Quintus Prolog 2.5 (based on an emulator written in assembly language) and only 30 % slower than Sicstus Prolog (compiling to native code). It is instantly portable to any machine with a C compiler and easily expandable with various extensions, such as constraints, as shown by the clp(FD) system which is based on wamcc. It also incorporates a simple but efficient handling of modularity thanks to the use of C modularity.
A choice-point library for backtrack programming
- Proceedings of the JICSLP-98 Workshop on Implementation Technologies for Programming Languages based on Logic
, 1998
"... Implementing a compiler for a language with nondeterministic features is known to be a difficult task. This paper presents two new functions setChoicePoint and fail that extend the C language to efficiently handle choice point management. Originally, these two functions were designed to compile the ..."
Abstract
-
Cited by 7 (2 self)
- Add to MetaCart
Implementing a compiler for a language with nondeterministic features is known to be a difficult task. This paper presents two new functions setChoicePoint and fail that extend the C language to efficiently handle choice point management. Originally, these two functions were designed to compile the ELAN strategy language. However, they can be used by programmers for general programming in C. We illustrate their use by presenting the classical 8-queens problem and giving some experimental results. Algorithms and implementation techniques are sufficiently detailed to be easily modified and re-implemented. 1
Partial Translation: Towards a Portable and Efficient Prolog Implementation Technology
- Journal of Logic Programming
, 1996
"... We describe a new language translation framework (partial translation) and the application of one of its instances: the C-ification of Binary Prolog. Our partial translation framework compiles selected sequences of emulator instructions down to native code. The technique can be seen as an automatic ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
We describe a new language translation framework (partial translation) and the application of one of its instances: the C-ification of Binary Prolog. Our partial translation framework compiles selected sequences of emulator instructions down to native code. The technique can be seen as an automatic specialization with respect to a given program of the traditional instruction folding techniques used to speed-up emulators. In our implementation, the complex control structure, some large instructions and the management of the symbol table are left to the emulator while the translated code deals with relatively long sequences of simple instructions. After compilation, the generated code is linked with a target language representation of the emulator's byte-code and the emulator itself to form a stand-alone application. The composite runtime system's behavior can be seen as a form of `coroutining' between emulated and native code. The framework supports modular compilation, allows programm...

