Results 1 
9 of
9
Some LowLevel Source Transformations for Logic Programs
 in Proceedings of Meta90 Workshop on Meta Programming in Logic
, 1990
"... This paper describes an algorithm performing an analysis and transformation of logic programs. The transformation achieves two goals: redundant functors are removed from the program, and procedures may be split into two or more specialised versions handling different cases. It can be applied to most ..."
Abstract

Cited by 30 (9 self)
 Add to MetaCart
This paper describes an algorithm performing an analysis and transformation of logic programs. The transformation achieves two goals: redundant functors are removed from the program, and procedures may be split into two or more specialised versions handling different cases. It can be applied to most logic programming languages, including concurrent logic programming languages, because the transformations perform no unfolding of the program; they only remove some redundant operations within the unifications. The main saving is in heap usage, though time performance may also be improved. One of the main purposes of the transformation is to “clean up ” programs generated by other methods of transformation or synthesis. The analysis is an example of an abstract interpretation, and is guaranteed to terminate. A Prolog implementation of the algorithm, illustrating some metaprogramming techniques, is given and some results are reported.
A Technique for Recursive Invariance Detection and Selective Program Specialization
 In Proc. 3rd. Int’l Symposium on Programming Language Implementation and Logic Programming. Number 528 in LNCS
, 1991
"... This paper presents a technique for achieving a class of optimizations related to the reduction of checks within cycles. The technique uses both Program Transformation and Abstract Interpretation. After a first pass of an abstract interpreter which detects simple invariants, program transformation i ..."
Abstract

Cited by 18 (12 self)
 Add to MetaCart
This paper presents a technique for achieving a class of optimizations related to the reduction of checks within cycles. The technique uses both Program Transformation and Abstract Interpretation. After a first pass of an abstract interpreter which detects simple invariants, program transformation is used to build a hypothetical situation that simplifies some predicates that should be executed within the cycle. This transformation implements the heuristic hypothesis that once conditional tests hold they may continue doing so recursively. Specialized versions of predicates are generated to detect and exploit those cases in which the invariance may hold. Abstract interpretation is then used again to verify the truth of such hypotheses and confirm the proposed simplification. This allows optimizations that go beyond those possible with only one pass of the abstract interpreter over the original program, as is normally the case. It also allows selective program specialization using a standard abstract interpreter not specifically designed for this purpose, thus simplifying the design of this already complex module of the compiler. In the paper, a class of programs amenable to such optimization is presented, along with some examples and an evaluation of the proposed techniques in some application areas such as floundering detection and reducing runtime tests in automatic logic program parallelization. The analysis of the examples presented interpretation and program transformation tools.
Automatic Parallelization Of Prolog Programs
, 1992
"... MACHINE : : : : : : : : : : : : : : : : : : : : : : 18 1.6 DATAFLOW AND DEPENDENCES : : : : : : : : : : : : : : : : : : : : : : : : 22 1.7 SOURCES OF PARALLELISM : : : : : : : : : : : : : : : : : : : : : : : : : : : : 31 2 OR PARALLEL EXECUTION OF PROLOG : : : : : : : : : : : : : : : : : : 33 2.1 T ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
MACHINE : : : : : : : : : : : : : : : : : : : : : : 18 1.6 DATAFLOW AND DEPENDENCES : : : : : : : : : : : : : : : : : : : : : : : : 22 1.7 SOURCES OF PARALLELISM : : : : : : : : : : : : : : : : : : : : : : : : : : : : 31 2 OR PARALLEL EXECUTION OF PROLOG : : : : : : : : : : : : : : : : : : 33 2.1 TERMINOLOGY : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 34 2.2 OUTLINE : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 34 2.3 PURE GOALS AND SOFT SIDEEFFECTS : : : : : : : : : : : : : : : : : : : : 34 2.4 PROCESSING CUT : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 38 2.5 PROCESSING ASSERTA, ASSERTZ AND RETRACT : : : : : : : : : : : : : : 42 2.6 IMPLEMENTATION AND PERFORMANCE : : : : : : : : : : : : : : : : : : : 47 2.7 SUMMARY : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 52 3 ESTIMATING INHERENT PARALLELISM : : : : : : : : : : : : : : : : : : 54 3.1 INTRODUCTION : : : : : : : : ...
Repeated Redundant Inequalities in Constraint Logic Programming
, 1994
"... A number of Constraint logic Programming systems, including CLP(R) and Prolog III, decide simultaneous linear inequalities as part of the fundamental operational step of constraint solving. While this can contribute tremendously to the usefulness of the systems, it is computationally quite expensive ..."
Abstract

Cited by 5 (4 self)
 Add to MetaCart
A number of Constraint logic Programming systems, including CLP(R) and Prolog III, decide simultaneous linear inequalities as part of the fundamental operational step of constraint solving. While this can contribute tremendously to the usefulness of the systems, it is computationally quite expensive. Nonground inequalities must generally be tested for consistency with the collected constraint set and then added to it, increasing its size, and thus making the next such test more expensive. Future redundant inequalities in a program are those that are guaranteed to be subsumed after no more than one subsequent procedure call, usually in the context of a recursive procedure. It has been noted that such inequalities need only be tested for consistency with the current constraint set, thus resulting in dramatic savings in execution speed and space usage. In this paper we generalize the notion of future redundancy in a number of ways and thus broaden its applicability. Thus we show how to d...
Optimizing Compilation of Linear Arithmetic in a Class of Constraint Logic Programs
 Department of Computer and Information Science, The Ohio State University
