per la specifica, l'analisi, la verifica, la sintesi e
la trasformazione di sistemi software.
Dipartimento di Informatica, Sistemi e Produzione
The results of our research activity have been
described in the following papers. Below we illustrate the main contributions
of each paper.
Abstract. Program transformation is a methodology for deriving correct and efficient programs from specifications. In this chapter, we will look at the so called `rules + strategies' approach, and we will report on the main techniques which have been introduced in the literature for that approach, in the case of logic programs. We will also present some examples of program transformation, and we hope that through those examples the reader may acquire some familiarity with the techniques we will describe.In this paper the authors give an overview of the techniques for the transformation of logic programs following the `rules + strategies' approach. It is an updated account which refers to recent results in the area.
Abstract. We present a method for proving properties of definite logic programs. This method is called unfold/fold proof method because it is based on the unfold/fold transformation rules. Given a program P and two goals (that is, conjunctions of atoms) F(X,Y) and G(X,Z), where X, Y, and Z are pairwise disjoint vectors of variables, the unfold/fold proof method can be used to show that the equivalence formula \forall X. (\exists Y. F(X,Y) <=> \exists Z. G(X,Z)) holds in the least Herbrand model of P. Equivalence formulas of that form can be used to justify goal replacement steps, which allow us to transform logic programs by replacing old goals, such as F(X,Y), by equivalent new goals, such as G(X,Z). These goal replacements preserve the least Herbrand model semantics if we find non-ascending unfold/fold proofs of the corresponding equivalence formulas, that is, unfold/fold proofs which ensure suitable well-founded orderings between the successful SLD-derivations of F(X,Y) and G(X,Z), respectively. We also present a method for program synthesis from implicit definitions. It can be used to derive a definite logic program for the predicate newp implicitly defined by an equivalence formula of the form \forall X. (\exists Y. F(X,Y) <=> \exists Z. (H(X,Z), newp(X,Z))), such that the predicates occurring in the goals F(X,Y) and H(X,Z) are defined in a given program P, and newp is a predicate symbol not occurring in P. The set of clauses defining newp, say Eureka, allows us to prove that the above equivalence formula holds in the least Herbrand model of P \cup Eureka using an unfold/fold proof. Thus, the correctness of our synthesis method derives from the one of the unfold/fold proof method. We finally illustrate our synthesis method through some examples of program specialization, program synthesis, and program transformation, which can all be viewed as program syntheses from implicit definitions.The paper is divided into two parts: the first part concerns a proof method, called the unfold/fold proof method, for proving properties of goals, that is, conjunctions of atoms, within the contest of a given Horn clause program, and the second part concerns the use of this proof method for the synthesis of logic programs from specifications.
3. [620]
Transforming Inductive Definitions
Maurizio Proietti and Alberto Pettorossi
D. De Schreye (ed.) Proceedings of the
16th International Conference on Logic Programming (ICLP'99), Las Cruces,
New Mexico, USA,
Nov. 29 - Dec. 4, 1999, MIT Press, pp. 486-499.
Abstract.
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 defined 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 define the
same inductive set.
These methods are: (i) the Unique Fixpoint Method, based on the well-foundedness
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
well-founded relation. Our Unique Fixpoint and Improvement Methods generalize
many methods described in
the literature which
deal with transformation rules for functional and logic programming languages.
Our methods have also the
advantages of: (i)
being parametric w.r.t. the well-founded relation which is actually used,
and (ii) being applicable to rules with finite
or infinite sets
of premises.
4. [621]
Rules and Strategies for Contextual Specialization of Constraint Logic Programs
Fioravanti Fabio, Alberto Pettorossi, Maurizio Proietti
M. Leuschel (ed.) Proceedings of the ICLP'99
Workshop on Optimization and Implementation of Declarative Programming
Languages
(WOID'99), Las Cruces, New Mexico, USA, Dec.2-3,
1999, pp. 1-9.
Abstract.
We address
the problem of specializing a constraint logic program w.r.t. a constrained
atom which specifies the context of use of the
program. We follow
an approach based on transformation rules and strategies. We introduce
a novel transformation rule, called
contextual constraint
replacement, to be combined with variants of the traditional unfolding
and folding rules. We present a general
Partial Evaluation
Strategy for automating the application of these rules, and two additional
strategies: the Context Propagation
Strategy which is
instrumental for the application of our contextual constraint replacement
rule, and the Invariant Promotion Strategy
for taking advantage
of invariance properties of the computation. We show through some examples
the power of our method and we
compare it with existing
methods for partial deduction ofconstraint logic programs based on extensions
of Lloyd and Shepherdson's
approach.
5. [619]
Transformation Rules for Logic Programs with Goals as Arguments
Alberto Pettorossi and Maurizio Proietti
Pre-Proceedings 9th LOPSTR '99 Report University of Venice (Italy) CS-99-16, pages 171-178
Abstract.
We introduce a logic
language where predicate symbols may have both terms and goals as arguments.
We define its operational
semantics by extending
SLD-resolution with the left-to-right selection rule, and we propose a
set of transformation rules for
manipulating programs
written in that language. These transformation rules are shown to be correct
in the sense that they preserve the
chosen operational
semantics. This logic language has higher order capabilities which turn
out to be very powerful for the derivation of
efficient logic programs.
In particular, in our language we can avoid the problem of goal rearrangement
which is often encountered
during program transformation.
Moreover, goals as arguments allow us to perform on logic programs transformation
steps similar to
the ones performed
on functional programs when using higher order generalizations and continuation
arguments.
For problems and suggestions: adp@iasi.rm.cnr.it
Save this page at: home2/users/adp/public.html/MURST40-Levi-98/40Levi_RisultatiRoma2.html