Results 1 - 10
of
11
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...
Global control for partial deduction through characteristic atoms and global trees
, 1995
"... Abstract. Recently, considerable advances have been made in the (online) control of logic program specialisation. A clear conceptual distinction has been established between local and global control and on both levels concrete strategies as well as general frameworks have been proposed. For global c ..."
Abstract
-
Cited by 47 (21 self)
- Add to MetaCart
Abstract. Recently, considerable advances have been made in the (online) control of logic program specialisation. A clear conceptual distinction has been established between local and global control and on both levels concrete strategies as well as general frameworks have been proposed. For global control in particular, recent work has developed concrete techniques based on the preservation of characteristic trees (limited, however, by a given, arbitrary depth bound) to obtain a very precise control of polyvariance. On the other hand, the concept of an m-tree has been introduced as a refined way to trace “relationships ” of partially deduced atoms, thus serving as the basis for a general framework within which global termination of partial deduction can be ensured in a non ad hoc way. Blending both, formerly separate, contributions, in this paper, we present an elegant and sophisticated technique to globally control partial deduction of normal logic programs. Leaving unspecified the specific local control one may wish to plug in, we develop a concrete global control strategy combining the use of characteristic atoms and trees with global (m-)trees. We thus obtain partial deduction that always terminates in an elegant, non ad hoc way, while providing excellent specialisation as well as fine-grained (but reasonable) polyvariance. We conjecture that a similar approach may contribute to improve upon current (on-line) control strategies for functional program transformation methods such as (positive) supercompilation. 1
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...
To Parse or Not To Parse
- Logic Program Synthesis and Transformation. Proceedings of LOPSTR’97, LNCS 1463
, 1997
"... . In this paper, we reconsider the problem of specialising the vanilla meta interpreter through fully automatic and completely general partial deduction techniques. In particular, we study how the homeomorphic embedding relation guides specialisation of the interpreter. We focus on the so-called ..."
Abstract
-
Cited by 17 (6 self)
- Add to MetaCart
. In this paper, we reconsider the problem of specialising the vanilla meta interpreter through fully automatic and completely general partial deduction techniques. In particular, we study how the homeomorphic embedding relation guides specialisation of the interpreter. We focus on the so-called parsing problem, i.e. removing all parsing overhead from the program, and demonstrate that further refinements in the control of general partial deduction are necessary to properly deal with it. In particular, we modify local control on the basis of information imported from the global level. The resulting control strategy, while remaining fully general, leads to excellent specialisation of vanilla like meta programs. Parsing is always specialised, but -- appropriately, as we will show -- not always completely removed. As a concrete application, we subject an extended vanilla meta interpreter capable of dealing with compositions of programs to our techniques, showing we equal or surpass results obtained through a more ad hoc approach. 1
Using Regular Approximations for Generalisation During Partial Evaluation
- IN PROCEEDINGS OF THE 2000 ACM SIGPLAN WORKSHOP ON PARTIAL EVALUATION AND SEMANTICS-BASED PROGRAM MANIPULATION (PEPM’2000
, 2000
"... On-line partial evaluation algorithms include a generalisation step, which is needed to ensure termination. In partial evaluation of logic and functional programs, the usual generalisation operation applied to computation states is the most specific generalisation (msg) of expressions. This can caus ..."
Abstract
-
Cited by 13 (3 self)
- Add to MetaCart
On-line partial evaluation algorithms include a generalisation step, which is needed to ensure termination. In partial evaluation of logic and functional programs, the usual generalisation operation applied to computation states is the most specific generalisation (msg) of expressions. This can cause loss of information, which is especially serious in programs whose computations #rst build some internal data structure, which is then used to control a subsequent phase of execution - a common pattern of computation. If the size of the intermediate data is unbounded at partial evaluation time then the msg will lose almost all information about its structure. Hence the second phase of computation cannot be effectively specialised. In this paper
Binding-Time Analysis by Constraint Solving - A modular and higher-order approach for Mercury
- In Procs. of LPAR2000, LNAI 1955, 399--416
, 2000
"... . In this paper we present a binding-time analysis for the logic programming language Mercury. Binding-time analysis is a key analysis needed to perform o-line program specialisation. Our analysis deals with the higher-order aspects of Mercury, and is formulated by means of constraint normalisat ..."
Abstract
-
Cited by 12 (4 self)
- Add to MetaCart
. In this paper we present a binding-time analysis for the logic programming language Mercury. Binding-time analysis is a key analysis needed to perform o-line program specialisation. Our analysis deals with the higher-order aspects of Mercury, and is formulated by means of constraint normalisation. This allows (at least part of) the analysis to be performed on a modular basis. 1 Introduction Mercury is a recently introduced logic programming language, comprising many features needed for modern software engineering practice: polymorphism, typeclasses and a strong module system are some examples of the means available to the programmer to design and build modular programs that employ a lot of abstraction and reuse of general components. Employing abstraction and generality, however, imposes a penalty on the e- ciency of the resulting program due to the presence of for example procedure calls and tests for which the input is (partially) known at compile-time. To overcome this pe...
Binding-Time Analysis for Mercury
- 16th International Conference on Logic Programming, pages 500 { 514
, 1999
"... . In this paper, we describe a binding-time analysis (BTA) for a statically typed and strongly moded pure logic programming language, in casu Mercury. Binding-time analysis is the key concept in achieving o-line program specialisation: the analysis starts from a description of the program's inpu ..."
Abstract
-
Cited by 8 (4 self)
- Add to MetaCart
. In this paper, we describe a binding-time analysis (BTA) for a statically typed and strongly moded pure logic programming language, in casu Mercury. Binding-time analysis is the key concept in achieving o-line program specialisation: the analysis starts from a description of the program's input available for specialisation, and propagates this information throughout the program, deriving directives for when and how to perform specialisation. 1
Bottom Up Information Propagation for Partial Deduction (Extended Abstract)
- Proceedings of the International Workshop on Specialization of Declarative Programs and its Applications
, 1997
"... ) Wim Vanhoof Departement Computerwetenschappen Katholieke Universiteit Leuven Celestijnenlaan 200A, B-3001 Heverlee, Belgium e-mail: wimvh@cs.kuleuven.ac.be Tel: +32 16 327638, Fax: +32 16 327996 Abstract Traditional top down specialisation techniques are not optimal to specialise programs cont ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
) Wim Vanhoof Departement Computerwetenschappen Katholieke Universiteit Leuven Celestijnenlaan 200A, B-3001 Heverlee, Belgium e-mail: wimvh@cs.kuleuven.ac.be Tel: +32 16 327638, Fax: +32 16 327996 Abstract Traditional top down specialisation techniques are not optimal to specialise programs containing a lot of internal structure handling, such as programs containing abstract data types or meta programs. In this abstract, we discuss the difficulties top down specialisers have when specialising these kinds of programs. The difficulties arise from the fact that unfolding works in a top down way, whereas some information flows in a bottom up way. Therefore, top down techniques must be able to unfold deeply enough to reach the necessary information, and subsequently be able to keep it during specialisation. We therefore propose a program transformation phase, targeted to be interleaved with a completely general and fully automatic top down partial deduction scheme, which consists of pro...
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
A Toolkit for Static Analysis of Constraint Logic Programs
, 1997
"... Generic systems for the analysis of logic programs have been proposed over the last decade or so. Considerable progress has been made in terms of frameworks, algorithms, abstract domains and implementations. A number of generic top-down procedural frameworks are widely available. However, implementa ..."
Abstract
-
Cited by 4 (1 self)
- Add to MetaCart
Generic systems for the analysis of logic programs have been proposed over the last decade or so. Considerable progress has been made in terms of frameworks, algorithms, abstract domains and implementations. A number of generic top-down procedural frameworks are widely available. However, implementation e#orts for bottom-up declarative frameworks are in a preliminary stage. In this thesis

