Results 1  10
of
19
Fold and Unfold for Program Semantics
 In Proc. 3rd ACM SIGPLAN International Conference on Functional Programming
, 1998
"... In this paper we explain how recursion operators can be used to structure and reason about program semantics within a functional language. In particular, we show how the recursion operator fold can be used to structure denotational semantics, how the dual recursion operator unfold can be used to str ..."
Abstract

Cited by 23 (4 self)
 Add to MetaCart
(Show Context)
In this paper we explain how recursion operators can be used to structure and reason about program semantics within a functional language. In particular, we show how the recursion operator fold can be used to structure denotational semantics, how the dual recursion operator unfold can be used to structure operational semantics, and how algebraic properties of these operators can be used to reason about program semantics. The techniques are explained with the aid of two main examples, the first concerning arithmetic expressions, and the second concerning Milner's concurrent language CCS. The aim of the paper is to give functional programmers new insights into recursion operators, program semantics, and the relationships between them. 1 Introduction Many computations are naturally expressed as recursive programs defined in terms of themselves, and properties proved of such programs using some form of inductive argument. Not surprisingly, many programs will have a similar recursive stru...
Relations and Refinement in Circuit Design
 Proc. BCS FACS Workshop on Refinement, Workshops in Computing
, 1991
"... A language of relations and combining forms is presented in which to describe both the behaviour of circuits and the specifications which they must meet. We illustrate a design method that starts by selecting representations for the values on which a circuit operates, and derive the circuit from the ..."
Abstract

Cited by 21 (1 self)
 Add to MetaCart
(Show Context)
A language of relations and combining forms is presented in which to describe both the behaviour of circuits and the specifications which they must meet. We illustrate a design method that starts by selecting representations for the values on which a circuit operates, and derive the circuit from these representations by a process of refinement entirely within the language. Formal methods have always been used in circuit design. It would be unthinkable to attempt to design combinational circuits without using Boolean algebra. This means that circuit designers, unlike programmers, already use mathematical tools as a matter of course. It also means that we have a good basis on which to build higher level formal design methods. Encouraged by these observations, we have been investigating the application of formal program development techniques to circuit design. We view circuit design as the transformation of a program describing the required behaviour into an equivalent program that is s...
Between Functions and Relations in Calculating Programs
, 1992
"... This thesis is about the calculational approach to programming, in which one derives programs from specifications. One such calculational paradigm is Ruby, the relational calculus developed by Jones and Sheeran for describing and designing circuits. We identify two shortcomings with derivations made ..."
Abstract

Cited by 15 (4 self)
 Add to MetaCart
