Results 1 -
3 of
3
The execution algorithm of Mercury, an efficient purely declarative logic programming language
, 1996
"... Machine or WAM. Section 5 describes some optimizations and shows how Mercury handles I/O. Section 6 gives the current state of the Mercury system while section 7 presents performance results. 2. The Mercury language Syntactically, Mercury is similar to Prolog with additional declarations, partly b ..."
Abstract
-
Cited by 175 (20 self)
- Add to MetaCart
Machine or WAM. Section 5 describes some optimizations and shows how Mercury handles I/O. Section 6 gives the current state of the Mercury system while section 7 presents performance results. 2. The Mercury language Syntactically, Mercury is similar to Prolog with additional declarations, partly because Prolog syntax is standard in the logic programming community and partly because this made it simple to execute Mercury programs using Prolog systems early in our project. Semantically, however, Mercury is very different from Prolog. Mercury is a pure logic programming language with a well-defined declarative semantics. Like Godel [14], Mercury provides declarative replacements for Prolog 's non-logical features. Unlike Godel, Mercury does not retain any non-logical features; in Mercury even I/O is declarative. Mercury is designed to appeal to at least two groups of programmers. One group is those with backgrounds in imperative languages such as C who are looking for a higher level an...
Code generation for Mercury
- In Proceedings of the Twelfth International Conference on Logic Programming
, 1995
"... Mercury is a new purely declarative logic programming language that requires programmers to write declarations for every predicate in the program. Although the main motivation for this requirement is that it allows the compiler to catch most programmer errors, it also allows the Mercury code generat ..."
Abstract
-
Cited by 13 (5 self)
- Add to MetaCart
Mercury is a new purely declarative logic programming language that requires programmers to write declarations for every predicate in the program. Although the main motivation for this requirement is that it allows the compiler to catch most programmer errors, it also allows the Mercury code generator to rely on the presence of type, mode and determinism information about every predicate in the program. The code generator exploits a new execution algorithm based on the availability of this information as well as some novel techniques (lazy code generation, follow-code migration, the use of a compile-time failure continuation stack) to produce very high quality code. This code is in C and is therefore quite portable. Benchmarks show that the Mercury implementation produces much faster code than wamcc, Quintus Prolog, SICStus Prolog and Aquarius Prolog.
The implementation of Mercury, an efficient purely declarative logic programming language
- In Proceedings of the Australian Computer Science Conference
, 1995
"... We introduce Mercury, a new purely declarative logic programming language designed to provide the support that groups of application programmers need when building large programs. Mercury's strong type, mode and determinism systems improve program reliability by catching many errors at compile time. ..."
Abstract
- Add to MetaCart
We introduce Mercury, a new purely declarative logic programming language designed to provide the support that groups of application programmers need when building large programs. Mercury's strong type, mode and determinism systems improve program reliability by catching many errors at compile time. We present a new and relatively simple execution model that takes advantage of the information these systems provide to generate very efficient code. We are developing a prototype compiler which uses this execution model to generate portable C code. Our benchmarks show that the code generated by our experimental implementation is significantly faster than the code generated by mature optimizing implementations of other logic programming languages. 1 Introduction Logic programming languages are theoretically superior to imperative programming languages such as Pascal, C, C++ and Ada because they operate on a higher level. They are declarative, which means they allow the programmer to state...

