Results 1  10
of
14
Algebra of logic programming
 International Conference on Logic Programming
, 1999
"... At present, the field of declarative programming is split into two main areas based on different formalisms; namely, functional programming, which is based on lambda calculus, and logic programming, which is based on firstorder logic. There are currently several language proposals for integrating th ..."
Abstract

Cited by 24 (4 self)
 Add to MetaCart
At present, the field of declarative programming is split into two main areas based on different formalisms; namely, functional programming, which is based on lambda calculus, and logic programming, which is based on firstorder logic. There are currently several language proposals for integrating the expressiveness of these two models of computation. In this thesis we work towards an integration of the methodology from the two research areas. To this end, we propose an algebraic approach to reasoning about logic programs, corresponding to the approach taken in functional programming. In the first half of the thesis we develop and discuss a framework which forms the basis for our algebraic analysis and transformation methods. The framework is based on an embedding of definite logic programs into lazy functional programs in Haskell, such that both the declarative and the operational semantics of the logic programs are preserved. In spite of its conciseness and apparent simplicity, the embedding proves to have many interesting properties and it gives rise to an algebraic semantics of logic programming. It also allows us to reason about logic programs in a simple calculational style, using rewriting and the algebraic laws of combinators. In the embedding, the meaning of a logic program arises compositionally from the meaning of its constituent subprograms and the combinators that connect them. In the second half of the thesis we explore applications of the embedding to the algebraic transformation of logic programs. A series of examples covers simple program derivations, where our techniques simplify some of the current techniques. Another set of examples explores applications of the more advanced program development techniques from the Algebra of Programming by Bird and de Moor [18], where we expand the techniques currently available for logic program derivation and optimisation. To my parents, Sandor and Erzsebet. And the end of all our exploring Will be to arrive where we started And know the place for the first time.
On Correct Program Schemas
"... We present our work on the representation and correctness of program schemas, in the context of logic program synthesis. Whereas most researchers represent schemas purely syntactically as higherorder expressions, we shall express a schema as an open firstorder theory that axiomatises a probl ..."
Abstract

Cited by 19 (11 self)
 Add to MetaCart
We present our work on the representation and correctness of program schemas, in the context of logic program synthesis. Whereas most researchers represent schemas purely syntactically as higherorder expressions, we shall express a schema as an open firstorder theory that axiomatises a problem domain, called a specification framework, containing an open program that represents the template of the schema. We will show that using our approach we can define a meaningful notion of correctness for schemas, viz. that correct program schemas can be expressed as parametric specification frameworks containing templates that are steadfast, i.e. programs that are always correct provided their open relations are computed correctly.
Extensible Logic Program Schemata
"... . Schemabased transformational systems maintain a library of logic program schemata which capture large classes of logic programs. One of the shortcomings of schemabased transformation approaches is their reliance on a large (possibly incomplete) set of logic program schemata that is required in o ..."
Abstract

Cited by 14 (2 self)
 Add to MetaCart
. Schemabased transformational systems maintain a library of logic program schemata which capture large classes of logic programs. One of the shortcomings of schemabased transformation approaches is their reliance on a large (possibly incomplete) set of logic program schemata that is required in order to capture all of the minor syntactic differences between semantically similar logic programs. By defining a set of extensible logic program schemata and an associated set of logic program transformations, it is possible to reduce the size of the schema library while maintaining the robustness of the transformational system. In our transformational system, we have defined a set of extensible logic program schemata in #Prolog. Because #Prolog is a higherorder logic programming language, it can be used as the representation language for both the logic programs and the extensible logic program schemata. In addition to the instantiation of predicate variables, extensible logic program sc...
Higherorder logic programming in Prolog
, 1995
"... Funcrional programmers have shown... One aim of this paper is to illustrate higher order programming techniques in Prolog. We give examples to show the interaction between higher order programming and other features of Prolog such as nondeterminism, logic variables, flexible modes, meta programming, ..."
Abstract

Cited by 13 (0 self)
 Add to MetaCart
