Results 1 -
6 of
6
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...
Adding equations to NU-Prolog
- In Proc. of the 3rd Int. Symposium on Programming Language Implementation and Logic Programming
, 1991
"... This paper describes an extension to NU-Prolog which allows evaluable functions to be defined using equations. We consider it to be the most pragmatic way of combining functional and relational programming. The implementation consists of several hundred lines of Prolog code and the underlying Prolog ..."
Abstract
-
Cited by 36 (5 self)
- Add to MetaCart
This paper describes an extension to NU-Prolog which allows evaluable functions to be defined using equations. We consider it to be the most pragmatic way of combining functional and relational programming. The implementation consists of several hundred lines of Prolog code and the underlying Prolog implementation was not modified at all. However, the system is reasonably efficient and supports coroutining, optional lazy evaluation, higher order functions and parallel execution. Efficiency is gained in several ways. First, we use some new implementation techniques. Second, we exploit some of the unique features of NU-Prolog, though these features are not essential to the implementation. Third, the language is designed so that we can take advantage of implicit mode and determinism information. Although we have not concentrated on the semantics of the language, we believe that our language design decisions and implementation techniques will be useful in the next generation of combined functional and relational languages. Keywords: logic programming, equations, functions, parallelism, indexing, lazy evaluation, higher order. -- 1 -- 1 Introduction
Determinism analysis in the Mercury compiler
- In Proceedings of the Australian Computer Science Conference
, 1996
"... Mercury is a new purely declarative logic programming language. The Mercury determinism system allows programmers to specify which predicates never fail and which predicates succeed at most once. This information allows the compiler to check the program for errors, pinpointing predicates that do not ..."
Abstract
-
Cited by 30 (5 self)
- Add to MetaCart
Mercury is a new purely declarative logic programming language. The Mercury determinism system allows programmers to specify which predicates never fail and which predicates succeed at most once. This information allows the compiler to check the program for errors, pinpointing predicates that do not satisfy their declarations. This makes programmers significantly more productive and enhances the reliability of their programs. The Mercury compiler also uses determinism information to generate much faster code than any other logic programming system. This paper presents the algorithms used by the Mercury compiler to infer determinism information and to detect determinism errors. Keywords: determinism, Mercury, program analysis, logic programming, programming language implementation. 1 Introduction One of the fundamental differences between logic programming and other programming paradigms is the presence of so-called "don't-know" nondeterminism, whereby a predicate may return more than...
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.
Logic Programming for the Real World
- Proceedings of the ILPS'95 Postconference Workshop on Visions for the Future of Logic Programming
, 1995
"... this paper as an example. However, Mercury is by no means the only possible language design that fits within our proposal's framework. 2.1 A strong type system ..."
Abstract
-
Cited by 7 (0 self)
- Add to MetaCart
this paper as an example. However, Mercury is by no means the only possible language design that fits within our proposal's framework. 2.1 A strong type system
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...

