Archived project

Refinement Calculus for Expressions

Goal: My PhD research

Updates
0 new
0
Recommendations
0 new
0
Followers
0 new
1
Reads
0 new
9

Project log

Sharon Flynn
added 2 research items
This paper illustrates a method of transforming an initial speciication expression, which is not necessarily algorithmic, into an eecient func-tional implementation using a reenement calculus for expressions. In doing this, we beneet from the ease of manipulation that state-less ex-pressions allow. However, implementations of functional algorithms are not as cheap as imperative implementations. We further show how an imperative program can be derived from a functional expression using al-gebraic transformations based on the state monad model. The example used to illustrate the method is Bresenham's line drawing algorithm.
In the world of expressions, undefined values arise quite naturally. Simple examples are: the result of division by zero, or the integer square root of a negative number. When manipulating specifications in the form of mathematical expressions, possibly undefined expressions cannot be ignored. Rather, we choose to address the problem. This paper describes how the Coq theorem prover was used to implement a three-valued logic, where the three values are True, False and the undefined logical value ?. The threevalued logic is based on an extended propositional logic, which uses non-strict versions of the familiar operators, disjunction, conjunction and implication. The resulting implementation allowed us to prove some 60 theorems, and provides a solid basis for the implementation of a complete language of expressions with undefinedness.
Sharon Flynn
added 2 research items
Reasoning about software systems developed using components begins with component-level specifications, from which system-level specifications are derived. While sound compositional reasoning is a strength of formal specification methods, practical experience with systems construction leads us to expect surprises when two components that were never intended to be combined are composed. Component specifications, like any other human artifact, are likely to be in error. Composition throws the mistakes in one component against those in another, leading to unexpected and often bizarre behavior.We review the theory of formal software specification and apply it to the combination of component specifications into system-level properties, where deficiencies in component specifications can be strangely reflected. We conclude that desirable properties of system specifications do not always arise from those same properties at the component level.
This paper describes a calculus for the stepwise and piecewise refinement of expressions. It provides a means for the derivation of executable expressions from initial specifications. We take the view that a refinement calculus consists of: a specification language, which usually includes constructs which are non-executable, but is a "superlanguage " of a programming language; a refinement relation between specifications, which possesses particular properties necessary for the refinement of specifications in a stepwise and piecewise manner; and a set of laws determining how such refinements may proceed.
Sharon Flynn
added a project goal
My PhD research
 
Sharon Flynn
added a research item
In order to use expressions as the basis of a specification language, we admit undefinedness, and introduce non- determinism through the use of a choice operator. We extend expressiveness of the language by allowing choice from a set of values. Such a set could be infinite, giving unbounded non-determinism, or it could be empty, producing miracles. In this paper we treat the miraculous specification, examining its uses and highlighting related problems. In particular, we find that miracles promote the possibility of specification in parts, and piecewise refinement. However, their undesirable properties mean that we must limit their use. A biased choice operator is introduced as a method of totalising miraculous expressions. Finally, the formation of miraculous functions is considered with reference to their use and manipulation.