Results 1 - 10
of
19
A parameterized unfold/fold transformation framework for definite logic programs
- In Principles and Practice of Declarative Programming (PPDP), LNCS 1702
, 1999
"... Given a program P, an unfold/fold program transformation system derives a sequence of programs P = P0, P1,:::, Pn, such that Pi+1 is derived from Pi by application of either an unfolding or a folding step. Existing unfold/fold transformation systems for definite logic programs differ from one anoth ..."
Abstract
-
Cited by 28 (6 self)
- Add to MetaCart
(Show Context)
Given a program P, an unfold/fold program transformation system derives a sequence of programs P = P0, P1,:::, Pn, such that Pi+1 is derived from Pi by application of either an unfolding or a folding step. Existing unfold/fold transformation systems for definite logic programs differ from one another mainly in the kind of folding transformations they permit at each step. Some allow folding using a single (possibly recursive) clause while others permit folding using multiple non-recursive clauses. However, none allow folding using multiple recursive clauses that are drawn from some previous program in the transformation sequence. In this paper we develop a parameterized framework for unfold/fold transformations by suitably abstracting and extending the proofs of existing transformation systems. Various existing unfold/fold transformation systems can be obtained by instantiating the parameters of the framework. This framework enables us to not only understand the relative strengths and limitations of these systems but also construct new transformation systems. Specifically we present a more general transformation system that permits folding using multiple recursive clauses that can be drawn from any previous program in the transformation sequence. This new transformation system is also obtained by instantiating our parameterized framework.
Operational Equivalence of CHR Programs And Constraints
- In 5th International Conference on Principles and Practice of Constraint Programming, CP'99, LNCS 1713
, 1999
"... . A fundamental question in programming language semantics is when two programs should be considered equivalent. In this paper we introduce a notion of operational equivalence for CHR programs and user-defined constraints. Constraint Handling Rules (CHR) is a highlevel language for writing constrain ..."
Abstract
-
Cited by 19 (9 self)
- Add to MetaCart
(Show Context)
. A fundamental question in programming language semantics is when two programs should be considered equivalent. In this paper we introduce a notion of operational equivalence for CHR programs and user-defined constraints. Constraint Handling Rules (CHR) is a highlevel language for writing constraint solvers either from scratch or by modifying existing solvers. We give a decidable, sufficient and necessary syntactic condition for operational equivalence of terminating and confluent CHR programs. For practical reasons, we also investigate a notion of operational equivalence for user-defined constraints that are defined in different programs. We give a sufficient syntactic condition for constraints defined in terminating and confluent CHR programs. For a subclass of programs which have only one user-defined constraint in common, we are able to give a sufficient and necessary syntactic condition. 1 Introduction Constraint Handling Rules (CHR) [Fru98] is essentially a committed-choice lan...
Improving Prolog Programs: Refactoring for Prolog
"... Refactoring is an established technique from the OO-community to restructure code: it aims at improving software readability, maintainability and extensibility. Although refactoring is not tied to the OO-paradigm in particular, its ideas have not been applied to Logic Programming until now. ..."
Abstract
-
Cited by 11 (2 self)
- Add to MetaCart
(Show Context)
Refactoring is an established technique from the OO-community to restructure code: it aims at improving software readability, maintainability and extensibility. Although refactoring is not tied to the OO-paradigm in particular, its ideas have not been applied to Logic Programming until now.
The replacement operation for CCP programs
- IN PROCEEDINGS OF LOPSTR '99
, 2000
"... ..."
(Show Context)
Program Derivation = Rules + Strategies
- Computational Logic: Logic Programming and Beyond (Essays in honour of Bob Kowalski, Part I), Lecture Notes in Computer Science 2407
, 2001
"... In a seminal paper [38] Prof. Robert Kowalski advocated the paradigm Algorithm = Logic + Control which was intended to characterize program executions. Here we want to illustrate the corresponding paradigm Program Derivation = Rules + Strategies which is intended to characterize program derivations, ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
(Show Context)
In a seminal paper [38] Prof. Robert Kowalski advocated the paradigm Algorithm = Logic + Control which was intended to characterize program executions. Here we want to illustrate the corresponding paradigm Program Derivation = Rules + Strategies which is intended to characterize program derivations, rather than executions. During program execution, the Logic component guarantees that the computed results are correct, that is, they are true facts in the intended model of the given program, while the Control component ensures that those facts are derived in an efficient way. Likewise, during program derivation, the Rules component guarantees that the derived programs are correct and the Strategies component ensures that the derived programs are efficient.
Refactoring Prolog Programs
, 2003
"... Refactoring is a technique to restructure code in a disciplined way originating from the OO-community. It aims to improve software readability, maintainability and extensibility. Unlike the existing results on program transformation refactoring can require user input to take certain decisions. In ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
Refactoring is a technique to restructure code in a disciplined way originating from the OO-community. It aims to improve software readability, maintainability and extensibility. Unlike the existing results on program transformation refactoring can require user input to take certain decisions. In this paper we apply the ideas of refactoring to Prolog programs. We start by presenting a catalogue of refactorings. Then we discuss ViPReSS, our refactoring browser, and our experience with applying ViPReSS to a big Prolog legacy system.
Program Transformations for Automated Verification of Parameterized Concurrent Systems
, 1999
"... We show how the problem of verifying parameterized systems can be reduced to the problem of determining the equivalence of goals in a logic program. We further show how goal equivalences can be established using induction-based proofs. Such proofs rely on a powerful new theory of logic program trans ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
We show how the problem of verifying parameterized systems can be reduced to the problem of determining the equivalence of goals in a logic program. We further show how goal equivalences can be established using induction-based proofs. Such proofs rely on a powerful new theory of logic program transformations (encompassing unfold, fold and goal replacement transformations). We present this theory of logic program transformations which in particular, allows a more general folding rule (as compared to the state of the art). We show how our more general transformations are useful for constructing verification proofs of parameterized systems. Moreover these verification proofs can be largely automated, and are applicable to a variety of network topologies, including uni- and bi-directional chains, rings, and trees of processes. Unfold transformations in our system correspond to algorithmic model-checking steps, fold and goal replacement correspond to deductve steps. All three types of transfo...
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 2 (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.
Refactoring Prolog Code
- In Proc. 18th Workshop on (Constraint) Logic Programming
, 2004
"... Abstract. Refactoring is a popular technique from the OO-community to re-structure code: it aims at improving software readability, maintainability and ex-tensibility. In this paper we apply the ideas of refactoring to Prolog programs. We present a catalogue of refactorings adapted to or specificly ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
(Show Context)
Abstract. Refactoring is a popular technique from the OO-community to re-structure code: it aims at improving software readability, maintainability and ex-tensibility. In this paper we apply the ideas of refactoring to Prolog programs. We present a catalogue of refactorings adapted to or specificly developed for Prolog. We also discuss ViPReSS, our semi-automatic refactoring browser, and our ex-perience with applying ViPReSS to a large Prolog legacy system. Our conclusion is that refactoring is clearly both viable and desirable in the context of Prolog. 1
Termination of Simply Moded Logic Programs with Dynamic Scheduling
- TRANSACTIONS ON COMPUTATIONAL LOGIC
, 2003
"... In logic programming, dynamic scheduling indicates the feature by means of which the choice of the atom to be selected at each resolution step is done at runtime and does not follow a fixed selection rule such as the left-to-right one of Prolog. Input consuming derivations were introduced to model d ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
In logic programming, dynamic scheduling indicates the feature by means of which the choice of the atom to be selected at each resolution step is done at runtime and does not follow a fixed selection rule such as the left-to-right one of Prolog. Input consuming derivations were introduced to model dynamic scheduling while abstracting from the technical details. In this article, we provide a sufficient and necessary criterion for termination of input consuming derivations of simply moded logic programs. The termination criterion we propose is based on a denotational semantics for partial derivations which is defined in the spirit of model-theoretic semantics previously proposed for left-to-right derivations.