(Show Context)
This thesis is about the calculational approach to programming, in which one derives programs from specifications. One such calculational paradigm is Ruby, the relational calculus developed by Jones and Sheeran for describing and designing circuits. We identify two shortcomings with derivations made using Ruby. The first is that the notion of a program being an implementation of a specification has never been made precise. The second is to do with types. Fundamental to the use of type information in deriving programs is the idea of having types as special kinds of programs. In Ruby, types are partial equivalence relations (pers). Unfortunately, manipulating some formulae involving types has proved difficult within Ruby. In particular, the preconditions of the `induction' laws that are much used within program derivation often work out to be assertions about types; such assertions have typically been verified either by informal arguments or by using predicate calculus, rather than by ap...
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 7 (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 nonrelational calculi. The graph
Making Functionality More General
 In Functional Programming, Glasgow 1991, Workshops in computing
, 1992
"... The notion of functionality is not cast in stone, but depends upon what we have as types in our language. With partial equivalence relations (pers) as types we show that the functional relations are precisely those satisfying the simple equation f = f ffi f [ ffi f , where " [ " is th ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
(Show Context)
The notion of functionality is not cast in stone, but depends upon what we have as types in our language. With partial equivalence relations (pers) as types we show that the functional relations are precisely those satisfying the simple equation f = f ffi f [ ffi f , where " [ " is the relation converse operator. This article forms part of "A calculational theory of pers as types" [1]. 1 Introduction In calculational programming, programs are derived from specifications by a process of algebraic manipulation. Perhaps the best known calculational paradigm is the BirdMeertens formalism, or to use its more colloquial name, Squiggol [2]. Programs in the Squiggol style work upon trees, lists, bags and sets, the socalled Boom hierarchy. The framework was uniformly extended to cover arbitrary recursive types by Malcolm in [3], by means of the Falgebra paradigm of type definition, and resulting catamorphic programming style. More recently, Backhouse et al [4] have made a further ...
The Ruby Interpreter
, 1994
"... Ruby is a relational language developed by Jones and Sheeran for describing and designing circuits. This document is a guide to the Ruby interpreter, which allows Ruby programs to be executed. Contents 1 Introduction 2 2 Ruby 3 3 Executable terms 10 4 Worked examples 14 5 Reference material 24 5.1 ..."
Abstract

Cited by 6 (0 self)
 Add to MetaCart
Ruby is a relational language developed by Jones and Sheeran for describing and designing circuits. This document is a guide to the Ruby interpreter, which allows Ruby programs to be executed. Contents 1 Introduction 2 2 Ruby 3 3 Executable terms 10 4 Worked examples 14 5 Reference material 24 5.1 LML syntax for Ruby terms : : : : : : : : : : : : : : : : : : : : : 24 5.2 Logical and arithmetic primitives : : : : : : : : : : : : : : : : : : 25 5.3 Wiring primitives : : : : : : : : : : : : : : : : : : : : : : : : : : : 25 5.4 Combining forms : : : : : : : : : : : : : : : : : : : : : : : : : : : 27 1 Chapter 1 Introduction Ruby is a relational language developed by Jones and Sheeran for describing and designing circuits [6, 3, 4]. Ruby programs denote binary relations, and programs are builtup inductively from primitive relations using a predefined set of relational operators. Ruby programs also have a geometric interpretation as networks of primitive relations connected by wires,...
A Calculational Theory of Pers as Types
, 1992
"... We present a programming paradigm based upon the notion of binary relations as programs, and partial equivalence relations (pers) as types. Our method is calculational , in that programs are derived from specifications by algebraic manipulation. Working with relations as programs generalises the fu ..."
Abstract

Cited by 5 (2 self)
 Add to MetaCart
We present a programming paradigm based upon the notion of binary relations as programs, and partial equivalence relations (pers) as types. Our method is calculational , in that programs are derived from specifications by algebraic manipulation. Working with relations as programs generalises the functional paradigm, admiting nondeterminism and the use of relation converse. Working with pers as types, we have a more general notion than normal of what constitutes an element of a type; this leads to a more general class of functional relations, the socalled difunctional relations. Our basic method of defining types is to take the fixpoint of a relator , a simple strengthening of the categorical notion of a functor. Further new types can be made by imposing laws and restrictions on the constructors of other types. Having pers as types is fundamental to our treatment of types with laws. Contents 1 Introduction 2 2 Relational calculus 4 2.1 Powerset lattice structure : : : : : : : : :...
A Relational Derivation of a Functional Program
 In Proc. STOP Summer School on Constructive Algorithmics, Ameland, The
, 1992
"... This article is an introduction to the use of relational calculi in deriving programs. We present a derivation in a relational language of a functional program that adds one bit to a binary number. The resulting program is unsurprising, being the standard `column of halfadders', but the deriv ..."
Abstract

Cited by 4 (1 self)
 Add to MetaCart
(Show Context)
This article is an introduction to the use of relational calculi in deriving programs. We present a derivation in a relational language of a functional program that adds one bit to a binary number. The resulting program is unsurprising, being the standard `column of halfadders', but the derivation illustrates a number of points about working with relations rather than functions. 1 Ruby Our derivation is made within the relational calculi developed by Jones and Sheeran [14, 15]. Their language, called Ruby , is designed specifically for the derivation of `hardwarelike' programs that denote finite networks of simple primitives. Ruby has been used to derive a number of different kinds of hardwarelike programs [13, 22, 23, 16]. Programs in Ruby are built piecewise from smaller programs using a simple set of combining forms. Ruby is not meant as a programming language in its own right, but as a tool for developing and explaining algorithms. Fundamental to Ruby is the use of terse not...
Implementing Ruby in a HigherOrder 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 Prologa higherorder 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 Prologa higherorder logic programming languageallowing 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 nond...