Results 1 
8 of
8
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 27 (15 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
(Show Context)
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
(Show Context)
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
(Show Context)
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.
Derivation of Efficient Logic Programs by Specialization and Reduction of Nondeterminism
, 2001
"... Program specialization is a program transformation methodology which improves program efficiency by exploiting the information about the input data which are available at compile time. We show that current techniques for program specialization based on partial evaluation do not perform well on nonde ..."
Abstract
 Add to MetaCart
Program specialization is a program transformation methodology which improves program efficiency by exploiting the information about the input data which are available at compile time. 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 for guiding the application of these extended rules so to derive very efficient specialized programs. The efficiency improvements which sometimes are exponential, are due to the reduction of nondeterminism and to the fact that the computations which are performed by the initial programs in different branches of the computation trees, are performed by the specialized programs within single branches. In order to reduce nondeterminism we also make use of mode information for guiding the unfolding process.
Incorporating a folding rule into inductive logic programming
"... Many inductive logic programming systems have operators reorganizing the program so far inferred, such as the intraconstruction operator of CIGOL. At the same time, there is a similar reorganizing operator, called the “folding rule, ” developed in program transformation. We argue that there are adv ..."
Abstract
 Add to MetaCart
Many inductive logic programming systems have operators reorganizing the program so far inferred, such as the intraconstruction operator of CIGOL. At the same time, there is a similar reorganizing operator, called the “folding rule, ” developed in program transformation. We argue that there are advantages in using an extended folding rule as a reorganizing operator for inductiveinference systems. Such an extended folding rule allows an inductiveinference system not only to recognize alreadylearned concepts, but also to increase the efficiently of execution of inferred programs. 1
On Unfolding for Programs Using Strings as a Data Type
"... As a rule, program transformation methods based on operational semantics unfold a semantic tree of a given program. Sometimes that allows ones to optimize the program or to automatically prove its certain properties. Unfolding is one of the basic operations, which is a metaextension of one step of ..."
Abstract
 Add to MetaCart
(Show Context)
As a rule, program transformation methods based on operational semantics unfold a semantic tree of a given program. Sometimes that allows ones to optimize the program or to automatically prove its certain properties. Unfolding is one of the basic operations, which is a metaextension of one step of the abstract machine executing the program. This paper is interested in unfolding for programs based on pattern matching and manipulating the strings. The corresponding computation model originates with Markov’s normal algorithms and extends this theoretical base. Even though algorithms unfolding programs were being intensively studied for a long time in the context of variety of programming languages, as far as we know, the associative concatenation was stood at the wayside of the stream. We define a class of term rewriting systems manipulating with strings and describe an algorithm unfolding the programs from the class. The programming language defined by this class is Turingcomplete. The pattern language of the program class in turn fixes a class of word equations. Given an equation from the class, one of the algorithms suggested in this paper results in a description of the corresponding solution set.