Results 1 - 10
of
16
Rules and Strategies for Transforming Functional and Logic Programs
- ACM Computing Surveys
, 1996
"... We present an overview of the program transformation methodology, focusing our attention on the so-called `rules + strategies' approach in the case of functional and logic programs. The paper is intended to offer an introduction to the subject. The various techniques we present are illustrated via s ..."
Abstract
-
Cited by 68 (3 self)
- Add to MetaCart
We present an overview of the program transformation methodology, focusing our attention on the so-called `rules + strategies' approach in the case of functional and logic programs. The paper is intended to offer an introduction to the subject. The various techniques we present are illustrated via simple examples. A preliminary version of this report has been published in: Moller, B., Partsch, H., and Schuman, S. (eds.): Formal Program Development. Lecture Notes in Computer Science 755, Springer Verlag (1993) 263--304. Also published in: ACM Computing Surveys, Vol 28, No. 2, June 1996. 3 1 Introduction The program transformation approach to the development of programs has first been advocated by [Burstall-Darlington 77], although the basic ideas were already presented in previous papers by the same authors [Darlington 72, Burstall-Darlington 75]. In that approach the task of writing a correct and efficient program is realized in two phases: the first phase consists in writing an in...
Typed Kleene Algebras
- Mathematics of Program Construction, volume 3125 of LNCS
, 1999
"... this paper and to J. Desharnais for pointing out the counterexample to locality of composition ..."
Abstract
-
Cited by 15 (9 self)
- Add to MetaCart
this paper and to J. Desharnais for pointing out the counterexample to locality of composition
Modal Kleene Algebra And Applications -- A Survey
, 2004
"... Modal Kleene algebras are Kleene algebras with forward and backward modal operators defined via domain and codomain operations. They provide a concise and convenient algebraic framework that subsumes various other calculi and allows treating quite a variety of areas. We survey ..."
Abstract
-
Cited by 10 (5 self)
- Add to MetaCart
Modal Kleene algebras are Kleene algebras with forward and backward modal operators defined via domain and codomain operations. They provide a concise and convenient algebraic framework that subsumes various other calculi and allows treating quite a variety of areas. We survey
Characterizing Determinacy in Kleene Algebras
- Information Sciences
, 2000
"... Elements of Kleene algebras can be used, among others, as abstractions of the inputoutput semantics of nondeterministic programs or as models for the association of pointers with their target objects. In the first case, one seeks to distinguish the subclass of elements that correspond to determinist ..."
Abstract
-
Cited by 10 (5 self)
- Add to MetaCart
Elements of Kleene algebras can be used, among others, as abstractions of the inputoutput semantics of nondeterministic programs or as models for the association of pointers with their target objects. In the first case, one seeks to distinguish the subclass of elements that correspond to deterministic programs. In the second case one is only interested in functional correspondences, since it does not make sense for a pointer to point to two di#erent objects. We discuss several candidate notions of determinacy and clarify their relationship. Some characterizations that are equivalent in the case where the underlying Kleene algebra is an (abstract) relation algebra are not equivalent for general Kleene algebras. 1
Kleene under a Modal Demonic Star
- Journal on Logic and Algebraic Programming, Special Issue on Relation Algebra and Kleene Algebra
, 2004
"... In relational semantics, the input-output semantics of a program is a relation on its set of states. We generalize this in considering elements of Kleene algebras as semantical values. In a nondeterministic context, the demonic semantics is calculated by considering the worst behavior of the program ..."
Abstract
-
Cited by 6 (5 self)
- Add to MetaCart
In relational semantics, the input-output semantics of a program is a relation on its set of states. We generalize this in considering elements of Kleene algebras as semantical values. In a nondeterministic context, the demonic semantics is calculated by considering the worst behavior of the program. In this paper, we concentrate on while loops. Calculating the semantics of a loop is di#cult, but showing the correctness of any candidate abstraction is much easier. For deterministic programs, Mills has described a checking method known as the while statement verification rule.
A Relational Approach To Optimization Problems
, 1996
"... The main contribution of this thesis is a study of the dynamic programming and greedy strategies for solving combinatorial optimization problems. The study is carried out in the context of a calculus of relations, and generalises previous work by using a loop operator in the imperative programming s ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
The main contribution of this thesis is a study of the dynamic programming and greedy strategies for solving combinatorial optimization problems. The study is carried out in the context of a calculus of relations, and generalises previous work by using a loop operator in the imperative programming style for generating feasible solutions, rather than the fold and unfold operators of the functional programming style. The relationship between fold operators and loop operators is explored, and it is shown how to convert from the former to the latter. This fresh approach provides additional insights into the relationship between dynamic programming and greedy algorithms, and helps to unify previously distinct approaches to solving combinatorial optimization problems. Some of the solutions discovered are new and solve problems which had previously proved difficult. The material is illustrated with a selection of problems and solutions that is a mixture of old and new. Another contribution is the invention of a new calculus, called the graph calculus, which is a useful tool for reasoning in the relational calculus and other non-relational calculi. The graph
An Initial-Algebra Approach to Directed Acyclic Graphs
, 1995
"... . The initial-algebra approach to modelling datatypes consists of giving constructors for building larger objects of that type from smaller ones, and laws identifying di#erentways of constructing the same object. The recursive decomposition of objects of the datatype leads directly to a recursiv ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
. The initial-algebra approach to modelling datatypes consists of giving constructors for building larger objects of that type from smaller ones, and laws identifying di#erentways of constructing the same object. The recursive decomposition of objects of the datatype leads directly to a recursive pattern of computation on those objects, whichisvery helpful for both functional and parallel programming. We showhow to model a particular kind of directed acyclic graph using this initial-algebra approach. Keywords. Graphs, data types, catamorphisms, initial algebras, Bird-Meertens Formalism, program derivation. 1 Introduction It is now widely recognized that the traditional ad-hoc approaches to program construction do not yield reliable software; a more systematic and formal approach is required. One such approach consists of program veri#cation---proving after the fact that a given program satis#es its formal speci#cation. This approach turns out to be di#cult to implement, not lea...
Linked Lists Calculated
, 1997
"... . We use a relational calculus of pointer structures to calculate a number of standard algorithms on singly linked lists, both acyclic and cyclic. This shows that our techniques are not just useful for tree-like structures, but apply to general pointer structures as well. 1 Introduction Although po ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
. We use a relational calculus of pointer structures to calculate a number of standard algorithms on singly linked lists, both acyclic and cyclic. This shows that our techniques are not just useful for tree-like structures, but apply to general pointer structures as well. 1 Introduction Although pointer algorithms are very error-prone they lie at the very heart of many implementations. Yet they have received surprisingly little attention in work on formal derivation and verification of programs. If they are treated, mostly formulas from predicate logic are used, which tend, however, to be very complex and unwieldy. A more algebraic approach was presented in the work of Berger et al. (1991) and Moller (1991--1993) and developed into more general form by Moller (1997). However, in the latter paper only examples with tree-like structures were treated. We show that the approach covers cyclic structures as well. In fact, we demonstrate that the derivations for the acyclic case can be carri...
Implementing Ruby in a Higher-Order Logic Programming Language
, 1995
"... Ruby is a relational language for describing hardware circuits. In the past, programming tools existed which only catered for the execution of functional Ruby expressions rather than the complete set of relational ones. In this paper, we develop an implementation of Ruby in Prolog---a higher-order l ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
Ruby is a relational language for describing hardware circuits. In the past, programming tools existed which only catered for the execution of functional Ruby expressions rather than the complete set of relational ones. In this paper, we develop an implementation of Ruby in Prolog---a higher-order logic programming language---allowing the execution of arbitrary, relational Ruby programs. 1 Introduction Programming problems can be tackled by specifying a program's behaviour in an abstract mathematical specification and then, through the application of some appropriate calculus, converting this into an efficient and implementable program. Until recently, the art of deriving computer programs from specification has been performed equationally in a functional calculus [Bir87]. However, it has become evident that a relational calculus affords us a greater degree of expression and flexibility in both specification and proof since a relational calculus naturally captures the notions of non-d...
Greedy-like algorithms in Kleene algebra
- PARTICIPANTS’ PROCEEDINGS 7TH RELMICS/2ND KLEENE WORKSHOP, MALENTE, MAY 12–17, 2003
, 2003
"... This paper provides an algebraic background for the formal derivation of greedy-like algorithms. Such derivations have previously been done in various frameworks including relation algebra. We propose Kleene algebra as a particularly simple alternative. Instead of converse and residuation we use mo ..."
Abstract
-
Cited by 2 (2 self)
- Add to MetaCart
This paper provides an algebraic background for the formal derivation of greedy-like algorithms. Such derivations have previously been done in various frameworks including relation algebra. We propose Kleene algebra as a particularly simple alternative. Instead of converse and residuation we use modal operators that are definable in a wide class of algebras, based on domain/codomain or image/pre-image operations. By abstracting from earlier approaches we arrive at a very general theorem about the correctness of loops that covers particular forms of greedy algorithms as special cases.

