Results 11  20
of
35
Flexible Continuations in Logic Programs via Unfold/Fold Transformations and Goal Generalization
 In Proceedings of the 2nd ACM SIGPLAN Workshop on Continuations
, 1997
"... We consider the use of continuations for deriving efficient logic programs. It is known that both in the case of functional and logic programming, the introduction of continuations is a valuable technique for transforming old programs into new, more efficient ones. However, in general, in order to d ..."
Abstract

Cited by 5 (3 self)
 Add to MetaCart
We consider the use of continuations for deriving efficient logic programs. It is known that both in the case of functional and logic programming, the introduction of continuations is a valuable technique for transforming old programs into new, more efficient ones. However, in general, in order to derive programs with high levels of efficiency, one should introduce continuations according to suitable strategies. In particular, we show that it is preferable to introduce continuations in a flexible way, that is, during the process of program transformation itself, rather than at its beginning or at its end. We extend logic programs by allowing variables to range over goals, and we propose a set of transformation rules for this extended language. We propose a generalization strategy for the introduction of goal variables which may be viewed as continuations and they allow for the derivation of very efficient programs. 1 Introduction Continuationbased program transformations [22] have be...
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
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.
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 . . . . . . . . . ....
Program Specialization via Algorithmic Unfold/Fold Transformations
 ACM Computing Surveys: Special Issue on Partial Evaluation
, 1998
"... this paper we will essentially refer to these techniques as they have been developed in the fields of functional and logic programming. ..."
Abstract

Cited by 4 (0 self)
 Add to MetaCart
this paper we will essentially refer to these techniques as they have been developed in the fields of functional and logic programming.
Design, Implementation, And Use Of The Map Transformation System
, 1998
"... The MAP transformation system is a tool which supports the interactive derivation of logic programs using the unfold/fold transformation methodology. A derivation consists of a sequence of applications of some predened transformation rules, starting from a given initial program. When a rule is invok ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
The MAP transformation system is a tool which supports the interactive derivation of logic programs using the unfold/fold transformation methodology. A derivation consists of a sequence of applications of some predened transformation rules, starting from a given initial program. When a rule is invoked, if the conditions of its application are satised, the system transforms the current program into a new program. Such transformation steps may be performed interactively, in a sequence, until a nal program is derived. The system provides a graphical user interface through which the transformation rules are applied by means of mouse clicks, button presses, menu selections, and dialog boxes. MAP also provides the user with many facilities for controlling and documenting program derivations, such as exploring alternative derivations, printing, saving, and restoring derivations. Key words: Automatic program derivation, program transformation, logic programming, transformation rules, graphi...
Automated Proof Compression by Invention of New Definitions
"... Stateoftheart automated theorem provers (ATPs) are today able to solve relatively complicated mathematical problems. But as ATPs become stronger and more used by mathematicians, the length and human unreadability of the automatically found proofs become a serious problem for the ATP users. One re ..."
Abstract

Cited by 3 (0 self)
 Add to MetaCart
Stateoftheart automated theorem provers (ATPs) are today able to solve relatively complicated mathematical problems. But as ATPs become stronger and more used by mathematicians, the length and human unreadability of the automatically found proofs become a serious problem for the ATP users. One remedy is automated proof compression by invention of new definitions. We propose a new algorithm for automated compression of arbitrary sets of terms (like mathematical proofs) by invention of new definitions, using a heuristics based on substitution trees. The algorithm has been implemented and tested on a number of automatically found proofs. The results of the tests are included. 1 Introduction, motivation, and related work Stateoftheart automated theorem provers (ATPs) are today able to solve relatively complicated mathematical problems [McC97], [PS08], and are becoming a standard part of interactive theorem provers and verification tools [MP08], [Urb08]. But as ATPs become stronger and more used by mathematicians, understanding and refactoring the automatically found proofs becomes more and more important.
Logic Programming and Logic Grammars with Binarization and Firstorder Continuations
, 1994
"... . Continuation passing binarization and specialization of the WAM to binary logic programs have been proven practical implementation techniques in the BinProlog system. In this paper we investigate the additional benefits of having first order continuations at source level. We devise a convenient wa ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
. Continuation passing binarization and specialization of the WAM to binary logic programs have been proven practical implementation techniques in the BinProlog system. In this paper we investigate the additional benefits of having first order continuations at source level. We devise a convenient way to manipulate them by introducing multipleheaded clauses which give direct access to continuations at sourcelevel. We discuss the connections with various logic grammars, give examples of typical problem solving tasks and show how looking at the future of computation can improve expressiveness and describe complex control mechanisms without leaving the framework of binary definite programs. Keywords: continuation passing binary logic programs, logic grammars, program transformation based compilation, continuations as first order objects, logic programming with continuations. 1 Introduction From its very inception, logic programming has crossfertilized with computational linguistics in ...
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.
Continuation Prolog: A new intermediary language for WAM and BinWAM code generation
 in PostILPS'95 Workshop on Implementation of Logic Programming Languages. f16g
, 1995
"... We present a new intermediary language suitable for program transformations that fills the gap between Prolog source level and lower representations like binary Prolog or WAMcode. With the help of Continuation Prolog transformations on the level of continuations can be expressed that are unavai ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
We present a new intermediary language suitable for program transformations that fills the gap between Prolog source level and lower representations like binary Prolog or WAMcode. With the help of Continuation Prolog transformations on the level of continuations can be expressed that are unavailable in the usual settings of WAMcode generation.