Results 1 -
8 of
8
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...
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...
Proving existential termination of normal logic programs
- Proc. of the 5th AMAST, LNCS 1101
, 1996
"... Abstract. The most important open problem in the study of termination for logic programs is that of existential termination. Inthispaperwepresentapow erful transformational methodology that provides necessary (and, under some conditions, su cient) criteria for existential termination. The followed a ..."
Abstract
-
Cited by 10 (1 self)
- Add to MetaCart
Abstract. The most important open problem in the study of termination for logic programs is that of existential termination. Inthispaperwepresentapow erful transformational methodology that provides necessary (and, under some conditions, su cient) criteria for existential termination. The followed approach is to develop a suitable transformation from logic programs to Term Rewriting Systems (TRSs), such that proving termination of the obtained TRS implies existential termination of the original logic program. Thus, all the extensive amountofwork on termination for TRSs can be automatically used in the logic programming setting. Moreover, the approach isalsoabletocopewiththe dual notion of universal termination: in fact, a whole spectrum of termination properties, said k-termination,isinvestigated, of which universal and existential termination are the extremes. Also, a satisfactory treatment to the problem of termination for logic programming with negation is achieved. This way we provide a unique, uniform approachcovering all these di erent notions of termination. 1
Binding-Time Analysis for Mercury
- 16th International Conference on Logic Programming, pages 500 { 514
, 1999
"... . In this paper, we describe a binding-time analysis (BTA) for a statically typed and strongly moded pure logic programming language, in casu Mercury. Binding-time analysis is the key concept in achieving o-line program specialisation: the analysis starts from a description of the program's inpu ..."
Abstract
-
Cited by 8 (4 self)
- Add to MetaCart
. In this paper, we describe a binding-time analysis (BTA) for a statically typed and strongly moded pure logic programming language, in casu Mercury. Binding-time analysis is the key concept in achieving o-line program specialisation: the analysis starts from a description of the program's input available for specialisation, and propagates this information throughout the program, deriving directives for when and how to perform specialisation. 1
Compiling Mercury to high-level C code
- Proceedings of the 2002 International Conference on Compiler Construction
, 2001
"... Many logic programming implementations compile to C, but they compile to very low-level C, and thus discard many of the advantages of compiling to a high-level language. We describe an alternative approach to compiling logic programs to C, based on continuation passing, that we have used in a new ba ..."
Abstract
-
Cited by 7 (4 self)
- Add to MetaCart
Many logic programming implementations compile to C, but they compile to very low-level C, and thus discard many of the advantages of compiling to a high-level language. We describe an alternative approach to compiling logic programs to C, based on continuation passing, that we have used in a new back-end for the Mercury compiler. The new approach compiles to much higher-level C code, which means the compiler back-end and run-time system can be considerably simpler.
Status of the Mercury system
- In Proceedings of the JICSLP'96 Workshop on Parallelism and Implementation Technology for (Constraint) Logic Programming Languages
, 1996
"... This paper is a report on the status of the Mercury system at the time of the release of version 0.6 of the system. We intend to demonstrate the system at the workshop. The contents of this paper is as follows. Section 2 lists the main features of the language. Section 3 shows what is new in the Mer ..."
Abstract
-
Cited by 7 (0 self)
- Add to MetaCart
This paper is a report on the status of the Mercury system at the time of the release of version 0.6 of the system. We intend to demonstrate the system at the workshop. The contents of this paper is as follows. Section 2 lists the main features of the language. Section 3 shows what is new in the Mercury system since release 0.5, which came out in early 1996. Section 4 gives a broad picture of the state of the implementation. Section 5 discusses the performance of the system, while section 6 lists our current and future research directions.
Implementation Technologies for Programming Languages based on Logic
"... We introduce JINNI (Java INference engine and Networked Interactor), a new, lightweight, multi-threaded, pure logic programming language, intended to be used as a flexible scripting tool for gluing together knowledge processing components and Java objects in networked client/server applications. The ..."
Abstract
- Add to MetaCart
We introduce JINNI (Java INference engine and Networked Interactor), a new, lightweight, multi-threaded, pure logic programming language, intended to be used as a flexible scripting tool for gluing together knowledge processing components and Java objects in networked client/server applications. The last version of Jinni is available at http://clement.info.umoncton.ca/~tarau/netjinni/Jinni.html .
Compilation of Bottom-Up Evaluation for a Pure Logic Programming Language
"... Abstraction in programming languages is usually achieved at the price of run time efficiency. This thesis presents a compilation scheme for the Starlog logic programming language. In spite of being very abstract, Starlog can be compiled to an efficient executable form. Starlog implements stratified ..."
Abstract
- Add to MetaCart
Abstraction in programming languages is usually achieved at the price of run time efficiency. This thesis presents a compilation scheme for the Starlog logic programming language. In spite of being very abstract, Starlog can be compiled to an efficient executable form. Starlog implements stratified negation and includes logically pure facilities for input and output, aggregation and destructive assignment. The main new work described in this thesis is (1) a bottom-up evaluation technique which is optimised for Starlog programs, (2) a static indexing structure that allows significant compile time optimisation, (3) an intermediate language to represent bottom-up logic programs and (4) an evaluation of automatic data structure selection techniques. It is shown empirically that the performance of compiled Starlog programs can be competitive with that of equivalent hand-coded programs. Acknowledgements This thesis was only possible with the wisdom, patience, and optimism of my supervisor, John Cleary. I would also like to thank the other members of the Starlog project (some

