Results 1 -
2 of
2
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...
Compiling logic programs to C using GNU C as a portable assembler
, 1995
"... This paper discusses the merits of using C, and in particular GNU C, as an intermediate target language for the compilation of logic programs, and describes the approach we have taken in the implementation of Mercury. We start with a simple approach using ANSI C, and investigate a variety of improve ..."
Abstract
-
Cited by 16 (5 self)
- Add to MetaCart
This paper discusses the merits of using C, and in particular GNU C, as an intermediate target language for the compilation of logic programs, and describes the approach we have taken in the implementation of Mercury. We start with a simple approach using ANSI C, and investigate a variety of improvements on this basic approach. Keywords: compilation techniques, programming language implementation, logic programming languages, Mercury, C, GNU C. 1 Introduction There are many different ways of implementing a logic programming language, each with its own advantages and disadvantages. Each method makes its own trade-offs in terms of simplicity, portability, interactivity, compilation time, code size, speed at runtime, ease of debugging, interoperation with other languages, and so on. The choice of a particular method must be governed by the relative weights placed on these different trade-offs. This paper discusses the approach we took in the implementation of Mercury [11, 12], a new pure...

