## Calculational Derivation of Pointer Algorithms from Tree Operations (1998)

Venue: | Science of Computer Programming |

Citations: | 9 - 1 self |

### BibTeX

@INPROCEEDINGS{Butler98calculationalderivation,

author = {Michael Butler},

title = {Calculational Derivation of Pointer Algorithms from Tree Operations},

booktitle = {Science of Computer Programming},

year = {1998},

pages = {221--260}

}

### Years of Citing Articles

### OpenURL

### Abstract

We describe an approach to the derivation of correct algorithms on treebased pointer structures. The approach is based on enriching trees in a way that allows us to model commonly-used pointer manipulations on tree structures.

### Citations

1400 |
Recursive programming
- Dijkstra
- 1960
(Show Context)
Citation Context ...gram which is then refined by a series of correctness-preserving refinement transformations into an efficient, executable program. The programming notation used is Dijkstra's guarded command language =-=[8]-=-, extended with assertion statements fpg (assume predicate p holds at this point in the computation) and generalised assignments x := x 0 jp (assign to x a value x 0 satisfying predicate p). In order ... |

751 | Rewrite systems
- Dershowitz, Jouannaud
- 1992
(Show Context)
Citation Context ...root of the subtree reached by path m replaced by b: node(a; L; R)sbs= node(b; L; R) t [msb]s= t [mn(t=msb)]: The use of paths to access and manipulate subtrees is common in term-rewriting literature =-=[7]-=-. Scope and Outline In this paper, we present pointer-introduction rules that transform an imperative algorithm on enriched trees into an algorithm on pointer structures. For example, the procedure in... |

724 |
The B-Book: Assigning Programs to Meanings
- Abrial
- 1996
(Show Context)
Citation Context ...les that are common to both the abstract and concrete statements). S is data-refined by T under abstraction relation R, written S vR T , if the following holds, for all postconditions q where c nfi q =-=[1, 2, 15, 17]-=- (x nfi P means that x is not free in P): Rswp(S ; q) ) wp(T ; 9a \Delta Rsq): We also make use of the least data-refinement of a statement. Again, let S be a statement with program variables u; a, an... |

155 |
A theoretical basis for stepwise refinement and the programming calculus
- Morris
- 1987
(Show Context)
Citation Context ...ons may be applied, which means that the full derivation path is not completely mechanical. The program derivation framework used in our approach is the refinement calculussof Back, Morgan and Morris =-=[2, 14, 16]-=-. The refinement calculus is a formalisation of the stepwise refinement method of program construction. The required behaviour is specified as an abstract, possibly non-executable, program which is th... |

109 |
Correctness preserving program refinements: proof theory and applications
- Back
- 1980
(Show Context)
Citation Context ...ons may be applied, which means that the full derivation path is not completely mechanical. The program derivation framework used in our approach is the refinement calculussof Back, Morgan and Morris =-=[2, 14, 16]-=-. The refinement calculus is a formalisation of the stepwise refinement method of program construction. The required behaviour is specified as an abstract, possibly non-executable, program which is th... |

45 |
Programming from Specifications, Second Edition
- Morgan
- 1994
(Show Context)
Citation Context ...ons may be applied, which means that the full derivation path is not completely mechanical. The program derivation framework used in our approach is the refinement calculussof Back, Morgan and Morris =-=[2, 14, 16]-=-. The refinement calculus is a formalisation of the stepwise refinement method of program construction. The required behaviour is specified as an abstract, possibly non-executable, program which is th... |

39 |
Normal form approach to compiler design
- Hoare, Jifeng, et al.
- 1993
(Show Context)
Citation Context ...late a data refinement of a statement S under R by calculating a refinement of D a;c R [[ S ]]. Rules that support such calculation by distributing D a ;c R through the structure of S may be found in =-=[9, 15, 17, 18]-=-. Some of these rules are repeated in Figure 9. The first rule shows that D a;c R distributes through sequential composition. The second and third rules show that D a;c R distributes through if-statem... |

36 |
Laws of data refinement
- Morris
- 1989
(Show Context)
Citation Context ...les that are common to both the abstract and concrete statements). S is data-refined by T under abstraction relation R, written S vR T , if the following holds, for all postconditions q where c nfi q =-=[1, 2, 15, 17]-=- (x nfi P means that x is not free in P): Rswp(S ; q) ) wp(T ; 9a \Delta Rsq): We also make use of the least data-refinement of a statement. Again, let S be a statement with program variables u; a, an... |

