Results 11 - 20
of
53
Design and Implementation of the GNU Prolog System
- Journal of Functional and Logic Programming
, 2001
"... In this paper we describe the design and the implementation of the GNU Prolog system. This system draws on our previous experience of compiling Prolog to C in the wamcc system and of compiling finite domain constraints in the clp(FD) system. The compilation scheme has however been redesigned in orde ..."
Abstract
-
Cited by 26 (3 self)
- Add to MetaCart
In this paper we describe the design and the implementation of the GNU Prolog system. This system draws on our previous experience of compiling Prolog to C in the wamcc system and of compiling finite domain constraints in the clp(FD) system. The compilation scheme has however been redesigned in order to overcome the drawbacks of compiling to C. In particular, GNU-Prolog is based on a low-level mini-assembly platform-independent language that makes it possible to avoid compiling C code, and thus drastically reduces compilation time. It also makes it possible to produce small stand-alone executable files as the result of the compilation process. Interestingly, GNU Prolog is now compliant to the ISO standard, includes several extensions (OS interface, sockets, global variables, etc) and integrates a powerful constraint solver over finite domains. The system is efficient and in terms of performance is comparable with commercial systems for both the Prolog and constraint aspects.
Abstract Interpretation over Non-Deterministic Finite Tree Automata for Set-Based Analysis of Logic Programs
- In Fourth International Symposium on Practical Aspects of Declarative Languages, number 2257 in LNCS
, 2002
"... Abstract. Set-based program analysis has many potential applications, including compiler optimisations, type-checking, debugging, verification and planning. One method of set-based analysis is to solve a set of set constraints derived directly from the program text. Another approach is based on abst ..."
Abstract
-
Cited by 25 (10 self)
- Add to MetaCart
Abstract. Set-based program analysis has many potential applications, including compiler optimisations, type-checking, debugging, verification and planning. One method of set-based analysis is to solve a set of set constraints derived directly from the program text. Another approach is based on abstract interpretation (with widening) over an infinite-height domain of regular types. Up till now only deterministic types have been used in abstract interpretations, whereas solving set constraints yields non-deterministic types, which are more precise. It was pointed out by Cousot and Cousot that set constraint analysis of a particular program P could be understood as an abstract interpretation over a finite domain of regular tree grammars, constructed from P. In this paper we define such an abstract interpretation for logic programs, formulated over a domain of non-deterministic finite tree automata, and describe its implementation. Both goal-dependent and goal-independent analysis are considered. Variations on the abstract domains operations are introduced, and we discuss the associated tradeoffs of precision and complexity. The experimental results indicate that this approach is a practical way of achieving the precision of set-constraints in the abstract interpretation framework. 1
Implementation of Multiple Specialization in Logic Programs
- In Proc. ACM SIGPLAN Symposium on Partial Evaluation and Semantics Based Program Manipulation
, 1995
"... We study the multiple specialization of logic programs based on abstract interpretation. This involves in general generating several versions of a program predicate for different uses of such predicate, making use of information obtained from global analysis performed by an abstract interpreter, and ..."
Abstract
-
Cited by 24 (14 self)
- Add to MetaCart
We study the multiple specialization of logic programs based on abstract interpretation. This involves in general generating several versions of a program predicate for different uses of such predicate, making use of information obtained from global analysis performed by an abstract interpreter, and finally producing a new, "multiply specialized" program. While the topic of multiple specialization of logic programs has received considerable theoretical attention, it has never been actually incorporated in a compiler and its effects quantified. We perform such a study in the context of a parallelizing compiler and show that it is indeed a relevant technique in practice. Also, we propose an implementation technique which has the same power as the strongest of the previously proposed techniques but requires little or no modification of an existing abstract interpreter. Keywords: Multiple Program Specialization, Abstract Interpretation, Logic Programming, Compile-time Analysis, Optimizati...
A High Performance OR-parallel Prolog System
, 1992
"... PROLOG, the most popular logic programming language, has been developed for single-processor computers. The implementations of sequential Prolog became efficient with the development of the Warren Abstract Machine (WAM) and are still improving. Today many parallel computers are commercially availabl ..."
Abstract
-
Cited by 20 (0 self)
- Add to MetaCart
PROLOG, the most popular logic programming language, has been developed for single-processor computers. The implementations of sequential Prolog became efficient with the development of the Warren Abstract Machine (WAM) and are still improving. Today many parallel computers are commercially available and the question is how to utilize this opportunity to speed up the execution of Prolog programs. Our approach has been to study and develop efficient techniques for implementing OR-parallel systems for the full Prolog language on UMA and NUMA computers. Based on those techniques a high performance OR-parallel Prolog system has been designed and implemented on six different parallel computers. The system has a number of processes, called workers, consisting of two components: the engine, which does the actual Prolog work, and the scheduler. The schedulers, working together, divide the available work between the engines and support the sequential semantics of Prolog. We have extended th...
Automatic Design of Computer Instruction Sets
, 1993
"... This dissertation presents the thesis that good and usable instruction sets can be automatically derived for a specified data path and benchmark set. This is achieved by a multistep process: generating execution traces for the benchmark programs, sampling these traces to form a large set of small c ..."
Abstract
-
Cited by 19 (0 self)
- Add to MetaCart
This dissertation presents the thesis that good and usable instruction sets can be automatically derived for a specified data path and benchmark set. This is achieved by a multistep process: generating execution traces for the benchmark programs, sampling these traces to form a large set of small code segments, optimally recompiling these segments using exhaustive search, and finding the cover of the new instructions generated that optimizes the performance metric. The complete process is illustrated by generating an instruction set for a processor optimized for executing compiled Prolog programs. The generated instruction set is compared with the hand-designed VLSI-BAM instruction set. The automatically designed instruction set is smaller and has only a few percent less performance on th...
The GNU Prolog System and its Implementation
, 2000
"... We describe in this paper the GNU-Prolog system, a free system consisting of a Prolog compiler and a constraint solver on finite domains. GNU-Prolog is based on a low-level mini-assembly platform-independent language that makes it possible for efficient compilation time, and allows to produce small ..."
Abstract
-
Cited by 18 (2 self)
- Add to MetaCart
We describe in this paper the GNU-Prolog system, a free system consisting of a Prolog compiler and a constraint solver on finite domains. GNU-Prolog is based on a low-level mini-assembly platform-independent language that makes it possible for efficient compilation time, and allows to produce small stand alone executable files as the result of the compilation process. Interestingly, the Prolog part is compliant to the ISO standard, and the constraint part includes several extensions, such as an efficient handling of reified constraints. The overall system is efficient and comparable in performances with commercial systems, both for the Prolog and constraint parts. 1. INTRODUCTION GNU Prolog 1 is a free Prolog compiler supported by the GNU organization. It was released in April 1999 and more than 2500 copies have been downloaded up to now from the INRIA ftp mirror site 2 . It is built on previous systems developed at INRIA, namely wamcc [4] for Prolog and clp(FD) [5] for constrain...
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.
Freeness Analysis in the Presence of Numerical Constraints
- In Tenth International Conference on Logic Programming
, 1993
"... This paper describes a novel application of abstract interpretation dealing with mixed systems of numerical and unification constraints. In general, the abstraction of such systems cannot be separated into two independent parts, since a program variable is often involved in both types of constraints ..."
Abstract
-
Cited by 12 (5 self)
- Add to MetaCart
This paper describes a novel application of abstract interpretation dealing with mixed systems of numerical and unification constraints. In general, the abstraction of such systems cannot be separated into two independent parts, since a program variable is often involved in both types of constraints. The proposed abstraction deals in an elegant way with the interaction between the two types of constraints. The abstract domain extends the notion of possible sharing information in the context of logic programs towards possible dependencies established by constraint systems. The usefulness of the information on possible dependencies between program variables is twofold: (1) it is used to derive definite freeness information needed for low-level optimisations; (2) it also allows to delay the addition of constraints in a computation -- i.e. high-level optimisation -- thus augmenting the opportunity for constraint specialisation. Coupled with results from other analyses, the derived information is highly valuable in the compilation of CLP programs to reduce the overhead of the general constraint solver.
Skeletons and Techniques as a Normative Approach to Program Development in Logic-based Languages
, 1994
"... To help encourage the wide use of a variety of logic-based languages, we advocate the identification and use of systematic program construction methods. Our approach is to capture programming idioms in the form of skeletons, or basic control flows, and standard programming techniques for construc ..."
Abstract
-
Cited by 11 (2 self)
- Add to MetaCart
To help encourage the wide use of a variety of logic-based languages, we advocate the identification and use of systematic program construction methods. Our approach is to capture programming idioms in the form of skeletons, or basic control flows, and standard programming techniques for construction and manipulation of data structures. We argue that the approach, coming initially from Prolog and logic grammars, is equally applicable in the context of constraints, committed-choice and higher order constructs, and indeed logic-based languages in general. This paper introduces our generalized view of skeletons and techniques, gives examples of the breadth of their applicability, and explores positive consequences for program development. 1 The Need for a Normative View Most proponents of logic programming, after having been excited about the advantages of logic programming, have puzzled why the technology has not become more widely adopted. Despite obvious advantages, logic prog...

