Results 11  20
of
23
Replacement Can Preserve Termination
"... We consider the replacement transformation operation, a very general and powerful transformation, and study under which conditions it preserves universal termination besides computed answer substitutions. With this safe replacement we can significantly extend the safe unfold/fold transformation sequ ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
We consider the replacement transformation operation, a very general and powerful transformation, and study under which conditions it preserves universal termination besides computed answer substitutions. With this safe replacement we can significantly extend the safe unfold/fold transformation sequence presented in [11]. By exploiting typing information, more useful conditions can be defined and we may deal with some special cases of replacement very common in practice, namely switching two atoms in the body of a clause and the associativity of a predicate. This is a first step in the direction of exploiting a Pre/Post specification on the intended use of the program to be transformed. Such specification can restrict the instances of queries and clauses to be considered and then relax the applicability conditions on the transformation operations.
Enhancing Partial Deduction via Unfold/Fold Rules
 Proc. LoPSTr '96
, 1996
"... We show that sometimes partial deduction produces poor program specializations because of its limited ability in (i) dealing with conjunctions of recursively defined predicates, (ii) combining partial evaluations of alternative computations, and (iii) taking into account unification failures. We pro ..."
Abstract

Cited by 7 (4 self)
 Add to MetaCart
We show that sometimes partial deduction produces poor program specializations because of its limited ability in (i) dealing with conjunctions of recursively defined predicates, (ii) combining partial evaluations of alternative computations, and (iii) taking into account unification failures. We propose to extend the standard partial deduction technique by using versions of the definition rule and the folding rule which allow us to specialize predicates defined by disjunctions of conjunctions of goals. We also consider a case split rule to take into account unification failures. Moreover, in order to perform program specialization via partial deduction in an automatic way, we propose a transformation strategy which takes as parameters suitable substrategies for directing the application of every transformation rule. Finally, we show through two examples that our partial deduction technique is superior to standard partial deduction. The first example refers to the automatic derivation...
Programs without Failures
 Proceedings LOPSTR'97, Lecture Notes in Computer Science