(Show Context)
Funcrional programmers have shown... One aim of this paper is to illustrate higher order programming techniques in Prolog. We give examples to show the interaction between higher order programming and other features of Prolog such as nondeterminism, logic variables, flexible modes, meta programming, Definite Clause Grammar notation and (in some systems) coroutining. Another aim is to point out a significant difference between two ways in which higher order features are supported in logic programming languages. The superior method was suggested by David H.D. Warren over a decade ago. Since then higher order logic programming has gone ooe the rails. The Prolog coding style advocated by O'Keefe and the HiLog and Mercury languages use a less flexible method which does not realise the full benefits of higher order programming. The final aim is to compare the higher order style with the "skeletons and techniques" approach to program development, one of the many approaches based on program patterns, schemata and cliches. We assume familiarity with a modern functional programming language such as Haskell, Miranda or Gofer...
Generalised Logic Program Transformation Schemas
 IN N.E. FUCHS (ED), PROC. OF LOPSTR'97
, 1997
"... Schemabased logic program transformation has proven to be an effective technique for the optimisation of programs. This paper results from the research that began by investigating the suggestions in [11] to construct a more general database of transformation schemas for optimising logic progra ..."
Abstract

Cited by 9 (3 self)
 Add to MetaCart
(Show Context)
Schemabased logic program transformation has proven to be an effective technique for the optimisation of programs. This paper results from the research that began by investigating the suggestions in [11] to construct a more general database of transformation schemas for optimising logic programs at the declarative level. The proposed transformation schemas fully automate accumulator introduction (also known as descending computational generalisation), tupling generalisation (a special case of structural generalisation), and duality laws (which are extensions to relational programming of the first duality law of the fold operators in functional programming). The schemas are proven correct. A prototype schemabased transformation system is evaluated.
A Combinatory Form of Pure Logic Programs and its Compositional Semantics
, 1998
"... ..."
(Show Context)
Logic Program Schemas, SemiUnification and Constraints
 In: N.E. Fuchs (ed), Proc. of LOPSTR'97 (this volume
"... The use of schemas is a classical way of synthesizing, transforming and analyzing logic programs. Operations on schemas are needed, in particular, the semiunification of schemas with programs. Since schemas are secondorder objects, the related semiunification is the secondorder semiunification, ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
The use of schemas is a classical way of synthesizing, transforming and analyzing logic programs. Operations on schemas are needed, in particular, the semiunification of schemas with programs. Since schemas are secondorder objects, the related semiunification is the secondorder semiunification, which is decidable but NPcomplete. The nondeterminism implied by the NPcompleteness slows down the search for a substitution. The present paper expresses the semiunification process over schemas as rewriting and reduction rules. Global and local constraints are associated to the schema to extend the expressivity of schema description and to fasten the search for a secondorder substitution between programs and schemas. CLP techniques and notations are used. 1 Introduction In logic programming, the use of program schemas is a very promising technique. In program synthesis, program schemas can formalize particular resolution methods (divideandconquer, generateandtest approaches...),...
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.
A SchemaBased Approach to Teaching Programming in Lisp and Prolog
, 1996
"... this paper we concentrate on problems related to list processing. A list is a basic data type in both Lisp and Prolog. When a list is to be processed, generally a method of processing recursively all the elements of the list is used. First, several examples of typical list processing problems and th ..."
Abstract
 Add to MetaCart
this paper we concentrate on problems related to list processing. A list is a basic data type in both Lisp and Prolog. When a list is to be processed, generally a method of processing recursively all the elements of the list is used. First, several examples of typical list processing problems and their solutions are presented to students. As an example, let us assume the classical task to find a sum of all the elements of an arbitrary list of integers. Standard Lisp and Prolog programs which solve the task can be written:
SchemaBased Logic Program Transformation
"... SCHEMABASED LOGIC PROGRAM TRANSFORMATION Halime Buyukyildiz M.S. in Computer Engineering and Information Science Supervisor: Ass't Prof. Pierre Flener August 1997 In traditional programming methodology, developing a correct and efficient program is divided into two phases: in the first pha ..."
Abstract
 Add to MetaCart
SCHEMABASED LOGIC PROGRAM TRANSFORMATION Halime Buyukyildiz M.S. in Computer Engineering and Information Science Supervisor: Ass't Prof. Pierre Flener August 1997 In traditional programming methodology, developing a correct and efficient program is divided into two phases: in the first phase, called the synthesis phase, a correct, but maybe inefficient program is constructed, and in the second phase, called the transformation phase, the constructed program is transformed into a more efficient equivalent program. If the synthesis phase is guided by a schema that embodies the algorithm design knowledge abstracting the construction of a particular family of programs, then the transformation phase can also be done in a schemaguided fashion using transformation schemas, which encode the transformation techniques from input program schemas to output program schemas by defining the conditions that have to be verified to have a more efficient equivalent program. Seven program schemas ar...