Results 11 - 20
of
72
An Exploration of the Bird-Meertens Formalism
- In STOP Summer School on Constructive Algorithmics, Abeland
, 1989
"... Two formalisms that have been used extensively in the last few years for the calculation of programs are the Eindhoven quantifier notation and the formalism developed by Bird and Meertens. Although the former has always been applied with ultimate goal the derivation of imperative programs and th ..."
Abstract
-
Cited by 31 (3 self)
- Add to MetaCart
Two formalisms that have been used extensively in the last few years for the calculation of programs are the Eindhoven quantifier notation and the formalism developed by Bird and Meertens. Although the former has always been applied with ultimate goal the derivation of imperative programs and the latter with ultimate goal the derivation of functional programs there is a remarkable similarity in the formal games that are played. This paper explores the Bird-Meertens formalism by expressing and deriving within it the basic rules applicable in the Eindhoven quantifier notation. 1 Calculation was an endless delight to Moorish scholars. They loved problems, they enjoyed finding ingenious methods to solve them, and sometimes they turned their methods into mechanical devices. (J. Bronowski, The Ascent of Man. Book Club Associates: London (1977).) 1 Introduction Our ability to calculate --- whether it be sums, products, differentials, integrals, or whatever --- would be woefull...
Viewing A Program Transformation System At Work
- Joint 6th International Conference on Programming Language Implementation and Logic Programming (PLILP) and 4th International conference on Algebraic and Logic Programming (ALP), volume 844 of Lecture Notes in Computer Science
, 1994
"... How to decrease labor and improve reliability in the development of efficient implementations of nonnumerical algorithms and labor intensive software is an increasingly important problem as the demand for computer technology shifts from easier applications to more complex algorithmic ones; e.g., opt ..."
Abstract
-
Cited by 26 (2 self)
- Add to MetaCart
How to decrease labor and improve reliability in the development of efficient implementations of nonnumerical algorithms and labor intensive software is an increasingly important problem as the demand for computer technology shifts from easier applications to more complex algorithmic ones; e.g., optimizing compilers for supercomputers, intricate data structures to implement efficient solutions to operations research problems, search and analysis algorithms in genetic engineering, complex software tools for workstations, design automation, etc. It is also a difficult problem that is not solved by current CASE tools and software management disciplines, which are oriented towards data processing and other applications, where the implementation and a prediction of its resource utilization follow more directly from the specification. Recently, Cai and Paige reported experiments suggesting a way to implement nonnumerical algorithms in C at a programming rate (i.e., source lines per second) t...
Calculating Functional Programs
- Algebraic and Coalgebraic Methods in the Mathematics of Program Construction, volume 2297 of LNCS, chapter 5
, 2000
"... A good way of developing a correct program is to calculate it from its specification. Functional programming languages are especially suitable for this, because their referential transparency greatly helps calculation. We discuss the ideas behind program calculation, and illustrate with an examp ..."
Abstract
-
Cited by 24 (8 self)
- Add to MetaCart
A good way of developing a correct program is to calculate it from its specification. Functional programming languages are especially suitable for this, because their referential transparency greatly helps calculation. We discuss the ideas behind program calculation, and illustrate with an example (the maximum segment sum problem). We show that calculations are driven by promotion, and that promotion properties arise from universal properties of the data types involved. 1 Context The history of computing is a story of two contrasting trends. On the one hand, the cost and cost/performance ratio of computer hardware plummets; on the other, computer software is over-complex, unreliable and almost inevitably over budget. Clearly, we have learnt how to build computers, but not yet how to program them. It is now widely accepted that ad-hoc approaches to constructing software break down as projects get more ambitious. A more formal approach, based on sound mathematical foundations, i...
Declarative Programming in Prolog
- Logic Programming - Proceedings of the 1993 International Symposium
, 1993
"... We try to assess to what extent declarative programming can be realized in Prolog and which aspects of correctness of Prolog programs can be dealt with by means of declarative interpretation. More specifically, we shall discuss termination of Prolog programs, partial correctness, absence of erro ..."
Abstract
-
Cited by 21 (3 self)
- Add to MetaCart
We try to assess to what extent declarative programming can be realized in Prolog and which aspects of correctness of Prolog programs can be dealt with by means of declarative interpretation. More specifically, we shall discuss termination of Prolog programs, partial correctness, absence of errors and the safe use of negation. 1991 Mathematics Subject Classification: 68Q40, 68T15. CR Categories: F.3.2., F.4.1, H.3.3, I.2.3. Keywords and Phrases: declarative programming, Prolog programs, verification. Notes. This research was partly supported by the ESPRIT Basic Research Action 6810 (Compulog 2). This paper will appear as invited lecture in: Proc. of International Logic Programming Symposium (ILPS '93), The MIT Press, D. Miller (editor). It also appeared as a Technical Report No CT-93-06 in the ILLC Prepublication Series of the University of Amsterdam. 1
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 21 (4 self)
- Add to MetaCart
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...
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 20 (3 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.
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
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...
Virtual Data Structures
- Formal Program Development, Lecture Notes in Computer Science 755
, 1992
"... this paper is to demonstrate a number of techniques which may be used in calculating algorithms for sequence-oriented problems. It may be considered as a further step in the development of a programming method which started with [5]. The basic observation underlying this method is that algorithms ca ..."
Abstract
-
Cited by 14 (3 self)
- Add to MetaCart
this paper is to demonstrate a number of techniques which may be used in calculating algorithms for sequence-oriented problems. It may be considered as a further step in the development of a programming method which started with [5]. The basic observation underlying this method is that algorithms can be the result of a systematic development, in which all design decisions and applied insights are clearly identifiable. One might even claim that the essence of an algorithm is its derivation, and not the program text that results from such a derivation
A New Array Operation
- Graph Reduction: Proceedings of a Workshop
, 1986
"... This paper proposes a new solution, which is a variant on the "monolothic" approach to array operations. The new solution is also not completely satisfactory, but does have advantages complementary to other proposals. It makes a class of programs easy to express, notably those involving the construc ..."
Abstract
-
Cited by 14 (0 self)
- Add to MetaCart
This paper proposes a new solution, which is a variant on the "monolothic" approach to array operations. The new solution is also not completely satisfactory, but does have advantages complementary to other proposals. It makes a class of programs easy to express, notably those involving the construction of histograms. It also allows for parallel implementations without the need to introduce non-determinism. The work reported here was motivated by discussions at the Workshop on Graph Reduction, of which this is the proceedings. In particular, it was motivated by the contributions of Arvind and Paul Hudak (see this volume), and especially Arvind's observation that the histogram problem is difficult to solve in a satisfactory way. After the first draft of this paper was written, I discovered that Simon Peyton Jones independently suggested the same idea, also prompted by one of Arvind's talks. After the second draft was written, I discovered that Guy Steele and Daniel Hillis use a very similar notion in Connection Machine Lisp [SH86]. Apparently the simple innovation described in this paper is an idea whose time has come. This paper is organized as follows. Section 1 briefly surveys previously proposed array operations. Section 2 introduces the new operation. Section 3 gives a small example of its use. Section 4 discusses two variations on the array operation. Section 5 concludes. 1 Background
Non-deterministic Expressions and Predicate Transformers
- Information Processing Letters
, 1997
"... . Non-determinacy is important in the formal specification and formal derivation of programs, but non-determinacy within expressions is theoretically problematical. The refinement calculus side-steps the problem by admitting non-determinacy only at the level of statements, leading to a style of prog ..."
Abstract
-
Cited by 10 (1 self)
- Add to MetaCart
. Non-determinacy is important in the formal specification and formal derivation of programs, but non-determinacy within expressions is theoretically problematical. The refinement calculus side-steps the problem by admitting non-determinacy only at the level of statements, leading to a style of programming that favours statements and procedures over expressions and functions. But expressions are easier to manipulate than statements, and the poverty of the expression notation has made the formal derivation of imperative programs tedious. Here we introduce non-deterministic expressions into the refinement calculus by constructing a weakest precondition semantics for imperative specifications and programs that holds good even when expressions may be non-deterministic. Keywords non-deterministic expressions; weakest preconditions; refinement calculus 1 Introduction Consider the little problem of making a program to compute the sign ('+' or '--') of an integer n, not caring whether '+' o...

