Results 1 - 10
of
11
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.
Creating Specialised Integrity Checks Through Partial Evaluation Of Meta-Interpreters
, 1994
"... ..."
Termination Analysis for Tabled Logic Programming
- In Proc. of LOPSTR’97
, 1997
"... We provide a theoretical basis for studying the termination of tabled logic programs executed under SLG-resolution using a left-to-right computation rule. To this end, we study the classes of quasi-terminating and LG-terminating programs (for a set of atomic goals S). These are tabled logic programs ..."
Abstract
-
Cited by 16 (9 self)
- Add to MetaCart
We provide a theoretical basis for studying the termination of tabled logic programs executed under SLG-resolution using a left-to-right computation rule. To this end, we study the classes of quasi-terminating and LG-terminating programs (for a set of atomic goals S). These are tabled logic programs where execution of each call from S leads to only a finite number of different (i.e., non-variant) calls, and a finite number of different calls and computed answer substitutions for them, respectively. We then relate these two classes through a program transformation, and present a characterisation of quasi-termination by means of the notion of quasi-acceptability of tabled programs. The latter provides us with a practical method of proving termination and the method is illustrated on non-trivial examples of tabled logic programs.
Schreye. Termination Proofs for Logic Programs with Tabling
- ACM Transactions on Computational Logic
, 2001
"... Tabled evaluation is receiving increasing attention in the logic programming community. It avoids many of the shortcomings of SLD execution and provides a more flexible and often considerably more efficient execution mechanism for logic programs. In particular, tabled execution terminates more often ..."
Abstract
-
Cited by 14 (1 self)
- Add to MetaCart
Tabled evaluation is receiving increasing attention in the logic programming community. It avoids many of the shortcomings of SLD execution and provides a more flexible and often considerably more efficient execution mechanism for logic programs. In particular, tabled execution terminates more often than execution based on SLD-resolution. In this article, we introduce two notions of universal termination of logic programming with tabling: quasi-termination and (the stronger notion of) LG-termination. We present sufficient conditions for these two notions of termination, namely quasi-acceptability and LG-acceptability, and we show that these conditions are also necessary in case the selection of tabled predicates meets certain natural criteria. Starting from these conditions, we develop modular termination proofs, i.e., proofs capable of combining termination proofs of separate programs to obtain termination proofs of combined programs. Finally, in the presence of mode information, we state sufficient conditions which form the basis for automatically proving termination in a constraint-based way.
A Polyvariant Binding-Time Analysis for Off-line Partial Deduction
- Proceedings of the European Symposium on Programming (ESOP’98), LNCS 1381
, 1998
"... We study the notion of binding-time analysis for logic programs. We formalise the unfolding aspect of an on-line partial deduction system as a Prolog program. Using abstract interpretation, we collect information about the run-time behaviour of the program. We use this information to make the contro ..."
Abstract
-
Cited by 14 (11 self)
- Add to MetaCart
We study the notion of binding-time analysis for logic programs. We formalise the unfolding aspect of an on-line partial deduction system as a Prolog program. Using abstract interpretation, we collect information about the run-time behaviour of the program. We use this information to make the control decisions about the unfolding at analysis time and to turn the on-line system into an off-line system. We report on some initial experiments.
Modular Termination Proofs for Prolog with Tabling
, 1999
"... Tabling avoids many of the shortcomings of SLD(NF) execution and provides a more exible and ecient execution mechanism for logic programs. In particular, tabled execution of logic programs terminates more often than execution based on SLD-resolution. One of the few works studying termination under a ..."
Abstract
-
Cited by 8 (4 self)
- Add to MetaCart
Tabling avoids many of the shortcomings of SLD(NF) execution and provides a more exible and ecient execution mechanism for logic programs. In particular, tabled execution of logic programs terminates more often than execution based on SLD-resolution. One of the few works studying termination under a tabled execution mechanism is that of Decorte et al. They introduce and characterise two notions of universal termination of logic programs w.r.t. sets of queries executed under SLG-resolution, using the left-to-right selection rule; namely the notion of quasi-termination and the (stronger) notion of LG-termination. This paper extends the results of Decorte et al in two ways: (1) we consider a mix of tabled and Prolog execution, and (2) besides a characterisation of the two notions of universal termination under such a mixed execution, we also give modular termination conditions. From both practical and efficiency considerations, it is important to allow tabled and non-tabled predicates to be freely intermixed. This motivates the first extension. Concerning the second extension, it was already noted in the literature in the context of termination under SLD-resolution (by e.g. Apt and Pedreschi), that it is important for programming in the large to have modular termination proofs, i.e. proofs that are capable of combining termination proofs of separate programs to obtain termination proofs of combined programs.
Quasi-Terminating Logic Programs for Ensuring the Termination of Partial Evaluation
- In Proc. of the ACM SIGPLAN 2007 Workshop on Partial Evaluation and Program Manipulation (PEPM’07
, 2007
"... Abstract. A logic program strongly quasi-terminates when only a finite number of distinct atoms (modulo variable renaming) are derivable from any given query and computation rule. This notion of quasi-termination, though stronger than related notions that only consider Prolog’s computation rule, is ..."
Abstract
-
Cited by 8 (4 self)
- Add to MetaCart
Abstract. A logic program strongly quasi-terminates when only a finite number of distinct atoms (modulo variable renaming) are derivable from any given query and computation rule. This notion of quasi-termination, though stronger than related notions that only consider Prolog’s computation rule, is essential for ensuring the termination of partial evaluation, where liberal selection policies are often mandatory to achieve a good specialization. In this paper, we introduce sufficient conditions for the strong termination and quasi-termination of logic programs which are based on the construction of size-change graphs. The class of strongly quasi-terminating logic programs, however, is too restricted. Therefore, we also introduce an annotation procedure that annotates those predicate arguments which are responsible of the non-quasi-termination. As a consequence, the annotated program behaves like a quasi-terminating program if annotated arguments are generalized (i.e., replaced by a fresh variable) when they occur in a computation. We illustrate the usefulness of our approach by designing a simple partial evaluator in which global termination is always ensured offline (i.e., statically). A prototype implementation demonstrates its viability. 1
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...
Termination of Simply-Moded Well-Typed Logic Programs under a Tabled Execution Mechanism
, 2001
"... Tabled logic programming is receiving increasing attention in the Logic Programming community. It avoids many of the shortcomings of SLD(NF) execution and provides a more flexible and often extremely efficient execution mechanism for logic programs. In particular, tabled execution of logic programs ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
Tabled logic programming is receiving increasing attention in the Logic Programming community. It avoids many of the shortcomings of SLD(NF) execution and provides a more flexible and often extremely efficient execution mechanism for logic programs. In particular, tabled execution of logic programs terminates more often than execution based on SLD-resolution. So, if a program can be proven to terminate under SLD-resolution, then the program will trivially also terminate under SLG-resolution, the resolution principle of tabling. But, since there are SLG-terminating programs which are not SLD-terminating, more effective proof techniques can be found. One of the few approaches studying termination of tabled logic programs was developed by Decorte et al. They present necessary and sufficient conditions for two notions of termination under LG-resolution, i.e. SLG-resolution with left-to-right selection rule: quasi-termination and (the stronger notion of) LG-termination. Starting from these necessary and sufficient conditions, we introduce sufficient conditions for quasi-termination and LG-termination which are stated fully at the clause level and are easy to automatize. To this end, we use mode and type information: we consider simply-moded, well-typed programs and queries. We point out how our termination conditions can be automatized, by extending the recently developed, constraint-based, automatic termination analysis for SLD-resolution of Decorte and De Schreye. Finally, we present a result on substitution-closedness of quasi-termination and LG-termination for the class of simply-moded, well-typed programs and queries.
Extending Partial Deduction to Tabled Execution: Some Results and Open Issues
, 1998
"... normally occur in Prologstyle SLD evaluation and avoids performing redundant subcomputations. As a result, tabling significantly extends the range of applications of logic programming (LP). Moreover, because of the better termination and complexity properties of tabled execution, tabled-based system ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
normally occur in Prologstyle SLD evaluation and avoids performing redundant subcomputations. As a result, tabling significantly extends the range of applications of logic programming (LP). Moreover, because of the better termination and complexity properties of tabled execution, tabled-based systems such as XSB [Sagohas et al. 1994] make a good first step in fulfilling the promise of declarativeness: allow a programmer to write problem specifications, and then use meaning-preserving transformations or use tabled execution selectively to turn these specifications into effective programs. 2. PARTIAL DEDUCTION AND TABLING So, tabling makes more specifications executable. Obviously, it is of great interest, that these specifications are executed efficiently. Partial evaluation [Jones et al. 1993; Jones 1996; Danvy et al. 1996] aims at exactly this: improve the performance by carrying out part of the program's execution (for input of a particular form) at Authors' address: Departement Co

