Results 1 
5 of
5
Reducing Nondeterminism while Specializing Logic Programs
, 1997
"... Program specialization is a collection of program transformation techniques for improving program efficiency by exploiting some information available at compiletime about the input data. We show that current techniques for program specialization based on partial evaluation do not perform well on non ..."
Abstract

Cited by 25 (14 self)
 Add to MetaCart
Program specialization is a collection of program transformation techniques for improving program efficiency by exploiting some information available at compiletime about the input data. We show that current techniques for program specialization based on partial evaluation do not perform well on nondeterministic logic programs. We then consider a set of transformation rules which extend the ones used for partial evaluation, and we propose a strategy to direct the application of these extended rules so to derive very efficient specialized programs. The efficiency improvements which may even be exponential, are achieved because the derived programs are semideterministic and the operations which are performed by the initial programs in different branches of the computation trees, are performed in the specialized programs within single branches. We also make use of mode information to guide the unfolding process and to reduce nondeterminism. To exemplify our technique, we show that we can...
A Constraintbased Partial Evaluator for Functional Logic Programs and its Application
, 1998
"... The aim of this work is the development and application of a partial evaluation procedure for rewritingbased functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewritingbased computational model extends traditional functional ..."
Abstract

Cited by 12 (0 self)
 Add to MetaCart
The aim of this work is the development and application of a partial evaluation procedure for rewritingbased functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewritingbased computational model extends traditional functional programming languages by incorporating logical features, including logical variables and builtin search, into its framework. This work is the first to address the automatic specialisation of these functional logic programs. In particular, a theoretical framework for the partial evaluation of rewritingbased functional logic programs is defined and its correctness is established. Then, an algorithm is formalised which incorporates the theoretical framework for the procedure in a fully automatic technique. Constraint solving is used to represent additional information about the terms encountered during the transformation in order to improve the efficiency and size of the residual programs. ...
Optimization of Mercury programs
, 1998
"... The pure logic programming language Mercury is very well suited to the development of sophisticated program transformations due to its clean semantics and strong type, mode and determinism systems. We describe the design and implementation of some of the highlevel optimization passes of the Mercury ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
The pure logic programming language Mercury is very well suited to the development of sophisticated program transformations due to its clean semantics and strong type, mode and determinism systems. We describe the design and implementation of some of the highlevel optimization passes of the Mercury compiler, including deforestation, constraint propagation and type specialization. Mercury's mode system allows programmers to specify when a data structure can have only one reference. We present the implementation of an optimization pass to exploit this information to reuse dead cells or insert calls to place them on a free list. Contents 1 Introduction 1 2 Mercury 1 2.1 Superhomogeneous form : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 2.2 Quantification : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 2.3 Type checking : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : : 2 2.4 Mode analysis : : : : : : : : :...
A System for Transforming Logic Programs
, 1997
"... We describe a system for transforming logic programs using the unfold/fold methodology. The system provides the user with some predefined transformation rules. A transformation process consists of a sequence of applications of those rules, starting from a given initial program. The user selects a tr ..."
Abstract

Cited by 4 (3 self)
 Add to MetaCart
We describe a system for transforming logic programs using the unfold/fold methodology. The system provides the user with some predefined transformation rules. A transformation process consists of a sequence of applications of those rules, starting from a given initial program. The user selects a transformation rule to be applied, which transforms the initial program into a new equivalent one. Several such derivation steps may be performed interactively, until the desired program is derived. Some strategies are also available, which perform fully automatically a sequence of derivation steps for realizing specific transformations. The report is intended to describe the functionalities of the system, and it should serve as a user's manual. Contents 1 Introduction 3 2 An example transformation: The scalar product 3 3 Transformations rules 5 3.1 Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3.2 Semantics preservation . . . . . . . . . ....
Developing Correct and Efficient Logic Programs by Transformation
 Knowledge Engineering Review
, 1996
"... this paper, from formal specifications one may obtain executable, efficient programs by using techniques for transforming logic programs. This is, indeed, one of the reasons that makes logic programming very attractive for program construction. During this final step from specifications to programs, ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
this paper, from formal specifications one may obtain executable, efficient programs by using techniques for transforming logic programs. This is, indeed, one of the reasons that makes logic programming very attractive for program construction. During this final step from specifications to programs, in order to improve efficiency one may want to use program transformation for avoiding multiple visits of data structures, or replacing complex forms of recursion by tail recursion, or reducing nondeterminism of procedures. This paper is structured as follows. In Section 2 we present the rulebased approach to program transformation and its use for the derivation and synthesis of logic programs from specifications. In Section 3 we consider the schemabased transformation technique for the development of efficient programs. In Section 4 we consider the partial evaluation technique and its use for the specialization of logic programs when the input data are partially known at compile time. In the final section we discuss some of the achievements and challanges of program transformation as a tool for logicbased software engineering. For simplicity reasons in this paper we will only consider definite logic programs, although most of the techniques we will describe can be applied also in the case of general logic programs. We refer to [35, 41] for all notions concerning logic programming and logic program transformation which are not explicitly presented here.