29 |
Verification of array, record, and pointer operations in pascal
- Luckham, Suzuki
- 1979
(Show Context)
Citation Context ...eal safely with storage allocation and deallocation (though we have ignored the potential problem of running out of memory). Several approaches to dealing with correctness of pointer algorithms exist =-=[3, 10, 11]-=-. These provide general rules for reasoning about programs at the level of pointers. Their use can be quite cumbersome as they usually involve complex assertions. Moller introduced a transformational ... |

27 | The refinement calculator: Proof support for program refinement
- Butler, Grundy, et al.
- 1997
(Show Context)
Citation Context ...icates and expressions. The restrictions on what is transformable are also syntactic. Therefore it should be possible to embed these transformations in a tool that supports program refinement such as =-=[5]-=-. It should also be possible to provide support for the applicative-to-imperative refinement schemas in such a tool. Although we have restricted ourselves to binary trees, the approach described here ... |

18 |
Towards pointer algebra
- Möller
- 1993
(Show Context)
Citation Context ...reasoning about programs at the level of pointers. Their use can be quite cumbersome as they usually involve complex assertions. Moller introduced a transformational approach to pointer algorithms in =-=[12, 13]-=-. He explicitly treats the store as a partial map and provides algebraic laws for partial maps that can be used to transform operations on abstract lists and trees to pointer algorithms. Moller's work... |

16 |
Calculating with pointer structures
- Möller
- 1997
(Show Context)
Citation Context ...reasoning about programs at the level of pointers. Their use can be quite cumbersome as they usually involve complex assertions. Moller introduced a transformational approach to pointer algorithms in =-=[12, 13]-=-. He explicitly treats the store as a partial map and provides algebraic laws for partial maps that can be used to transform operations on abstract lists and trees to pointer algorithms. Moller's work... |

12 |
Verification of programs that destructively manipulate data
- Mason
- 1988
(Show Context)
Citation Context ...eal safely with storage allocation and deallocation (though we have ignored the potential problem of running out of memory). Several approaches to dealing with correctness of pointer algorithms exist =-=[3, 10, 11]-=-. These provide general rules for reasoning about programs at the level of pointers. Their use can be quite cumbersome as they usually involve complex assertions. Moller introduced a transformational ... |

12 |
On the refinement calculus. Formal approaches of computing and information technology series
- Morgan, Vickers, et al.
- 1994
(Show Context)
Citation Context ...les that are common to both the abstract and concrete statements). S is data-refined by T under abstraction relation R, written S vR T , if the following holds, for all postconditions q where c nfi q =-=[1, 2, 15, 17]-=- (x nfi P means that x is not free in P): Rswp(S ; q) ) wp(T ; 9a \Delta Rsq): We also make use of the least data-refinement of a statement. Again, let S be a statement with program variables u; a, an... |

12 | A tool for data refinement
- Ruksenas, Wright
- 1997
(Show Context)
Citation Context ...late a data refinement of a statement S under R by calculating a refinement of D a;c R [[ S ]]. Rules that support such calculation by distributing D a ;c R through the structure of S may be found in =-=[9, 15, 17, 18]-=-. Some of these rules are repeated in Figure 9. The first rule shows that D a;c R distributes through sequential composition. The second and third rules show that D a;c R distributes through if-statem... |

10 |
Calculating with pointers
- Bijlsma
- 1989
(Show Context)
Citation Context ...eal safely with storage allocation and deallocation (though we have ignored the potential problem of running out of memory). Several approaches to dealing with correctness of pointer algorithms exist =-=[3, 10, 11]-=-. These provide general rules for reasoning about programs at the level of pointers. Their use can be quite cumbersome as they usually involve complex assertions. Moller introduced a transformational ... |

4 |
Paths: An Abstract Alternative to Pointers
- Cartwright, Hood, et al.
- 1981
(Show Context)
Citation Context ...y of these complications. The idea of using paths as abstractions for pointers is not new either. Cartwright et al proposed extending Lisp-like data structures with paths in order to replace pointers =-=[6]-=-. They provide some operations similar to ours such as extending a path to the left or to the right. However, they don't provide a cut operation or deal with sharing in the way that we do. Many operat... |

1 |
Calculational derivation of algorithms on tree-based pointer structures
- Butler
- 1996
(Show Context)
Citation Context ...ese rules are presented in two sections, Sections 4 and 7, to mirror the presentation of the pointer-introduction transformations. Some of the ideas presented in this paper appear in an earlier paper =-=[4]-=-. However, that paper did not present a full pointer-introduction transformation mechanism, rather a set of rules that could be used to assist the transformation. These rules were many and complicated... |