, 1997
"... . We try to formalize the intuitive reasoning which we normally use to get convinced that a query has successful LDderivations in a program. To this purpose we define the class of programs and queries without failures which have the property of not having finitely failing derivations. Such property ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
. We try to formalize the intuitive reasoning which we normally use to get convinced that a query has successful LDderivations in a program. To this purpose we define the class of programs and queries without failures which have the property of not having finitely failing derivations. Such property is simple to verify, it is preserved through leftmost unfolding and it can be useful both in verifying properties of logic programs and in program transformation. The class of programs without failures is very restricted but in program transformations it is sufficient that only some predicates in the program are in the class. Keywords and Phrases: finitely failing derivations, program transformation, program verification 1 Introduction Logic programming is a declarative paradigm. This pleasant characteristic allows one to ignore the computation and simply define which are its desired results. But, when queried through a Prolog interpreter, logic definitions are performed with backtracking...
Correctness of Logic Program Transformations Based on Existential Termination
 Proceedings of the 1995 International Logic Programming Symposium (ILPS '95
, 1995
"... We study the relationships between the correctness of logic program transformation and program termination. We consider definite programs and we identify some `invariants' of the program transformation process. The validity of these invariants ensures the preservation of the success set semantics, p ..."
Abstract

Cited by 5 (4 self)
 Add to MetaCart
We study the relationships between the correctness of logic program transformation and program termination. We consider definite programs and we identify some `invariants' of the program transformation process. The validity of these invariants ensures the preservation of the success set semantics, provided that the existential termination of the initial program implies the existential termination of the final program. We also identify invariants for the preservation of the finite failure set semantics. We consider four very general transformation rules: definition introduction, definition elimination, iffreplacement, and finite failure. Many versions of the transformation rules proposed in the literature, including unfolding, folding, and goal replacement, are instances of the iffreplacement rule. By using our proposed invariants which are based on Clark completion, we prove, for our transformation rules, various results concerning the preservation of both the success set and finite ...
Transformation of Left Terminating Programs
 PROCEEDINGS OF THE NINTH INTERNATIONAL WORKSHOP ON LOGICBASED PROGRAM SYNTHESIS, LOPSTR'99
, 2000
"... We propose an unfoldfold transformation system which preserves left termination for definite programs besides its declarative semantics. The system extends our previous proposal in [BCE95] by allowing to switch the atoms in the clause bodies when a specific applicability condition is satisfied. The ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
We propose an unfoldfold transformation system which preserves left termination for definite programs besides its declarative semantics. The system extends our previous proposal in [BCE95] by allowing to switch the atoms in the clause bodies when a specific applicability condition is satisfied. The applicability condition is very simple to verify, yet very common in practice. We also discuss how to verify such condition by exploiting mode information.
Transforming Inductive Definitions
, 1999
"... The main goal of this paper is to provide a common foundation to the theories of correctness of program transformations for a large variety of programming languages. We consider the notion of rule set and the notion of inductive set which is dened by a rule set. We also consider a class of transform ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
The main goal of this paper is to provide a common foundation to the theories of correctness of program transformations for a large variety of programming languages. We consider the notion of rule set and the notion of inductive set which is dened by a rule set. We also consider a class of transformations of rule sets, called rule replacements , which replace an old rule set by a new rule set. These replacements can be viewed as generalizations of the most commonly used transformations, such as folding and unfolding. We study two methods for proving the correctness of rule replacements, that is, for showing that the old rule set and the new rule set dene the same inductive set. These methods are: (i) the Unique Fixpoint Method, based on the wellfoundedness property of the new rule set, and (ii) the Improvement Method, based on the fact that the premises of the old rule set are replaced by premises which have `smaller' proofs w.r.t. a suitable wellfounded relation. Our Unique Fixpo...
Automatic Derivation of Logic Programs by Transformation
 Course notes for ESSLLI
, 2000
"... We present the program transformation methodology for the automatic development of logic programs based on the rules + strategies approach. We consider both definite programs and normal programs and we present the basic transformation rules and strategies which are described in the literature. To il ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
We present the program transformation methodology for the automatic development of logic programs based on the rules + strategies approach. We consider both definite programs and normal programs and we present the basic transformation rules and strategies which are described in the literature. To illustrate the power of the program transformation approach we also give some examples of program development. Finally, we show how to use program transformations for proving properties of predicates and synthesizing programs from logical specifications.
Correct Transformations of Logic Programs
 In Haveraaen and Owe [10
"... This paper describes a system of transformations that preserves the semantics of logic programs with respect to a fixed goal. We formalise some standard transformations and introduce two new transformation rules: Copying/Merge of Copies and Contextual Replacement by Equal Term. Correctness of all sc ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
This paper describes a system of transformations that preserves the semantics of logic programs with respect to a fixed goal. We formalise some standard transformations and introduce two new transformation rules: Copying/Merge of Copies and Contextual Replacement by Equal Term. Correctness of all schemes of the transformation rules is proved. The applicability conditions of the schemes of rules are effectively decidable, that makes it useful for application in practice. Since some transformations simplify programs, the transformation system can be used for automated program transforming. 1 Introduction A lot of investigations on analysis, synthesis, specialisation, verification, and optimisation of programs relies on program transformations. When deriving a new program from an initial program the semantics should be kept unchanged. The formal approach consists of constructing an equivalence relation on programs and checking that this relation is preserved while transforming. In this p...
Transformation Rules For A Higher Order Logic Programming Language
, 2000
"... We introduce a logic programming language with higher order features. In particular, in this language the arguments of the predicate symbols may be both terms and goals. We define the operational semantics of our language by extending SLDresolution, and we propose for this language a set of program ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
We introduce a logic programming language with higher order features. In particular, in this language the arguments of the predicate symbols may be both terms and goals. We define the operational semantics of our language by extending SLDresolution, and we propose for this language a set of program transformation rules. The transformation rules are shown to be correct in the sense that they preserve the operational semantics. In our higher order logic language we may transform logic programs using higher order generalizations and continuation arguments, as it is done in the case of functional programs. These program transformation techniques allow us to derive very efficient logic programs and also to avoid goal rearrangements which may not preserve correctness.
Automatic Correctness Proofs for Logic Program Transformations ⋆
"... Abstract. The many approaches which have been proposed in the literature for proving the correctness of unfold/fold program transformations, consist in associating suitable wellfounded orderings with the proof trees of the atoms belonging to the least Herbrand models of the programs. In practice, t ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Abstract. The many approaches which have been proposed in the literature for proving the correctness of unfold/fold program transformations, consist in associating suitable wellfounded orderings with the proof trees of the atoms belonging to the least Herbrand models of the programs. In practice, these orderings are given by ‘clause measures’, that is, measures associated with the clauses of the programs to be transformed. In the unfold/fold transformation systems proposed so far, clause measures are fixed in advance, independently of the transformations to be proved correct. In this paper we propose a method for the automatic generation of the clause measures which, instead, takes into account the particular program transformation at hand. During the transformation process we construct a system of linear equations and inequations whose unknowns are the clause measures to be found, and the correctness of the transformation is guaranteed by the satisfiability of that system. Through some examples we show that our method is able to establish in a fully automatic way the correctness of program transformations which, by using other methods, are proved correct at the expense of fixing sophisticated clause measures. 1