Results 1  10
of
14
Transformation Rules for Locally Stratified Constraint Logic Programs
, 2004
"... We propose a set of transformation rules for constraint logic programs with negation. We assume that every program is locally strati ed and, thus, it has a unique perfect model. We give sucient conditions which ensure that the proposed set of transformation rules preserves the perfect model of ..."
Abstract

Cited by 14 (13 self)
 Add to MetaCart
We propose a set of transformation rules for constraint logic programs with negation. We assume that every program is locally strati ed and, thus, it has a unique perfect model. We give sucient conditions which ensure that the proposed set of transformation rules preserves the perfect model of the programs. Our rules extend in some respects the rules for logic programs and constraint logic programs already considered in the literature and, in particular, they include a rule for unfolding a clause with respect to a negative literal.
A Debugging Scheme for Functional Logic Programs
 Proc. WFLP’2001
, 2002
"... We present a generic scheme for the declarative debugging of functional logic programs which is valid for eager as well as lazy programs. In particular we show that the framework extends naturally some previous work and applies to the most modern lazy strategies, such as needed narrowing. First we a ..."
Abstract

Cited by 13 (6 self)
 Add to MetaCart
We present a generic scheme for the declarative debugging of functional logic programs which is valid for eager as well as lazy programs. In particular we show that the framework extends naturally some previous work and applies to the most modern lazy strategies, such as needed narrowing. First we associate to our pro grams a semantics based on a (continuous) immediate consequence operator, which models computed answers. We show that, given the intended specification of a program 7, it is possible to check the correctness of 7 by a single step of Tn. We consider then a more effective methodology which is based on abstract interpretation: by approximating the intended specification of the success set we derive a finitely terminating diagnosis method, which can be used statically and is parametric w.r.t. to the chosen approximation. In order to correct the bugs, we sketch a preliminary deductive approach which uses exampleguided unfolding. We specialize the incorrect rules w.r.t. sets of positive and negative examples which are gathered (bottomup) during the diagnosis process, so that all refutations of nega tive examples and no refutation of positive examples are excluded. Our debugging framework does not require the user to either provide error symptoms in advance or answer diicult questions concerning program correctness. We extend an implementation of our system to the case of needed narrowing and illustrate it through some examples which demonstrate the practicality of our approach.
Rules + Strategies for Transforming Lazy Functional Logic Programs
 Theoretical Computer Science
, 2004
"... This work introduces a transformation methodology for functional logic programs based on needed narrowing, the optimal and complete operational principle for modern declarative languages which integrate the best features of functional and logic programming. We provide correctness results for the tra ..."
Abstract

Cited by 5 (4 self)
 Add to MetaCart
This work introduces a transformation methodology for functional logic programs based on needed narrowing, the optimal and complete operational principle for modern declarative languages which integrate the best features of functional and logic programming. We provide correctness results for the transformation system w.r.t. the set of computed values and answer substitutions and show that the prominent properties of needed narrowing—namely, the optimality w.r.t. the length of derivations and the number of computed solutions—carry over to the transformation process and the transformed programs. We illustrate the power of the system by taking on in our setting two wellknown transformation strategies (composition and tupling). We also provide an implementation of the transformation system which, by means of some experimental results, highlights the potentiality of our approach.
UPVCurry: An Incremental Curry Interpreter
, 1999
"... . Functional logic programming integrates the best features of modern functional and logic languages. The multiparadigm declarative language Curry is an extension of Haskell which is intended to become a standard in the area. In this paper, we present UPVCurry, an efficient and quite complete impl ..."
Abstract

Cited by 3 (2 self)
 Add to MetaCart
. Functional logic programming integrates the best features of modern functional and logic languages. The multiparadigm declarative language Curry is an extension of Haskell which is intended to become a standard in the area. In this paper, we present UPVCurry, an efficient and quite complete implementation of Curry based on a new, incremental definition of its basic evaluation mechanism. We compare UPVCurry with already existing implementations of other Curry interpreters. Keywords: Curry, Functional logic languages, Implementation. 1 Introduction Functional logic languages combine the best features of the most important declarative programming paradigms, namely functional and logic programming (see [Han94] for a survey). Throughout this decade, many practical proposals have been made to amalgamate functional and logic programming languages. However, these languages have not succeeded in becoming widely used by the functional or logic programming communities. The multiparadigm l...
An Automatic Composition Algorithm for Functional Logic Programs
, 2000
"... . Functional logic languages with a complete operational semantics are based on narrowing, which combines the instantiation of variables with the reduction of expressions. In this paper, we investigate the relationship between partial evaluation and more general transformations based on folding/ ..."
Abstract

Cited by 3 (3 self)
 Add to MetaCart