, 1994
"... A central issue in the optimizing compilation of Constraint Logic Programming (CLP) languages is how to compile away as much general constraint solving as possible. Most such work relies on obtaining mode and type information by global analysis, and uses it to generate specialized code for individua ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
A central issue in the optimizing compilation of Constraint Logic Programming (CLP) languages is how to compile away as much general constraint solving as possible. Most such work relies on obtaining mode and type information by global analysis, and uses it to generate specialized code for individual constraints and calls, often with the aid of multiple specialization. Some recent work has augmented these techniques with procedurelevel analysis of the interrelationships between constraints, to detect constraints that subsume other constraints, and variables that cease to be reachable at some point in a computation. In combination, these techniques have been shown to dramatically improve performance for a number of programs. Here we continue this line of investigation by considering a class of programs that accumulate and simplify systems of linear arithmetic constraints. The programs contain procedures that relate their parameters by an affine transform. For some calling patterns, th...
The applicability of logic program analysis and transformation to theorem proving
 Automated Deduction—CADE12
, 1994
"... Analysis and transformation techniques developed for logic programming can be successfully applied to automatic theorem proving. In this paper we demonstrate how these techniques can be used to infer useful information that can speed up theorem provers, assist in the identi cation of necessary infer ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Analysis and transformation techniques developed for logic programming can be successfully applied to automatic theorem proving. In this paper we demonstrate how these techniques can be used to infer useful information that can speed up theorem provers, assist in the identi cation of necessary inference rules for solving speci c problems, how failure branches can be eliminated from the proof tree and how a nonterminating deduction in a proof system can be turned into failure. In addition, this method also provides su cient conditions for identifying Casefree Theories [26]. The specialisation techniques developed in this paper are independent of the proof system and can therefore be applied to theorem provers for any logic written as logic programs. 2 1
Logic Program Development Based on Typed, Moded Schemata and Data Types
 UNIVERSITY OF BRISTOL
, 1997
"... The main contribution of the thesis is to develop a comprehensive framework for developing logic programs using #ve program schemata and some basic data types, and to evaluate its suitability for developing sizable programs. The schemata are intended to capture design decisions made by a programmer ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
The main contribution of the thesis is to develop a comprehensive framework for developing logic programs using #ve program schemata and some basic data types, and to evaluate its suitability for developing sizable programs. The schemata are intended to capture design decisions made by a programmer during topdown re#nement of a predicate. The schemata are completely independent from the data types, and have associated types and modes. The method of construction is to start from an initial typed moded call, and proceed using precisely defined refinement operations until primitive data type operations are introduced. It is shown that the construction method produces programs that are polymorphic manysorted formulas, and that computations using the programs cannot result in type or mode errors. The framework is compared with previous schemabased program development methods from the literature, and we argue that this method is better suited to the developmentof nontrivial programs, and is more amenable to computerised support. The introduction of types and modes into schemata is a significant addition, not previously reported. An approach to program veri#cation is also introduced, in which the proof of correctness of a program is built from proof schemata corresponding to the program schemata used in the design of the program. Finally an implementation of the system is described and its use is illustrated on some sizable programs. The implementation incorporates a static analysis algorithm for checking the validity of the modes during the development of the program.
Logic program specialisation with deletion of useless clauses
 In Proceedings of the 1993 International Symposium on Logic Programming
, 1993
"... In this paper we describe a method of program specialisation and give an extended example of its application to specialisation of a refutation proof procedure for rst order logic. In the specialisation method, a partial evaluation of the proof procedure with respect to a given theory is rst obtained ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
In this paper we describe a method of program specialisation and give an extended example of its application to specialisation of a refutation proof procedure for rst order logic. In the specialisation method, a partial evaluation of the proof procedure with respect to a given theory is rst obtained. Secondly an abstract interpretation of the partially evaluated program is computed, and this is used to detect and remove clauses that yield no solutions (useless clauses). A proof is given that such clauses can be deleted from a normal program while preserving the results of all nite computations. The model elimination proof procedure described in [20] is specialised with respect to given theories, and the negative ancestor check inference rule can be eliminated in cases where it is not relevant. Our results for the model elimination prover, obtained by generalpurpose transformations, are comparable to those obtained in [20] by a specialpurpose analysis. It is shown that specialisations of the proof procedure can be achieved that cannot be obtained by partial evaluation. The method is applicable to any normal program, and thus provides an extension of the power of partial evaluation.
Multiple Specialization through Local Analysis
, 1998
"... Program specialization is normally supported by global analysis of the program. Compilers use the information deduced to generate more efficient, specialized implementations of the program. This specialization can be single or multiple, depending if each procedure of the program is specialized into ..."
Abstract
 Add to MetaCart
Program specialization is normally supported by global analysis of the program. Compilers use the information deduced to generate more efficient, specialized implementations of the program. This specialization can be single or multiple, depending if each procedure of the program is specialized into one or more versions. We present a Prolog compiler that does multiple specialization, using an algorithm that works over the WAM code, deducing the reachable procedure activations based on local analysis. The idea is to use the analysis that is done in the Prolog to WAM compilation, and that generates local specialized instructions, and to propagate this information through the entire program. The creation of multiple versions of predicates allows the propagation to be interprocedural, and to achieve global program specialization. Results from an implementation generating C code as target language are presented, showing a performance comparable to native code Prolog compilers. Keywords: P...