Results 1 - 10
of
21
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.
A General Framework for Semantics-based Bottom-up Abstract Interpretation of Logic Programs
- ACM Transactions on Programming Languages and Systems
, 1993
"... Interpretation of Logic Programs Roberto Barbuti , Roberto Giacobazzi , Giorgio Levi Dipartimento di Informatica Universit`a di Pisa Corso Italia 40, 56125 Pisa fbarbuti,giaco,levig@di.unipi.it in ACM Transactions on Programming Languages and Systems Vol 15, January 1993 Abstract The theory ..."
Abstract
-
Cited by 71 (25 self)
- Add to MetaCart
Interpretation of Logic Programs Roberto Barbuti , Roberto Giacobazzi , Giorgio Levi Dipartimento di Informatica Universit`a di Pisa Corso Italia 40, 56125 Pisa fbarbuti,giaco,levig@di.unipi.it in ACM Transactions on Programming Languages and Systems Vol 15, January 1993 Abstract The theory of abstract interpretation provides a formal framework to develop advanced dataflow analysis tools. The idea is to define a non-standard semantics which is able to compute, in finite time, an approximated model of the program. In this paper we define an abstract interpretation framework based on a fixpoint approach to the semantics. This leads to the definition, by means of a suitable set of operators, of an abstract fixpoint characterization of a -model associated with the program. Thus, we obtain a specializable abstract framework for bottom-up abstract interpretations of definite logic programs. The specialization of the framework is shown on two examples, namely ground dependence analysis and depth-k analysis.
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...
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.
Adding equations to NU-Prolog
- In Proc. of the 3rd Int. Symposium on Programming Language Implementation and Logic Programming
, 1991
"... This paper describes an extension to NU-Prolog which allows evaluable functions to be defined using equations. We consider it to be the most pragmatic way of combining functional and relational programming. The implementation consists of several hundred lines of Prolog code and the underlying Prolog ..."
Abstract
-
Cited by 36 (5 self)
- Add to MetaCart
This paper describes an extension to NU-Prolog which allows evaluable functions to be defined using equations. We consider it to be the most pragmatic way of combining functional and relational programming. The implementation consists of several hundred lines of Prolog code and the underlying Prolog implementation was not modified at all. However, the system is reasonably efficient and supports coroutining, optional lazy evaluation, higher order functions and parallel execution. Efficiency is gained in several ways. First, we use some new implementation techniques. Second, we exploit some of the unique features of NU-Prolog, though these features are not essential to the implementation. Third, the language is designed so that we can take advantage of implicit mode and determinism information. Although we have not concentrated on the semantics of the language, we believe that our language design decisions and implementation techniques will be useful in the next generation of combined functional and relational languages. Keywords: logic programming, equations, functions, parallelism, indexing, lazy evaluation, higher order. -- 1 -- 1 Introduction
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.
A Simple Code Improvement Scheme for Prolog
- Journal of Logic Programming
, 1992
"... The generation of efficient code for Prolog programs requires sophisticated code transformation and op-timization systems. Much of the recent work in this area has focussed on high level transformations, typi-cally at the source level. Unfortunately, such high level transformations suffer from the d ..."
Abstract
-
Cited by 23 (3 self)
- Add to MetaCart
The generation of efficient code for Prolog programs requires sophisticated code transformation and op-timization systems. Much of the recent work in this area has focussed on high level transformations, typi-cally at the source level. Unfortunately, such high level transformations suffer from the deficiency of be-ing unable to address low level implementational details. This paper presents a simple code improvement scheme that can be used for a variety of low level optimizations. Applications of this scheme are illustrat-ed using low level optimizations that reduce tag manipulation, dereferencing, trail testing, environment al-location, and redundant bounds checks. The transformation scheme serves as a unified framework for rea-soning about a variety of low level optimizations that have, to date, been dealt with in a more or less ad hoc manner.
Extracting Determinacy in Logic Programs
- In ICLP
, 1993
"... Unnecessary backtracking is a principal source of inefficiency in Prolog execution. In order to avoid the overhead of the general backtracking mechanism, determinate programs should be executed deterministically. Achieving this requires an automatic means of extracting determinacy. We present a meth ..."
Abstract
-
Cited by 17 (4 self)
- Add to MetaCart
Unnecessary backtracking is a principal source of inefficiency in Prolog execution. In order to avoid the overhead of the general backtracking mechanism, determinate programs should be executed deterministically. Achieving this requires an automatic means of extracting determinacy. We present a method in which determinacy is inferred from the success conditions and the calling contexts of predicates. Unlike previous approaches that rely on cuts or use a limited notion of test predicates, we propagate the conditions to detect determinacy, enabling us to handle a much larger class of programs. Since the conditions are propagated explicitly, the power of the method can be readily increased by increasing the expressiveness of these conditions. Moreover, our approach provides a uniform treatment of calling contexts and success conditions, and clearly spells out their roles in inferring determinacy. We also describe how determinacy information can be combined with state-of-the-art indexing t...
Fast Prolog with an Extended General Purpose Architecture
- in Proceedings of the 17th Annual International Symposium on Computer Architecture
, 1994
"... Most Prolog machines have been based on specialized architectures. Our goal is to start with a general purpose architecture and determine a minimal set of extensions for high performance Prolog execution. We have developed both the architecture and optimizing compiler simultaneously, drawing on resu ..."
Abstract
-
Cited by 12 (5 self)
- Add to MetaCart
Most Prolog machines have been based on specialized architectures. Our goal is to start with a general purpose architecture and determine a minimal set of extensions for high performance Prolog execution. We have developed both the architecture and optimizing compiler simultaneously, drawing on results of previous implementations. We find that most Prolog specific operations can be done satisfactorily in software; however, there is a crucial set of features that the architecture must support to achieve the best Prolog performance. The emphasis of this paper is on our architecture and instruction set. The costs and benefits of the special architectural features and instructions are analyzed. Simulated performance results are presented and indicate a peak compiled Prolog performance of 3.68 million logical inferences per second. 1 Introduction Logic programming in general and Prolog [22] in particular have become popular for rapid software prototyping, natural language translation, and ...
Detecting Determinate Computations by Bottom-up Abstract Interpretation
- In Proceedings of ESOP'92
, 1992
"... Abstract One of the most interesting characteristics of logic programs is the ability of expressing nondeterminism in an elegant and concise way. On the other hand, implementation of nondeterminism poses serious problems both in the sequential and in the concurrent case. If determinate computations ..."
Abstract
-
Cited by 11 (1 self)
- Add to MetaCart
Abstract One of the most interesting characteristics of logic programs is the ability of expressing nondeterminism in an elegant and concise way. On the other hand, implementation of nondeterminism poses serious problems both in the sequential and in the concurrent case. If determinate computations are detected through a static analysis, a noticeable reduction of the execution time may be obtained. This work describes a static analysis to detect determinate computations. The analysis does not require the knowledge of the activating modes of the predicate and it derives determinacies which may be inferred from the success set of the program.

