Results 11 - 20
of
26
Constrained Partial Deduction and the Preservation of Characteristic Trees
- NEW GENERATION COMPUTING
, 1997
"... Partial deduction strategies for logic programs often use an abstraction operator to guarantee the finiteness of the set of goals for which partial deductions are produced. Finding an abstraction operator which guarantees finiteness and does not lose relevant information is a difficult problem. I ..."
Abstract
-
Cited by 21 (16 self)
- Add to MetaCart
Partial deduction strategies for logic programs often use an abstraction operator to guarantee the finiteness of the set of goals for which partial deductions are produced. Finding an abstraction operator which guarantees finiteness and does not lose relevant information is a difficult problem. In earlier work Gallagher and Bruynooghe proposed to base the abstraction operator on characteristic paths and trees, which capture the structure of the generated incomplete SLDNF-tree for a given goal. In this paper we exhibit the advantages of characteristic trees over purely syntactical measures: if characteristic trees can be preserved upon generalisation, then we obtain an almost perfect abstraction operator, providing just enough polyvariance to avoid any loss of local specialisation. Unfortunately, the abstraction operators proposed in earlier work do not always preserve the characteristic trees upon generalisation. We show that this can lead to important specialisation losses as well as to non-termination of the partial deduction algorithm. Furthermore, this problem cannot be adequately solved in the ordinary partial deduction setting. We therefore extend the expressivity and precision of the Lloyd and Shepherdson partial deduction framework by integrating constraints. We provide formal correctness results for the so obtained generic framework of constrained partial deduction. Within this new framework we are, among others, able to overcome the above mentioned problems by introducing an alternative abstraction operator, based on so called pruning constraints. We thus present a terminating partial deduction strategy which, for purely determinate unfolding rules, induces no loss of local specialisation due to the abstraction while ensuring correctness o...
Improving Control in Functional Logic Program Specialization
, 1998
"... We have recently defined a framework for Narrowing-driven Partial Evaluation (NPE) of functional logic programs. This method is as powerful as partial deduction of logic programs and positive supercompilation of functional programs. Although it is possible to treat complex terms containing primitive ..."
Abstract
-
Cited by 18 (12 self)
- Add to MetaCart
We have recently defined a framework for Narrowing-driven Partial Evaluation (NPE) of functional logic programs. This method is as powerful as partial deduction of logic programs and positive supercompilation of functional programs. Although it is possible to treat complex terms containing primitive functions (e.g. conjunctions or equations) in the NPE framework, its basic control mechanisms do not allow for effective polygenetic specialization of these complex expressions. We introduce a sophisticated unfolding rule endowed with a dynamic narrowing strategy which permits flexible scheduling of the elements (in conjunctions) which are reduced during specialization. We also present a novel abstraction operator which carefully considers primitive functions and is the key to achieving accurate polygenetic specialization. The abstraction operator extends some recent partitioning techniques defined in the framework of conjunctive partial deduction. We provide experimental results obtained from an implementation using the INDY system which demonstrate that the control refinements produce better specializations.
Cost-Augmented Narrowing-Driven Specialization
, 2002
"... The aim of many program transformers is to improve efficiency while preserving program meaning. Correctness issues have been dealt with extensively. However, very little attention has been paid to formally establish the improvements achieved by these transformers. In this work, we introduce the sche ..."
Abstract
-
Cited by 12 (9 self)
- Add to MetaCart
The aim of many program transformers is to improve efficiency while preserving program meaning. Correctness issues have been dealt with extensively. However, very little attention has been paid to formally establish the improvements achieved by these transformers. In this work, we introduce the scheme of a narrowing-driven partial evaluator enhanced with abstract costs. They are "abstract" in the sense that they measure the number of basic operations performed during a computation rather than actual execution times. Thus, we have available a setting in which one can discuss the effects of the program transformer in a precise framework and, moreover, to quantify these effects. Our scheme may serve as a basis to develop speedup analyses and cost-guided transformers. An implementation of the cost-augmented specializer has been undertaken, which demonstrates the practicality of our approach.
Program Generation, Termination, and Binding-time Analysis
, 2002
"... Recent research suggests that the goal of fully automatic and reliable program generation for a broad range of applications is coming nearer to feasibility. However, several interesting and challenging problems remain to be solved before it becomes a reality. Solving them is also necessary, if we ho ..."
Abstract
-
Cited by 7 (0 self)
- Add to MetaCart
Recent research suggests that the goal of fully automatic and reliable program generation for a broad range of applications is coming nearer to feasibility. However, several interesting and challenging problems remain to be solved before it becomes a reality. Solving them is also necessary, if we hope ever to elevate software engineering from its current state (a highly-developed handiwork) into a successful branch of engineering, capable of solving a wide range of new problems by systematic, well-automated and well-founded methods.
Partial Deduction System
- In Proc. of the ILPS'97 Workshop on Tools and Environments for (Constraint) Logic Programming, U.P
, 1997
"... We present the fully automatic partial deduction system ecce, which can be used to specialise and optimise logic programs. We describe the underlying principles of ecce and illustrate some of the potential application areas. Interesting possibilites of crossfertilisation with other fields such as r ..."
Abstract
-
Cited by 5 (1 self)
- Add to MetaCart
We present the fully automatic partial deduction system ecce, which can be used to specialise and optimise logic programs. We describe the underlying principles of ecce and illustrate some of the potential application areas. Interesting possibilites of crossfertilisation with other fields such as reachability analysis of concurrent systems and inductive theorem proving are highlighted and substantiated. 1 Introduction Program specialisation, also called partial evaluation or partial deduction, is an automatic technique for program optimisation. The central idea is to specialise a given source program for a particular application domain. Program specialisation encompasses traditional compiler optimisation techniques, such as constant folding and in-lining, but uses more aggressive transformations, yielding both the possibility of obtaining (much) greater speedups and more difficulty in controlling the transformation process. In addition to achieving important speedups, program special...
Specialising The Other Way Around
- Proceedings of the Joint International Conference and Symposium on Logic Programming JICSLP’98
, 1998
"... In this paper, we present a program transformation based on bottom up evaluation of logic programs. We explain that using this technique, programs can be "specialised" w.r.t. a set of unit clauses instead of a query. Moreover, examples indicate that excellent specialisation can be obtained when this ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
In this paper, we present a program transformation based on bottom up evaluation of logic programs. We explain that using this technique, programs can be "specialised" w.r.t. a set of unit clauses instead of a query. Moreover, examples indicate that excellent specialisation can be obtained when this bottom up transformation is combined with a more traditional top down approach, resulting in conceptually cleaner techniques requiring a less complicated control than one overall approach. 1
Generalization in Hierarchies of Online Program Specialization Systems
, 1998
"... . In recent work, we proposed a simple functional language S-graph-n to study metaprogramming aspects of self-applicable online program specialization. The primitives of the language provide support for multiple encodings of programs. An important component of online program specialization is the te ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
. In recent work, we proposed a simple functional language S-graph-n to study metaprogramming aspects of self-applicable online program specialization. The primitives of the language provide support for multiple encodings of programs. An important component of online program specialization is the termination strategy. In this paper we show that such a representation has the great advantage of simplifying generalization of multiply encoded data. After developing and formalizing the basic metaprogramming concepts, we extend two basic methods to multiply encoded data: most specific generalization and the homeomorphic embedding relation. Examples and experiments with the initial design of an online specializer illustrate their use in hierarchies of online program specializers. 1 Introduction Multiple levels of metaprograms have become an issue for several reasons, on the one hand they are a natural extension of metaprogramming approaches, on the other hand they have been used to great adv...
Flexible Continuations in Logic Programs via Unfold/Fold Transformations and Goal Generalization
- In Proceedings of the 2nd ACM SIGPLAN Workshop on Continuations
, 1997
"... We consider the use of continuations for deriving efficient logic programs. It is known that both in the case of functional and logic programming, the introduction of continuations is a valuable technique for transforming old programs into new, more efficient ones. However, in general, in order to d ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
We consider the use of continuations for deriving efficient logic programs. It is known that both in the case of functional and logic programming, the introduction of continuations is a valuable technique for transforming old programs into new, more efficient ones. However, in general, in order to derive programs with high levels of efficiency, one should introduce continuations according to suitable strategies. In particular, we show that it is preferable to introduce continuations in a flexible way, that is, during the process of program transformation itself, rather than at its beginning or at its end. We extend logic programs by allowing variables to range over goals, and we propose a set of transformation rules for this extended language. We propose a generalization strategy for the introduction of goal variables which may be viewed as continuations and they allow for the derivation of very efficient programs. 1 Introduction Continuation-based program transformations [22] have be...
Controlling Conjunctive Partial Deduction
, 1996
"... . Partial deduction within Lloyd and Shepherdson's framework transforms different atoms of a goal independently and therefore fails to achieve a number of unfold/fold transformations. A recent framework for conjunctive partial deduction allows unfold/fold transformations by specialisation of entire ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
. Partial deduction within Lloyd and Shepherdson's framework transforms different atoms of a goal independently and therefore fails to achieve a number of unfold/fold transformations. A recent framework for conjunctive partial deduction allows unfold/fold transformations by specialisation of entire conjunctions, but does not give an actual algorithm for conjunctive partial deduction, and in particular does not address control issues (e.g. how to select atoms for unfolding). Focusing on novel challenges specific to local and global control, we describe a generic algorithm for conjunctive partial deduction, refine it into a fully automatic concrete algorithm, and prove termination and correctness. 1 Introduction Partial deduction, introduced by Komorowski [17] and formalised by Lloyd and Shepherdson [24], takes a program and a query and returns a specialised program tuned towards answering any instance of the query. Partial deduction in Lloyd and Shepherdson's framework cannot achieve c...
Specialization of Functional Logic Programs
"... Languages that integrate functional and logic programming with a complete operational semantics are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. In this article, we prese ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
Languages that integrate functional and logic programming with a complete operational semantics are based on narrowing, a unification-based goal-solving mechanism which subsumes the reduction principle of functional languages and the resolution principle of logic languages. In this article, we present a partial evaluation scheme for functional logic languages based on an automatic unfolding algorithm which builds narrowing trees. The method is formalized within the theoretical framework established by Lloyd and Shepherdson for the partial deduction of logic programs, which we have generalized for dealing with functional computations. A generic specialization algorithm is proposed which does not depend on the eager or lazy nature of the narrower being used. To the best of our knowledge, this is the first generic algorithm for the specialization of functional logic programs. We study the semantic properties of the transformation and the conditions under which the technique terminates, is...