. Functional logic languages with a complete operational semantics are based on narrowing, which combines the instantiation of variables with the reduction of expressions. In this paper, we investigate the relationship between partial evaluation and more general transformations based on folding/unfolding. First, we show that the transformations obtained by partial evaluators can be also achieved by folding/unfolding using a particular kind of eurekas which can be mechanically attained. Then, we propose an algorithm (based on folding/unfolding) which starts with the automatic eureka generation and is able to perform program composition, i.e., it is able to produce a single function definition for some nested functions of the original program. This avoids the construction of intermediate data structures that are produced by the inner function and consumed as inputs by the outer function. As opposed to both partial evaluation and (general) fold/unfold transformations, strong ...
Improving Functional Logic Programs by DifferenceLists
, 2000
"... . Modern multiparadigm declarative languages integrate features from functional, logic, and concurrent programming. In this work, we consider the adaptation of the logic programming transformation based on the introduction of differencelists to an integrated setting. Unfortunately, the use of ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
. Modern multiparadigm declarative languages integrate features from functional, logic, and concurrent programming. In this work, we consider the adaptation of the logic programming transformation based on the introduction of differencelists to an integrated setting. Unfortunately, the use of differencelists is impractical due to the absence of nonstrict equality in lazy (callbyname) languages. Despite all, we have developed a novel, stepwise transformation which achieves a similar effect over functional logic programs. We also show a simple and practical approach to incorporate the optimization into a real compiler. Finally, we have conducted a number of experiments which show the practicality of our proposal. Keywords: functional logic programming, program transformation, compiler optimization 1 Introduction In recent years, several proposals have been made to amalgamate functional and logic programming languages. These languages combine features from functional pr...
A ListProcessing Optimizer for Curry
, 2000
"... This report describes a prototype implementation of the listprocessing optimizations described in [1]. Our system implements sourcetosource transformations for improving eciency in listprocessing Curry programs. Curry is a universal programming language aiming at the amalgamation of the most impo ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
This report describes a prototype implementation of the listprocessing optimizations described in [1]. Our system implements sourcetosource transformations for improving eciency in listprocessing Curry programs. Curry is a universal programming language aiming at the amalgamation of the most important declarative programming paradigms, namely functional programming and logic programming. The language Curry combines in a seamless way features from functional programming (nested expressions, lazy evaluation, higherorder functions), logic programming (logical variables, partial date structures, builtin search), and concurrent programming (concurrent evaluation of constraints with synchronization on logical variables) {see [10] for a detailed description{
Correction of Functional Logic Programs
, 2003
"... We propose a new methodology for synthesizing correct functional logic programs. We aim to create an integrated development environment in which it is possible to debug a program and correct it automatically. We start from a declarative diagnoser that we have developed previously which allows us to ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
We propose a new methodology for synthesizing correct functional logic programs. We aim to create an integrated development environment in which it is possible to debug a program and correct it automatically. We start from a declarative diagnoser that we have developed previously which allows us to identify wrong program rules w.r.t. an intended specification. Then a bugcorrection, program synthesis methodology tries to correct the erroneous components of the wrong code. We propose a hybrid, topdown (unfoldingbased) as well as bottomup (inductionbased), approach for the automatic correction of functional logic programs which is driven by a set of evidence examples which are automatically produced as an outcome by the diagnoser. The resulting program is proven to be correct and complete w.r.t. the considered example sets. Finally, we also provide a prototypical implementation which we use for an experimental evaluation of our system.
SYNTH User's Manual
, 1999
"... This report describes Synth, a semiautomatic program transformator for lazy (callbyname) functional logic programs based on needed narrowing. The correctness of the transformation system is proved in [1]. We also refer to [1] for a formal definition of the basic transformation rules. The transform ..."
Abstract
 Add to MetaCart
This report describes Synth, a semiautomatic program transformator for lazy (callbyname) functional logic programs based on needed narrowing. The correctness of the transformation system is proved in [1]. We also refer to [1] for a formal definition of the basic transformation rules. The transformation process starts from an initial program (R 0 ) and consists of applying an arbitrary number of times the basic transformation rules, which are: definition introduction, definition elimination, unfolding, folding, and (two forms of) abstraction. Needed narrowing is complete for inductively sequential programs. Thus, [1] also demonstrates that such a program structure is preserved through the transformation sequence (R 0 ; : : : ; R n ), which is a key point for proving the correctness of the transformation system as well as its effective applicability. In general, the correctness of a transformation rule depends on the appropriate
: Tecniche Di Trasformazione E Sintesi
"... Introduction (in clause 2, [H] is generalized to the variable Acc): 5. rev_acc(L,Acc,R) rev(L,L1), append(L1,Acc,R) Unfolding clause 5 w.r.t. rev(L,L1): 6. rev_acc([ ],Acc,Acc) 7. rev_acc([HT],Acc,R) rev(T,T1), append(T1,[H],L1), append(L1,Acc,R) Goal Replacement (lemma application): [ Lemma: ..."
Abstract
 Add to MetaCart
Introduction (in clause 2, [H] is generalized to the variable Acc): 5. rev_acc(L,Acc,R) rev(L,L1), append(L1,Acc,R) Unfolding clause 5 w.r.t. rev(L,L1): 6. rev_acc([ ],Acc,Acc) 7. rev_acc([HT],Acc,R) rev(T,T1), append(T1,[H],L1), append(L1,Acc,R) Goal Replacement (lemma application): [ Lemma: M(P 0 ) " T1, H, Acc, R. $ L1. append(T1,[H],L1), append(L1,Acc,R) append(T1,[HAcc],R ) ] 8. rev_acc([HT],Acc,R) rev(T,T1), append(T1,[HAcc],R) Folding clause 8 using clause 5: 9. rev_acc([HT],Acc,R) rev_acc(T,[HAcc],R) Folding clause 2 using clause 5: 10. rev([HT],R) rev_acc(T,[H],R) FINAL PROGRAM : O(n) 1. rev([ ],[ ]) 10. rev([HT],R) rev_acc(L,[H],R) 6. rev_acc(