Results 1 - 10
of
27
Ensuring Global Termination of Partial Deduction while Allowing Flexible Polyvariance
, 1995
"... The control of polyvariance is a key issue in partial deduction of logic programs. Certainly, only finitely many specialised versions of any procedure should be generated, while, on the other hand, overly severe limitations should not be imposed. In this paper, well-founded orderings serve as a star ..."
Abstract
-
Cited by 59 (14 self)
- Add to MetaCart
The control of polyvariance is a key issue in partial deduction of logic programs. Certainly, only finitely many specialised versions of any procedure should be generated, while, on the other hand, overly severe limitations should not be imposed. In this paper, well-founded orderings serve as a starting point for tackling this so-called "global termination" problem. Polyvariance is determined by the set of distinct "partially deduced" atoms generated during partial deduction. Avoiding ad-hoc techniques, we formulate a quite general framework where this set is represented as a tree structure. Associating weights with nodes, we define a well-founded order among such structures, thus obtaining a foundation for certified global termination of partial deduction. We include an algorithm template, concrete instances of which can be used in actual implementations, prove termination and correctness, and report on the results of some experiments. Finally, we conjecture that the proposed framewor...
Logic program specialisation through partial deduction: Control issues
- THEORY AND PRACTICE OF LOGIC PROGRAMMING
, 2002
"... Program specialisation aims at improving the overall performance of programs by performing source to source transformations. A common approach within functional and logic programming, known respectively as partial evaluation and partial deduction, is to exploit partial knowledge about the input. It ..."
Abstract
-
Cited by 46 (12 self)
- Add to MetaCart
Program specialisation aims at improving the overall performance of programs by performing source to source transformations. A common approach within functional and logic programming, known respectively as partial evaluation and partial deduction, is to exploit partial knowledge about the input. It is achieved through a well-automated application of parts of the Burstall-Darlington unfold/fold transformation framework. The main challenge in developing systems is to design automatic control that ensures correctness, efficiency, and termination. This survey and tutorial presents the main developments in controlling partial deduction over the past 10 years and analyses their respective merits and shortcomings. It ends with an assessment of current achievements and sketches some remaining research challenges.
Meta-Programming in Logic Programming
- Handbook of Logic in Artificial Intelligence and Logic Programming
, 1994
"... data types are facilitated in Godel by its type and module systems. Thus, in order to describe the meta-programming facilities of Godel, a brief account of these systems is given. Each constant, function, predicate, and proposition in a Godel program must be specified by a language declaration. The ..."
Abstract
-
Cited by 43 (3 self)
- Add to MetaCart
data types are facilitated in Godel by its type and module systems. Thus, in order to describe the meta-programming facilities of Godel, a brief account of these systems is given. Each constant, function, predicate, and proposition in a Godel program must be specified by a language declaration. The type of a variable is not declared but inferred from its context within a particular program statement. To illustrate the type system, we give the language declarations that would be required for the program in Figure 1. BASE Name. CONSTANT Tom, Jerry : Name. PREDICATE Chase : Name * Name; Cat, Mouse : Name. Note that the declaration beginning BASE indicates that Name is a base type. In the statement Chase(x,y) !- Cat(x) & Mouse(y). the variables x and y are inferred to be of type Name. Polymorphic types can also be defined in Godel. They are constructed from the base types, type variables called parameters, and type constructors. Each constructor has an arity 1 attached to it. As an...
Redundant Argument Filtering of Logic Programs
- Logic Program Synthesis and Transformation. Proceedings of LOPSTR’96, LNCS 1207
, 1996
"... This paper is concerned with the problem of removing, from a given logic program, redundant arguments. These are arguments which can be removed without affecting correctness. Most program specialisation techniques, even though they perform argument filtering and redundant clause removal, fail to re ..."
Abstract
-
Cited by 40 (17 self)
- Add to MetaCart
This paper is concerned with the problem of removing, from a given logic program, redundant arguments. These are arguments which can be removed without affecting correctness. Most program specialisation techniques, even though they perform argument filtering and redundant clause removal, fail to remove a substantial number of redundant arguments, yielding in some cases rather inefficient residual programs. We formalise the notion of a redundant argument and show that one cannot decide effectively whether a given argument is redundant. We then give a safe, effective approximation of the notion of a redundant argument and describe several simple and efficient algorithms calculating based on the approximative notion. We conduct extensive experiments with our algorithms on mechanically generated programs illustrating the practical benefits of our approach.
Offline specialisation in Prolog using a hand-written compiler generator
, 2004
"... The so called âcogen approachâ to program specialisation, writing a compiler generator instead of a specialiser, has been used with considerable success in partial evaluation of both functional and imperative languages. This paper demonstrates that this approach is also applicable to partial eva ..."
Abstract
-
Cited by 38 (21 self)
- Add to MetaCart
The so called âcogen approachâ to program specialisation, writing a compiler generator instead of a specialiser, has been used with considerable success in partial evaluation of both functional and imperative languages. This paper demonstrates that this approach is also applicable to partial evaluation of logic programming languages, also called partial deduction. Self-application has not been as much in focus in logic programming as for functional and imperative languages, and the attempts to self-apply partial deduction systems have, of yet, not been altogether that successful. So, especially for partial deduction, the cogen approach should prove to have a considerable importance when it comes to practical applications. This paper first develops a generic offline partial deduction technique for pure logic programs, notably supporting partially instantiated datastructures via binding types. From this a very efficient cogen is derived, which generates very efficient generating extensions (executing up to several orders of magnitude faster than current online systems) which in turn perform very good and non-trivial specialisation, even rivalling existing online systems. All this is supported by extensive benchmarks. Finally, it is shown how the cogen can be extended to directly support a large part of Prologâs declarative and non-declarative features and how semi-online specialisation can be efficiently integrated.
Conjunctive Partial Deduction: Foundations, Control, Algorithms, and Experiments
- J. LOGIC PROGRAMMING
, 1999
"... ..."
Program specialisation and abstract interpretation reconciled
- In Joint International Conference and Symposium on Logic Programming
, 1998
"... We clarify the relationship between abstract interpretation and program specialisation in the context of logic programming. We present a generic top-down abstract specialisation framework, along with a generic correctness result, into which a lot of the existing specialisation techniques can be cast ..."
Abstract
-
Cited by 27 (13 self)
- Add to MetaCart
We clarify the relationship between abstract interpretation and program specialisation in the context of logic programming. We present a generic top-down abstract specialisation framework, along with a generic correctness result, into which a lot of the existing specialisation techniques can be cast. The framework also shows how these techniques can be further improved by moving to more refined abstract domains. It, however, also highlights inherent limitations shared by all these approaches. In order to overcome them, and to fully unify program specialisation with abstract interpretation, we also develop a generic combined bottom-up/top-down framework, which allows specialisation and analysis outside the reach of existing techniques. 1
Conjunctive Partial Deduction in Practice
- Proceedings of the International Workshop on Logic Program Synthesis and Transformation (LOPSTR'96), LNCS 1207
, 1996
"... . Recently, partial deduction of logic programs has been extended to conceptually embed folding. To this end, partial deductions are no longer computed of single atoms, but rather of entire conjunctions; Hence the term "conjunctive partial deduction". Conjunctive partial deduction aims at achieving ..."
Abstract
-
Cited by 26 (19 self)
- Add to MetaCart
. Recently, partial deduction of logic programs has been extended to conceptually embed folding. To this end, partial deductions are no longer computed of single atoms, but rather of entire conjunctions; Hence the term "conjunctive partial deduction". Conjunctive partial deduction aims at achieving unfold/fold-like program transformations such as tupling and deforestation within fully automated partial deduction. However, its merits greatly surpass that limited context: Also other major efficiency improvements are obtained through considerably improved side-ways information propagation. In this extended abstract, we investigate conjunctive partial deduction in practice. We describe the concrete options used in the implementation(s), look at abstraction in a practical Prolog context, include and discuss an extensive set of benchmark results. From these, we can conclude that conjunctive partial deduction indeed pays off in practice, thoroughly beating its conventional precursor on a wide...
Abstract Interpretation over Non-Deterministic Finite Tree Automata for Set-Based Analysis of Logic Programs
- In Fourth International Symposium on Practical Aspects of Declarative Languages, number 2257 in LNCS
, 2002
"... Abstract. Set-based program analysis has many potential applications, including compiler optimisations, type-checking, debugging, verification and planning. One method of set-based analysis is to solve a set of set constraints derived directly from the program text. Another approach is based on abst ..."
Abstract
-
Cited by 25 (10 self)
- Add to MetaCart
Abstract. Set-based program analysis has many potential applications, including compiler optimisations, type-checking, debugging, verification and planning. One method of set-based analysis is to solve a set of set constraints derived directly from the program text. Another approach is based on abstract interpretation (with widening) over an infinite-height domain of regular types. Up till now only deterministic types have been used in abstract interpretations, whereas solving set constraints yields non-deterministic types, which are more precise. It was pointed out by Cousot and Cousot that set constraint analysis of a particular program P could be understood as an abstract interpretation over a finite domain of regular tree grammars, constructed from P. In this paper we define such an abstract interpretation for logic programs, formulated over a domain of non-deterministic finite tree automata, and describe its implementation. Both goal-dependent and goal-independent analysis are considered. Variations on the abstract domains operations are introduced, and we discuss the associated tradeoffs of precision and complexity. The experimental results indicate that this approach is a practical way of achieving the precision of set-constraints in the abstract interpretation framework. 1
A conceptual embedding of folding into partial deduction: Towards a maximal integration
, 1996
"... The relation between partial deduction and the unfold/fold approach has been a matter of intense discussion. In this paper we consolidate the advantages of the two approaches and provide an extended partial deduction framework in which most of the tupling and deforestation transformations of the fol ..."
Abstract
-
Cited by 25 (13 self)
- Add to MetaCart
The relation between partial deduction and the unfold/fold approach has been a matter of intense discussion. In this paper we consolidate the advantages of the two approaches and provide an extended partial deduction framework in which most of the tupling and deforestation transformations of the fold/unfold approach, as well the current partial deduction transformations, can be achieved. Moreover, most of the advantages of partial deduction, e.g. lower complexity and a more detailed understanding of control issues, are preserved. We build on well-defined concepts in partial deduction and present a conceptual embedding of folding into partial deduction, called conjunctive partial deduction. Two minimal extensions to partial deduction are proposed: using conjunctions of atoms instead of atoms as the principle specialisation entity and also renaming conjunctions of atoms instead of individual atoms. Correctness results for the extended framework (with respect to computed answer semantics and finite failure semantics) are given. Experiments with a prototype implementation are presented, showing that, somewhat to our surprise, conjunctive partial deduction not only handles the removal of unnecessary variables, but also leads to substantial improvements in specialisation for standard partial deduction examples. 1

