| Debray, S. 1992. A Simple Code Improvement Scheme for Prolog. Journal of Logic Programming 13, 1 (May), 57--88. |
....general unification predicates (see Section 3.4) that are not actually executed. 5. RELATED AND FUTURE WORK The improvement to the classic PARMA trailing scheme is new as far as we know. A somewhat similar analysis for detecting variables that do not have to be trailed is presented by Debray in [2] together with corresponding optimisations. Debray s analysis however is for the WAM variable representation and in a traditional Prolog setting, i.e. without type, mode and determinism declarations. Also in [21] trailing is avoided, but only for variables that are new in our terminology and ....
S. Debray. A Simple Code Improvement Scheme for Prolog. JLP, 13(1):349--366, May 1992.
....general uni cation predicates (see Section 3.4) that are not actually executed. 5 Related and future work The improvement to the classic PARMA trailing scheme is new as far as we know. A somewhat similar analysis for detecting variables that do not have to be trailed is presented by Debray in [2] together with corresponding optimisations. Debray s analysis however is for the WAM variable representation and in a traditional Prolog setting, i.e. without type, mode and determinism declarations. Also in [21] trailing is avoided, but only for variables that are new in our terminology and ....
S. Debray. A Simple Code Improvement Scheme for Prolog. JLP, 13(1):349-366, May 1992.
....obtained. The analysis has been adapted for this improved trailing scheme, and, although it yields less additional improvement, the combination with this trailing scheme is more e#ective. A somewhat similar analysis for detecting variables that do not have to be trailed is presented by Debray in [Deb92] together with corresponding optimisations. Debray s analysis however is for the WAM variable representation in a traditional Prolog setting, i.e. without type, mode and determinism declarations. Our analysis could not be easily adapted to the WAM, as it relies heavily on the PARMA variable ....
S. Debray. A Simple Code Improvement Scheme for Prolog. Journal of Logic Programming, 13(1):349--366, May 1992.
....query mapping pairs. As we will see later on, sometimes in order to prove termination (cf. Example 6.12) both kinds of query mapping pairs are essential. The technique we present in this section allows us to analyze correctly on the one hand common examples of Prolog programs (such as factorial [12], Fibonacci, Hanoi [7] odd even [28] between [2] Ackermann [32] and on the other hand more difficult examples, such as gcd and mc carthy 91 [25, 20,16] Note that some of these examples were previously considered in the literature on termination. However, they were always assumed to be given ....
Saumya K. Debray. A simple code improvement scheme for prolog. The Journal of Logic Programming, 13:103--180, 1992.
....piece of code is to be reused in a new setting. The problem therefore amounts to automatically inferring the mode of the arguments of a procedure at compile time and using this information to the best advantage. Debray, van Roy, Marien and others have examined this and related issues in some depth [15, 38, 29, 22, 35]. Debray s work on mode inference forms the basis of much of the work in this area. Compiling procedures to the basic WAM is a highly localized process. The code for a clause originates purely from the clause itself, plus the knowledge of whether the clause is the first, intermediate, or final ....
Saumya K. Debray. A simple code improvement scheme for prolog. In Logic Programming: Proceedings of the Sixth International Conference, Lisbon, Portugal [6], pages 17--32.
....interpretation. Abstract interpretation is a technique of describing and implementing global flow analysis of programs. It was introduced by [CC77] for dataflow analysis of imperative languages. This work was the basis of much of the recent work in the field of logic programming [AH87] Bru91] [Deb92] [Mel85] RD92] Tay89] Abstract interpretation executes programs over an abstract domain. Recursion is handled by computing fixpoints. To guarantee the termination and completeness of the execution a suitable choice of the abstract domain is necessary. Completeness is achieved by iterating the ....
Saumya Debray. A simple code improvement scheme for Prolog. Journal of Logic Programming, 13(1), 1992.
....programs. It was introduced by [CC77] for data flow analysis of imperative languages. any bound atomic free nil atom integer list struct Figure 1: Abstract domain for type and mode inference This work was the basis of much of the recent work in the field of logic programming [AH87] Bru91] [Deb92] [Mel85] RD92] Tay89] Abstract interpretation executes programs over an abstract domain. Recursion is handled by computing fix points. To guarantee the termination and completeness of the execution a suitable choice of the abstract domain is necessary. Usually the elements of this domain form a ....
Saumya Debray. A simple code improvement scheme for Prolog. Journal of Logic Programming, 13(1), 1992.
....inferred using abstract interpretation. Abstract interpretation is a technique for global flow analysis of programs. It was introduced by [6] for dataflow analysis of imperative languages. This work was the basis of much of the recent work in the field of declarative and logic programming [1] 4] [7] [12] 14] 16] Abstract interpretation executes programs over an abstract domain. Recursion is handled by computing fixpoints. To guarantee the termination and completeness of the execution a suitable choice of the abstract domain is necessary. Completeness is achieved by iterating the ....
Saumya Debray. A simple code improvement scheme for Prolog. Journal of Logic Programming, 13(1), 1992. 14
....interpretation. Abstract interpretation is a technique of describing and implementing global flow analysis of programs. It was introduced by [CC77] for dataflow analysis of imperative languages. This work was the basis of much of the recent work in the field of logic programming [AH87] Bru91] [Deb92] [Mel85] RD92] Tay89] Abstract interpretation executes programs over an abstract domain. Recursion is handled by computing fixpoints. To guarantee the termination and completeness of the execution a suitable choice of the abstract domain is necessary. Completeness is achieved by iterating the ....
Saumya Debray. A simple code improvement scheme for Prolog. Journal of Logic Programming, 13(1), 1992.
....representation. Our algorithm directly generates first order terms as continuations. Brisset and Ridoux also show how to translate exceptions by continuation capturing primitives. Such operations are beyond the scope of this paper. 2. 3 Optimization of Prolog using control flow graphs Debray [7] proposes several optimizations based on Prolog predicates translated into control flow graphs with success and failure edges. These edges do not correspond to the actual control of the program, for instance if B 1 continues with B 2 on success and B 2 on failure jumps to B 3 , a success edge is ....
S.K.Debray, "A Simple Code Improvement Scheme for Prolog", JLP 1992:13:57-88.
....circumstances. This defect can be remedied. Finally, we note that changing the indexing algorithm turned out to reduce control flow information substantially, by (a) improving indexing and (b) reducing the number of new predicates generated to avoid code duplication. 7 Related work Debray [4] and Sehr [11, 12] use control flow graphs to optimize sequential programs and extract parallelism, respectively. However, both authors considered only intraprocedural control flow. In our formulation, procedure calls disappear in an interprocedural sea of assignments, continuation creation and ....
S.K.Debray, A simple code improvement scheme for Prolog, in J. Logic Programming, 1992:13:57-88.
....special circumstances. This defect can be remedied. Finally, we note that changing the indexing algorithm turned out to reduce control flow information substantially, by (a) improving indexing and (b) reducing the number of new predicates generated to avoid code duplication. 7 Related work Debray [4] and Sehr [10, 11] use control flow graphs to optimize sequential programs and extract parallelism, respectively. However, both authors considered only intraprocedural control flow. In our formulation, procedure calls disappear in an interprocedural sea of assignments, continuation creation and ....
S.K.Debray, A simple code improvement scheme for Prolog, in J. Logic Programming, 1992:13:57-88.
....personal contributions. In Prolog programs, the clause and goal selection rules are implicit. Paper A shows how to translate Prolog into a form where control is explicit, which simplifies the underlying implementation. Paper B shows how to derive a control flow graph from a Prolog program. Debray [44] has shown that the control flow graph is a useful tool for an optimizing compiler. Paper C proposes a robust static analysis to detect uninitialized arguments to predicates; this information can be used for important compiler optimizations. Paper D shows how to adapt generational copying garbage ....
....Prolog, which allows compilers to manipulate continuations and remove some auxilliary output variables. The new program is then translated to binary or standard Prolog. The transformation is manual in nature, but could possibly be automated. Optimization of Prolog using control flow graphs Debray [44] proposes several optimizations based on Prolog predicates translated into control flow graphs with success and failure edges. These edges do not correspond to the actual control of the program; for instance, if B 1 continues with B 2 on success, and B 2 on failure jumps to B 3 , a success edge is ....
[Article contains additional citation context not shown here]
S.K.Debray, A simple code improvement scheme for Prolog, Journal of Logic Programming, 1992:13:57-88. f5, 16, 17, 28, 51, 91, 110g
....time approach [33] uses abstract interpretation to infer them approximately. As abstract interpretation is able to compute other information useful to this work (such as call modes, live variables, lifetimes, etc. this seems a reasonable approach for aliasing. 1.6. 2 CONTROL FLOW GRAPHS Debray [35] proposes a method for constructing control flow graphs of Prolog programs. His method allows the use of a number of traditional scalar optimizations such as invariant hoisting, induction variable elimination and common sub expression elimination. Our type of control flow graph, which was ....
....using builtin information 6. Dead code elimination 7. User predicate determinism Figure 4.1: Phases of CFG construction and optimization control flow graph, including using several transformations to make it more useful for analysis. The control flow graph is similar to the graphs used by Debray [35]. Our contribution is extending his graphs to include failure edges , so that dependence analysis can be defined in terms of them, and a number of types of analysis can be performed on the graphs. 4.1 INTRODUCTION In Chapter One we described the construction of the control flow graph (CFG) for a ....
[Article contains additional citation context not shown here]
Saumya K. Debray. A simple code improvement scheme for prolog. In Proceedings of the Sixth International Conference on Logic Programming, pages 17--32. MIT Press, 1989.
....optimiser is called. Real gains can be obtained from the variables appearing in the head of the clause and or in the first goal of the body by placing them in the best possible registers, all other variables are either temporary or will be placed in the goal stack. We use a very simple algorithm [4]: 1. For each variable V , find its range R = V start ; V end ] where V start is the first and V end is the last occurrence of V . 2. If there exists an argument register A i such that V is assigned to A i , and no other variable or constant needs the argument register in the range of V , set A ....
S. K. Debray. A Simple Code Improvement Scheme for Prolog. In Sixth International Conference on Logic Programming, pages 17--32. MIT Press, June 1989.
....interpretation. Abstract interpretation is a technique of describing and implementing global flow analysis of programs. It was introduced by [CC77] for dataflow analysis of imperative languages. This work was the basis of much of the recent work in the field of logic programming [AH87] Bru91] [Deb92] [Mel85] RD92] Tay89] Abstract interpretation executes programs over an abstract domain. Recursion is handled by computing fixpoints. To guarantee the termination and completeness of the execution a suitable choice of the abstract domain is necessary. Completeness is achieved by iterating the ....
Saumya Debray. A simple code improvement scheme for Prolog. Journal of Logic Programming, 13(1), 1992.
....features (i.e. Prolog programs) are unnecessarily penalised by these overheads. There are a number of reasons why we believe that it is better not to modify the underlying WAM implementation in an attempt to implement HiLog. All low level Prolog optimisations and compilation techniques [5, 8, 20, 22] developed throughout the years would be immediately applicable; Prolog programs would not incur the extra cost of the WAM modifications; and HiLog programs could run on any Prolog implementation. Indeed, in principle, the WAM [21] should be an adequate abstract machine for the execution of any ....
S. K. Debray. A simple code improvement scheme for Prolog. Journal of Logic Programming, 13(1):57--88, May 1992.
....compiler technology. As Prolog compilers approach imperative language performance, the standard optimizations of imperative language compilers (global register allocation, code motion, instruction reordering, and so forth) become important. Some of these are being implemented in current systems [38]. One approach is to compile to C. This shortens development time, gains portability, and (to a lesser degree) takes advantage of what the C compiler does (e.g. register allocation) This approach has traditionally had a performance loss over native code of a factor of two to three. This will ....
Saumya Debray. A Simple Code Improvement Scheme for Prolog. In JLP, Elsevier North-Holland, pages 57--88, vol. 13, no. 1, May 1992.
....has two main components: ensuring safeness and introduce suspension and locking unification instructions where required. This is managed by combining three analyses: type inference, safeness analysis and locality analysis. The type inference domain is an extension of the Debray Warren domain [62], with the addition of support for lists and difference lists. The compiler uses both parallel and sequential types in code generation; parallel types hold at all times in the program, while sequential types hold when leftmost. Safeness analysis investigates when the computation is in a ....
....The compiler then emits instructions based on this information, possibly falling back to more conservative code generation schemes when high precision analysis results cannot be obtained. Type analysis The type inference phase employs an abstract domain based on the standard mode analysis domain [62], augmented with support for lists and difference lists as well as handling of certain aliases. The compiler distinguishes the parallel and sequential types of a predicate. The sequential type is the type that must hold when the current recursion level is leftmost, while the parallel type holds ....
S. K. Debray, A Simple Code Improvement Scheme for Prolog, Journal of Logic Programming, 13(1):57--88, 1992. --34, 174 A Parallel Generational Copying Garbage Collector
....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, 15, 20, 35] appears to be a very promising approach to achieving improved performance in logic programming systems. Existing systems are based largely on local analysis (i.e. clause level or, at most, procedure level, as in the WAM) Such techniques have ....
S. K. Debray. A Simple Code Improvement Scheme for Prolog. In Sixth International Conference on Logic Programming, pages 17--32. MIT Press, June 1989.
....and loading the value of a variable requires dereferencing such chains. A number of authors have shown that significant performance improvements are possible if the lengths of these pointer chains can be predicted via compile time analysis, so that unnecessary dereferencing code can be deleted [7, 12, 16]; however, the analyses involved are fairly complex. Here we show how, in many cases, unnecessary dereference operations can be eliminated using call forwarding. The procedure is defined as follows: ave( Sum, Count, Avg) Avg is Sum Count. ave( H L] Sum, Count, Avg) Sum1 is Sum H, ....
S. K. Debray, "A Simple Code Improvement Scheme for Prolog", J. Logic Programming, vol. 13 no. 1, May 1992, pp. 57-88.
....the second instruction will immediately undo its effects. This optimization can be generalized to situations where the instructions under consideration are separated by a nonempty instruction sequence, in some cases containing (conditional or unconditional) jumps (see also the discussion in [4]) There are two main effects of this optimization. First, it is often the case that variables are initialized, but this action is wasted because the initialization value is subsequently overwritten without ever being used. Such useless initialization of variables can be avoided using this ....
....and deallocated each time around the loop, though it might be more efficient to allocate an environment once, use it through the duration of the loop, and deallocate it at the end. This can be realized using the instruction pair motion optimization. The idea is similar to that discussed in [4]: there are some subtleties regarding the checking of stack heap overflow, but a detailed discussion is omitted due to space constraints. A similar optimization is described in [10] The optimizations described here can be seen as generalizing a number of optimizations for traditional imperative ....
S. K. Debray, "A Simple Code Improvement Scheme for Prolog", J. Logic Programming, vol. 13 no. 1, May 1992, pp. 57-88.
No context found.
Debray, S. 1992. A Simple Code Improvement Scheme for Prolog. Journal of Logic Programming 13, 1 (May), 57--88.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC