Results 1 - 10
of
18
Global Flow Analysis as a Practical Compilation Tool
- Journal of Logic Programming
, 1992
"... This paper addresses the issue of the practicality of global flow analysis in logic program compilation, in terms of speed of the analysis, precision, and usefulness of the information obtained. To this end, design and implementation aspects are discussed for two practical abstract interpretation- ..."
Abstract
-
Cited by 73 (20 self)
- Add to MetaCart
This paper addresses the issue of the practicality of global flow analysis in logic program compilation, in terms of speed of the analysis, precision, and usefulness of the information obtained. To this end, design and implementation aspects are discussed for two practical abstract interpretation-based flow analysis systems: MA 3 , the MCC And-parallel Analyzer and Annotator; and Ms, an experimental mode inference system developed for SB-Prolog. The paper also provides performance data obtained from these implementations and, as an example of an application, a study of the usefulness of the mode information obtained in reducing run-time checks in independent and-parallelism. Based on the results obtained, it is concluded that the overhead of global flow analysis is not prohibitive, while the results of analysis can be quite precise and useful. 1 Introduction The extensive use of advanced compilation techniques [8, 22, 30, 32, 33, 34], coupled with parallel execution [5, 10,...
1983--1993: The Wonder Years of Sequential Prolog Implementation
, 1993
"... This report surveys the major developments in sequential Prolog implementation during the period 1983--1993. In this decade, implementation technology has matured to such a degree that Prolog has left the university and become useful in industry. The survey is divided into four parts. The first part ..."
Abstract
-
Cited by 48 (4 self)
- Add to MetaCart
This report surveys the major developments in sequential Prolog implementation during the period 1983--1993. In this decade, implementation technology has matured to such a degree that Prolog has left the university and become useful in industry. The survey is divided into four parts. The first part gives an overview of the important technical developments starting with the Warren Abstract Machine (WAM). The second part presents the history and the contributions of the major software and hardware systems. The third part charts the evolution of Prolog performance since Warren's DEC-10 compiler. The fourth part extrapolates current trends regarding the evolution of sequential logic languages, their implementation, and their role in the marketplace.
A General Framework for Automatic Termination Analysis of Logic Programs
, 2000
"... This paper describes a general framework for automatic termination analysis of logic programs, where we understand by "termination" the finiteness of the LD-tree constructed for the program and a given query. A general property of mappings from a certain subset of the branches of an infinite LD-tree ..."
Abstract
-
Cited by 38 (8 self)
- Add to MetaCart
This paper describes a general framework for automatic termination analysis of logic programs, where we understand by "termination" the finiteness of the LD-tree constructed for the program and a given query. A general property of mappings from a certain subset of the branches of an infinite LD-tree into a finite set is proved. From this result several termination theorems are derived, by using different finite sets. The first two are formulated for the predicate dependency and atom dependency graphs. Then a general result for the case of the query-mapping pairs relevant to a program is proved (cf. [29,21]). The correctness of the TermiLog system described in [22] follows from it. In this system it is not possible to prove termination for programs involving arithmetic predicates, since the usual order for the integers is not well-founded. A new method, which can be easily incorporated in TermiLog or similar systems, is presented, which makes it possible to prove termination for programs involving arithmetic predicates. It is based on combining a finite abstraction of the integers with the technique of the query-mapping pairs, and is essentially capable of dividing a termination proof into several cases, such that a simple termination function suffices for each case. Finally several possible extensions are outlined. Key words termination of logic programs -- abstract interpretation -- constraints ? This research has been partially supported by grants from the Israel Science Foundation 2 Nachum Dershowitz et al. 1
jc: An Efficient and Portable Sequential Implementation of Janus
- PROC. JOINT INTERNATIONAL CONFERENCE AND SYMPOSIUM ON LOGIC PROGRAMMING, WASHINGTON DC
, 1992
"... Janus is a language designed for distributed constraint programming [12]. This paper describes jc, an efficient and portable sequential implementation of Janus, which compiles Janus programs down to C code. Careful attention to the C code generated, together with some simple local optimizations, al ..."
Abstract
-
Cited by 22 (12 self)
- Add to MetaCart
Janus is a language designed for distributed constraint programming [12]. This paper describes jc, an efficient and portable sequential implementation of Janus, which compiles Janus programs down to C code. Careful attention to the C code generated, together with some simple local optimizations, allows the system to have fairly good performance despite the lack (at this time) of global flow analysis and optimization.
Call Forwarding: A Simple Interprocedural Optimization Technique for Dynamically Typed Languages
, 1994
"... This paper discusses call forwarding, a simple interprocedural optimization technique for dynamically typed languages. The basic idea behind the optimization is straightforward: find an ordering for the "entry actions" of a procedure, and generate multiple entry points for the procedure, so as to ma ..."
Abstract
-
Cited by 15 (6 self)
- Add to MetaCart
This paper discusses call forwarding, a simple interprocedural optimization technique for dynamically typed languages. The basic idea behind the optimization is straightforward: find an ordering for the "entry actions" of a procedure, and generate multiple entry points for the procedure, so as to maximize the savings realized from different call sites bypassing different sets of entry actions. We show that the problem of computing optimal solutions to arbitrary call forwarding problems is NP-complete, and describe an efficient greedy algorithm for the problem. Experimental results indicate that (i) this algorithm is effective, in that the solutions produced are generally close to optimal; and (ii) the resulting optimization leads to significant performance improvements for a number of benchmarks tested. 1 Introduction The code generated for a function or procedure in a dynamically typed language typically has to carry out various type and range checks on its arguments before it can op...
Efficient Execution of HiLog in WAM-based Prolog implementations
- Proceedings on the twelth International Conference on Logic Programming
, 1995
"... In this paper we address the problem of efficiently implementing HiLog, a logic programming language with higher-order syntax and first-order semantics. In contrast to approaches proposed in the literature that modify, or abandon the WAM framework in order to implement HiLog, our approach to the pro ..."
Abstract
-
Cited by 13 (4 self)
- Add to MetaCart
In this paper we address the problem of efficiently implementing HiLog, a logic programming language with higher-order syntax and first-order semantics. In contrast to approaches proposed in the literature that modify, or abandon the WAM framework in order to implement HiLog, our approach to the problem stems from a belief that the WAM should be an adequate abstract machine for the execution of any logic language with first-order semantics. To show how to implement HiLog by staying within the WAM framework, we identify the reasons for poor performance characteristics of HiLog programs, present requirements for efficient HiLog execution, and propose a complete solution to the problem. Our proposal, which can be viewed either as a compile-time program specialisation preprocessing step, or as an enhancement to the HiLog encoding in predicate calculus presented by Chen, Kifer, and Warren in [1], allows HiLog to be efficiently implemented on any Prolog system by simply modifying Prolog's in...
Incremental Global Compilation of Prolog with the Vienna Abstract Machine
- In International Conference on Logic Programming
, 1995
"... The Vienna Abstract Machine (VAM) is an abstract machine which has been designed to eliminate some weaknesses of the Warren Abstract Machine (WAM). Different versions of the VAM are used for different purposes. The VAM 2P is well suited for interpretation, the VAM 1P is aimed for native code generat ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
The Vienna Abstract Machine (VAM) is an abstract machine which has been designed to eliminate some weaknesses of the Warren Abstract Machine (WAM). Different versions of the VAM are used for different purposes. The VAM 2P is well suited for interpretation, the VAM 1P is aimed for native code generation. The VAM 2P has been modified to the VAM AI , a concept suited for abstract interpretation. Analysis with the VAM AI is so fast that it is feasible to support both, global analysis and database updates with assert and retract. We present an incremental compiler based on the VAM 1P and the VAM AI . A preliminary evaluation of our compiler shows that the generated code competes with the best existing compilers whereas the compile time is comparable to that of simple bytecode translators.
Control flow analysis of Prolog (extended remix)
, 1995
"... The paper describes how to translate a Prolog program into a control flow graph (CFG). The program is annotated with control information and a system of simple set constraints is formed and solved. Using this information, a CFG can be constructed straightforwardly, which is described. In order to re ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
The paper describes how to translate a Prolog program into a control flow graph (CFG). The program is annotated with control information and a system of simple set constraints is formed and solved. Using this information, a CFG can be constructed straightforwardly, which is described. In order to represent control information compactly, the paper proposes a method to structure the solution of the analysis to share information. Compressing the control information reduces the size of the control information at least by half for 18 out of 26 benchmarks, and for some programs by an order of magnitude or more. Finally, the control flow of a set of benchmarks is measured. Forward control turns out to be relatively simple, with typically 5 or less jump targets per predicate. In several smaller benchmark programs, all or close to all success returns could be converted into direct jumps. Failure control is more complex, though there are typically 10 or less jump targets per predicate for the be...
Control flow analysis of Prolog
- Proc. 1995 International Symposium on Logic Programming
, 1995
"... this paper, we show how to take a whole-program view of compilation by converting an entire Prolog program into a control flow graph. This transformation reconciles the compilation of Prolog and logic programs with the compilation of imperative languages, since a compiler then can apply techniques f ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
this paper, we show how to take a whole-program view of compilation by converting an entire Prolog program into a control flow graph. This transformation reconciles the compilation of Prolog and logic programs with the compilation of imperative languages, since a compiler then can apply techniques for compiling Prolog as well as imperative languages to the program. We contribute the following:
Implementation Techniques for Prolog
- Proceedings of the Tenth Logic Programming Workshop, WLP 94
, 1994
"... This paper is a short survey about currently used implementation techniques for Prolog. It gives an introduction to unification and resolution in Prolog and presents the memory model and a basic execution model. These models are expanded to the Vienna Abstract Machine (VAM) with its two versions, th ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
This paper is a short survey about currently used implementation techniques for Prolog. It gives an introduction to unification and resolution in Prolog and presents the memory model and a basic execution model. These models are expanded to the Vienna Abstract Machine (VAM) with its two versions, the VAM 2P and the VAM 1P , and the most famous abstract machine, the Warren Abstract Machine (WAM). The continuation passing style model of Prolog, binary Prolog, leads to the BinWAM. Abstract interpretation can be applied to gather information about a program. This information is used in the generation of very specialized machine code and in optimizations like clause indexing and instruction scheduling on each kind of abstract machine. 1 Introduction The implementation of Prolog has a long history [Col93]. Early systems were implemented by the group around Colmerauer in Marseille. The first system was an interpreter written in Algol by Phillip Roussel in 1972. With this experience a more e...

