Results 1 - 10
of
24
Static Inference of Modes and Data Dependencies in Logic Programs
- ACM Transactions on Programming Languages and Systems
, 1989
"... Abstract: Mode and data dependency analyses find many applications in the generation of efficient exe-cutable code for logic programs. For example, mode information can be used to generate specialized unification instructions where permissible; to detect determinacy and functionality of programs; to ..."
Abstract
-
Cited by 86 (5 self)
- Add to MetaCart
Abstract: Mode and data dependency analyses find many applications in the generation of efficient exe-cutable code for logic programs. For example, mode information can be used to generate specialized unification instructions where permissible; to detect determinacy and functionality of programs; to gen-erate index structures more intelligently; to reduce the amount of runtime tests in systems that support goal suspension; and in the integration of logic and functional languages. Data dependency information can be used for various source-level optimizing transformations, to improve backtracking behavior, and to parallelize logic programs. This paper describes and proves correct an algorithm for the static infer-ence of modes and data dependencies in a program. The algorithm is shown to be quite efficient for pro-grams commonly encountered in practice.
Automatic Mode Inference for Logic Programs
- Journal of Logic Programming
, 1988
"... In general, logic programs are undirected, i.e. there is no concept of "input" and "output" arguments to a procedure. An argument may be used either as an input or as an output argument, and programs may be executed either in a "forward" direction or in a "backward" direction. However, it is often t ..."
Abstract
-
Cited by 69 (7 self)
- Add to MetaCart
In general, logic programs are undirected, i.e. there is no concept of "input" and "output" arguments to a procedure. An argument may be used either as an input or as an output argument, and programs may be executed either in a "forward" direction or in a "backward" direction. However, it is often the case that in a given program, a predicate is used with some of its arguments used consistently as input arguments and others as output arguments. Such mode information can be used by a compiler to effect various optimizations. This paper considers the problem of automatically inferring the modes of the predicates in a program. The dataflow analysis we use is more powerful than approaches relying on syntactic characteristics of programs, e.g. [18]. Our work differs from that of Mellish [14, 15] in that (i) we give a sound and efficient treatment of variable aliasing in mode inference; (ii) by propagating instantiation information using state transformations rather than through dependen...
Strict And Non-Strict Independent And-Parallelism In Logic Programs: Correctness, Efficiency, And Compile-Time Conditions
, 1993
"... Machine (WAM) [33]. &- Prolog, the source language in this model, is basically Prolog, with the addition of the parallel conjunction operator "&" and a set of parallelism-related builtins, which includes several types of groundness and independence checks, and synchronization primitives. Parallel co ..."
Abstract
-
Cited by 60 (33 self)
- Add to MetaCart
Machine (WAM) [33]. &- Prolog, the source language in this model, is basically Prolog, with the addition of the parallel conjunction operator "&" and a set of parallelism-related builtins, which includes several types of groundness and independence checks, and synchronization primitives. Parallel conditional execution graphs (which cause the execution of goals in parallel if certain conditions are met) can be constructed by combining these elements with the normal Prolog constructs, such as "-?" (if-then-else). For syntactic convenience (and historical reasons) an additional construct, the CGE, is also provided. We now study the correctness of CGEs. Definition 8. (CGE) A CGE (Conditional Graph Expression) is a structure of the form ( i cond =? goal 1 & goal 2 & ... & goal n ) where i cond is an independence condition as defined previously, and each goal i , i = 1; : : : ; n, is either a literal or (recursively) a CGE. CGEs appear as literals in the bodies of clauses. From an operat...
Parallel Execution of Prolog Programs: A Survey
"... Since the early days of logic programming, researchers in the field realized the potential for exploitation of parallelism present in the execution of logic programs. Their high-level nature, the presence of non-determinism, and their referential transparency, among other characteristics, make logic ..."
Abstract
-
Cited by 53 (23 self)
- Add to MetaCart
Since the early days of logic programming, researchers in the field realized the potential for exploitation of parallelism present in the execution of logic programs. Their high-level nature, the presence of non-determinism, and their referential transparency, among other characteristics, make logic programs interesting candidates for obtaining speedups through parallel execution. At the same time, the fact that the typical applications of logic programming frequently involve irregular computations, make heavy use of dynamic data structures with logical variables, and involve search and speculation, makes the techniques used in the corresponding parallelizing compilers and run-time systems potentially interesting even outside the field. The objective of this paper is to provide a comprehensive survey of the issues arising in parallel execution of logic programming languages along with the most relevant approaches explored to date in the field. Focus is mostly given to the challenges emerging from the parallel execution of Prolog programs. The paper describes the major techniques used for shared memory implementation of Or-parallelism, And-parallelism, and combinations of the two. We also explore some related issues, such as memory
On the Complexity of Dataflow Analysis of Logic Programs
, 1992
"... This article reports some results on this correlation in the context of logic programs. A formal notion of the "precision" of an analysis algorithm is proposed, and this is used to characterize the worst-case computational complexity of a number of dataflow analyses with different degrees of precisi ..."
Abstract
-
Cited by 35 (4 self)
- Add to MetaCart
This article reports some results on this correlation in the context of logic programs. A formal notion of the "precision" of an analysis algorithm is proposed, and this is used to characterize the worst-case computational complexity of a number of dataflow analyses with different degrees of precision. While this article considers the analysis of logic programs, the technique proposed, namely the use of "exactness sets" to study relationships between complexity and precision of analyses, is not specific to logic programming in any way, and is equally applicable to flow analyses of other language families.
Unfold/Fold Transformations and Loop Optimization of Logic Programs
- In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation
, 1988
"... Abstract: Programs typically spend much of their execution time in loops. This makes the generation of efficient code for loops essential for good performance. Loop optimization of logic programming languages is complicated by the fact that such languages lack the iterative constructs of traditional ..."
Abstract
-
Cited by 23 (1 self)
- Add to MetaCart
Abstract: Programs typically spend much of their execution time in loops. This makes the generation of efficient code for loops essential for good performance. Loop optimization of logic programming languages is complicated by the fact that such languages lack the iterative constructs of traditional languages, and instead use recursion to express loops. In this paper, we examine the application of unfold/fold transformations to three kinds of loop optimization for logic programming languages: recur-sion removal, loop fusion and code motion out of loops. We describe simple unfold/fold transformation sequences for these optimizations that can be automated relatively easily. In the process, we show that the properties of unification and logical variables can sometimes be used to generalize, from traditional languages, the conditions under which these optimizations may be carried out. Our experience suggests that such source-level transformations may be used as an effective tool for the optimization of logic pro-grams. 1.
Complete and Efficient Methods for Supporting Side Effects in Independent/Restricted And-parallelism
- In 1989 International Conference on Logic Programming
, 1989
"... It has been shown that it is possible to exploit Independent/Restricted And-parallelism in logic programs while retaining the conventional “don’t know ” semantics of such programs. In particular, it is possible to parallelize pure Prolog programs while maintaining the semantics of the language. Howe ..."
Abstract
-
Cited by 22 (9 self)
- Add to MetaCart
It has been shown that it is possible to exploit Independent/Restricted And-parallelism in logic programs while retaining the conventional “don’t know ” semantics of such programs. In particular, it is possible to parallelize pure Prolog programs while maintaining the semantics of the language. However, when builtin side-effects (such as write or assert) appear in the program, if an identical observable behaviour to that of sequential Prolog implementations is to be preserved, such side-effects have to be properly sequenced. Previously proposed solutions to this problem are either incomplete (lacking, for example, backtracking semantics) or they force sequentialization of significant portions of the execution graph which could otherwise run in parallel. In this paper a series of side-effect synchronization methods are proposed which incur lower overhead and allow more parallelism than those previously proposed. Most importantly, and unlike previous proposals, they have well-defined backward execution behaviour and require only a small modification to a given (And-parallel) Prolog implementation. 1
Set-Sharing is Redundant for Pair-Sharing
- Theoretical Computer Science
, 1997
"... . Although the usual goal of sharing analysis is to detect which pairs of variables share, the standard choice for sharing analysis is a domain that characterizes set-sharing. In this paper, we question, apparently for the first time, whether this domain is over-complex for pair-sharing analysis. We ..."
Abstract
-
Cited by 22 (11 self)
- Add to MetaCart
. Although the usual goal of sharing analysis is to detect which pairs of variables share, the standard choice for sharing analysis is a domain that characterizes set-sharing. In this paper, we question, apparently for the first time, whether this domain is over-complex for pair-sharing analysis. We show that the answer is yes. By defining an equivalence relation over the set-sharing domain we obtain a simpler domain, reducing the complexity of the abstract unification procedure. We present preliminary experimental results, showing that, in practice, our domain compares favorably with the set-sharing one over a wide range of benchmark programs. 1 Introduction In logic programming, a knowledge of sharing between variables is important for optimizations such as the exploitation of parallelism. Today, talking about sharing analysis for logic programs is almost the same as talking about the set-sharing domain Sharing of Jacobs and Langen [11,12]. The adequacy of this domain is not norma...
Automatic Parallelization of Irregular and Pointer-Based Computations: Perspectives from Logic and Constraint Programming
- Parallel Computing
, 1997
"... . Irregular computations pose some of the most interesting and challenging problems in automatic parallelization. Irregularity appears in certain kinds of numerical problems and is pervasive in symbolic applications. Such computations often use dynamic data structures which make heavy use of pointer ..."
Abstract
-
Cited by 16 (12 self)
- Add to MetaCart
. Irregular computations pose some of the most interesting and challenging problems in automatic parallelization. Irregularity appears in certain kinds of numerical problems and is pervasive in symbolic applications. Such computations often use dynamic data structures which make heavy use of pointers. This complicates all the steps of a parallelizing compiler, from independence detection to task partitioning and placement. In the past decade there has been significant progress in the development of parallelizing compilers for logic programming and, more recently, constraint programming. The typical applications of these paradigms frequently involve irregular computations, which arguably makes the techniques used in these compilers potentially interesting. In this paper we introduce in a tutorial way some of the problems faced by parallelizing compilers for logic and constraint programs. These include the need for inter-procedural pointer aliasing analysis for independence detection and...
Literal Dependence Net and Its Use in Concurrent Logic Programming Environment
- IN PROC. WORKSHOP ON PARALLEL LOGIC PROGRAMMING, HELD WITH FGCS’94, ICOT
, 1994
"... Program dependences are dependence relationships holding between statements in a program which can be used to infer about the behavior of the program. In this paper we propose a general framework for dependence analysis for concurrent logic programs, in particular for Flat Concurrent Prolog programs ..."
Abstract
-
Cited by 10 (0 self)
- Add to MetaCart
Program dependences are dependence relationships holding between statements in a program which can be used to infer about the behavior of the program. In this paper we propose a general framework for dependence analysis for concurrent logic programs, in particular for Flat Concurrent Prolog programs. The first contribution of this paper is to present two language-independent program representations for explicitly representing control flows and/or data flows in a concurrent logic program. Based on these representations, program dependence analysis for concurrent logic programs becomes possible. The second contribution is to present a dependence-based representation named the Literal Dependence Net (LDN) for explicitly representing primary program dependences in a concurrent logic program. Moreover, we discuss some possible applications based on the LDN, which include program debugging, testing, complexity measurement, and maintenance in a concurrent logic programming environment.

