Results 1 - 10
of
10
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.
Verification of Logic Programs with Delay Declarations
- Proceedings of the Fourth International Conference on Algebraic Methodology and Software Technology, (AMAST'95), Lecture Notes in Computer Science
, 1995
"... . Logic programs augmented with delay declarations form a higly expressive programming language in which dynamic networks of processes that communicate asynchronously by means of multiparty channels can be easily created. In this paper we study correctness these programs. In particular, we propose p ..."
Abstract
-
Cited by 29 (1 self)
- Add to MetaCart
. Logic programs augmented with delay declarations form a higly expressive programming language in which dynamic networks of processes that communicate asynchronously by means of multiparty channels can be easily created. In this paper we study correctness these programs. In particular, we propose proof methods allowing us to deal with occur check freedom, absence of deadlock, absence of errors in presence of arithmetic relations, and termination. These methods turn out to be simple modifications of the corresponding methods dealing with Prolog programs. This allows us to derive correct delay declarations by analyzing Prolog programs. Finally, we point out difficulties concerning proofs of termination. Notes. The research of the first author was partly supported by the ESPRIT Basic Research Action 6810 (Compulog 2). This paper will appear as an invited lecture in: Proc. of the Fourth International Conference on Algebraic Methodology and Software Technology, (AMAST'95). 1 Introduction ...
Proving Termination of Input-Consuming Logic Programs
, 1999
"... A class of predicates is identified for which termination does not depend on left-to-right execution. The only assumption about the selection rule is that derivations are input-consuming, that is, in each derivation step, the input arguments of the selected atom do not become instantiated. This assu ..."
Abstract
-
Cited by 14 (5 self)
- Add to MetaCart
A class of predicates is identified for which termination does not depend on left-to-right execution. The only assumption about the selection rule is that derivations are input-consuming, that is, in each derivation step, the input arguments of the selected atom do not become instantiated. This assumption is a natural abstraction of previous work on programs with delay declarations. The method for showing that a predicate is in that class is based on level mappings, closely following the traditional approach for LD-derivations. Programs are assumed to be well and nicely moded, which are two widely used concepts for verification. Many predicates terminate under such weak assumptions. Knowing these predicates is useful even for programs where not all predicates have this property.
Generating Efficient, Terminating Logic Programs
- In Proceedings of TAPSOFT'97, number 1214 in Lecture Notes in Computer Science
, 1997
"... . The objective of control generation in logic programming is to automatically derive a computation rule for a program that is efficient and yet does not compromise program correctness. Progress in solving this important problem has been slow and, to date, only partial solutions have been proposed w ..."
Abstract
-
Cited by 10 (3 self)
- Add to MetaCart
. The objective of control generation in logic programming is to automatically derive a computation rule for a program that is efficient and yet does not compromise program correctness. Progress in solving this important problem has been slow and, to date, only partial solutions have been proposed where the generated programs are either incorrect or inefficient. We show how the control generation problem can be tackled with a simple automatic transformation that relies on information about the depths of SLD-trees. To prove correctness of our transform we introduce the notion of a semi delay recurrent program which generalises previous ideas in the termination literature for reasoning about logic programs with dynamic selection rules. 1 Introduction A logic program can be considered as consisting of a logic component and a control component [8]. Although the meaning of the program is largely defined by its logical specification, choosing the right control mechanism is crucial in obtain...
Termination of Logic Programs with block Declarations Running in Several Modes
- Proceedings of the 10th Symposium on Programming Language Implementations and Logic Programming, LNCS
, 1998
"... We show how termination of logic programs with delay declarations can be proven. Three features are distinctive of this work: (a) we assume that predicates can be used in several modes; (b) we show that block declarations, which are a very simple delay construct, are sufficient; (c) we take the sele ..."
Abstract
-
Cited by 9 (5 self)
- Add to MetaCart
We show how termination of logic programs with delay declarations can be proven. Three features are distinctive of this work: (a) we assume that predicates can be used in several modes; (b) we show that block declarations, which are a very simple delay construct, are sufficient; (c) we take the selection rule into account, assuming it to be as in most Prolog implementations. Our method is based on identifying the so-called robust predicates, for which the textual position of an atom using this predicate is irrelevant. The method can be used to verify existing programs, and to assist in writing new programs. As a byproduct, we also show how programs can be proven to be free from occur-check and floundering.
Proving Correctness of Constraint Logic Programs with Dynamic Scheduling
, 1996
"... A general framework based on Hoare logic is introduced for specifying and reasoning about Constraint Logic Programs with dynamic scheduling. The framework consists of a mixed formalism of programs in a ccp-like language, on the one hand, and correctness properties of the Hoare logic, on the other ha ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
A general framework based on Hoare logic is introduced for specifying and reasoning about Constraint Logic Programs with dynamic scheduling. The framework consists of a mixed formalism of programs in a ccp-like language, on the one hand, and correctness properties of the Hoare logic, on the other hand. In this formalism delay conditions are viewed as a specific class of correctness properties. In the construction of the proof-system we follow the lines of a previous proof-system we developed for concurrent constraint programming, which was sound, but not complete (for ccp). Due to the different kind of choice used in CLP, on the contrary, the system considered here is both sound and complete. Keywords: Dynamic scheduling, concurrent constraint programming, partial correctness, strongest postcondition. Corresponding author: M. Gabbrielli Dipartimento di Informatica Universit`a di Pisa Corso Italia 40, 56125 Pisa, Italy Tel: +39-50-887264 Fax: +39-50-887226 gabbri@di.unipi.it This w...
Compositional Logic Programming
- In Proceedings of the JICSLP'96 post-conference workshop: Multi-paradigm logic programming, Report 96-28. Technische Universitat
, 2000
"... Relational program derivation has gathered momentum over the last decade with the development of many specification logics. However, before such relational specifications can be executed in existing programming languages, they must be carefully phrased to respect the evaluation order of the langu ..."
Abstract
-
Cited by 6 (1 self)
- Add to MetaCart
Relational program derivation has gathered momentum over the last decade with the development of many specification logics. However, before such relational specifications can be executed in existing programming languages, they must be carefully phrased to respect the evaluation order of the language. In turn, this requirement inhibits the rapid prototyping of specifications in a relational notation. The aim of this thesis is to bridge the gap between the methodology and practice of relational program derivation by realising a compositional style of logic programming that permits specifications to be phrased naturally and executed declaratively.
Characterisations of Termination in Logic Programming
- Theoretical Computer Science
, 2001
"... The procedural interpretation of logic programs and queries is parametric to the selection rule, i.e. the rule that determines which atom is selected in each resolution step. Termination of logic programs and queries depends critically on the selection rule. In this survey, we present a unified ..."
Abstract
-
Cited by 6 (3 self)
- Add to MetaCart
The procedural interpretation of logic programs and queries is parametric to the selection rule, i.e. the rule that determines which atom is selected in each resolution step. Termination of logic programs and queries depends critically on the selection rule. In this survey, we present a unified view and comparison of seven notions of universal termination considered in the literature, and the corresponding classes of programs. For each class, we focus on a su#cient, and in most cases even necessary, declarative characterisation for determining that a program is in that class. By unifying di#erent formalisms and making appropriate assumptions, we are able to establish a formal hierarchy between the di#erent classes and their respective declarative characterisations.
Preventing Instantiation Errors and Loops for Logic Programs with Several Modes Using block Declarations (Extended Abstract)
- Proceedings of LOPSTR'98, LNCS
, 1998
"... Delay declarations are provided in logic programming languages to allow for more flexible control, as opposed to the left-to-right selection rule of Prolog. An atom in a query is selected for resolution only when its arguments are instantiated to a specified degree. This is essential to prevent run- ..."
Abstract
-
Cited by 6 (5 self)
- Add to MetaCart
Delay declarations are provided in logic programming languages to allow for more flexible control, as opposed to the left-to-right selection rule of Prolog. An atom in a query is selected for resolution only when its arguments are instantiated to a specified degree. This is essential to prevent run-time errors produced by built-in predicates (e.g. ?/2), and to ensure termination. We assume that delay declarations are used to enable programs to run in several modes. Other authors have not explicitly made this assumption, but their work only becomes fully relevant under it, since assuming single-moded predicates, there is often no reason for using delay declarations in the first place. Our contributions are: showing how type and instantiation errors related to built-in predicates (built-ins) can be prevented; showing when delay declarations for built-ins can be omitted completely; and proving termination. For all of the above, we show that...
Termination of Logic Programs Using Various Dynamic Selection Rules
, 2004
"... We study termination of logic programs with dynamic scheduling, as it can be realised using delay declarations. Following previous work, our minimum assumption is that derivations are input-consuming, a notion introduced to define dynamic scheduling in an abstract way. Since this minimum assumptio ..."
Abstract
-
Cited by 2 (1 self)
- Add to MetaCart
We study termination of logic programs with dynamic scheduling, as it can be realised using delay declarations. Following previous work, our minimum assumption is that derivations are input-consuming, a notion introduced to define dynamic scheduling in an abstract way. Since this minimum assumption is sometimes insufficient to ensure termination, we consider here various additional assumptions on the permissible derivations. In one dimension, we consider derivations parametrised by any property that the selected atoms must have, e.g. being ground in the input positions. In another dimension, we consider both local and non-local derivations. In all cases, we give sufficient criteria for termination. The dimensions can be combined, yielding the most comprehensive approach so far to termination of logic programs with dynamic scheduling. For non-local derivations, the termination criterion is even necessary.

