A Refinement Case Study (using the Abstract Machine Notation)

In this paper, we develop with great details a classical little example1 of refinement from initial specification down to final code. We insist on a few methodological points among which are the following: the importance of a sound mathematical preamble, the systematic usage of data refinement steps based on clear and intuitive technical decisions, the reusability of already specified and refined pieces of code. The exercise is conducted using an homogeneous notational style based on Abstract Machines and Generalized Substitutions [1].