Abstract
A class of sequential programs is distributed through a series of program transformations. To construct a concurrent solution, a sequential solution is given first. A decision is made about the distribution of the variables and the sequential solution is transformed so that guards at the outermost level can be evaluated using variables that will be allocated to one process only. Next we introduce processes and communication. The resulting distributed algorithm does not terminate, but it will become quiescent, and in this state the original postcondition will hold. The distributed algorithm is highly nondeterministic and not network specific. A synchronization primitive, the nonblocking channel, is introduced, and used to generalize the first distributed solution to a larger class of networks.
We give two examples of problems that can be solved with this approach. First we show how a more general version of the load-balancing algorithm of [7] can be derived as an instance of this class. Next we instantiate our solution to arrive at an algorithm for distributed sorting. Finally we refine this solution to arrive at a terminating distributed sorting algorithm.
H.Peter Hofstee is supported by an IBM graduate fellowship.
Preview
Unable to display preview. Download preview PDF.
References
E. W. Dijkstra, A discipline of programming (Prentice-Hall, Englewood Cliffs, NJ, 1976).
C.A.R. Hoare, Communicating sequential processes, Comm. ACM (1978) 666–677.
C.A.R. Hoare, Communicating sequential processes (Prentice-Hall International Series in Computer Science, 1985).
A.J. Martin, An axiomatic definition of synchronization primitives, Acta Informatica 16 (1981) 219–235.
A.J. Martin, The probe: an addition to communication primitives, Information Processing Letters, 20 (1985) 125–130.
H. P. Hofstee, A. J. Martin and J. L. A. van de Snepscheut, Distributed sorting, Science of Computer Programming 15 (1990) 119–133.
H. P. Hofstee, J. J. Lukkien and J. L. A. van de Snepscheut, A distributed implementation of a taskpool, In Research Directions in High-Level Parallel Programming Languages, J.B. Banâtre and D. Le Métayer (Eds.), LNCS 574 (1992) 338–348.
H. P. Hofstee, Distributed sorting revisited, unpublished.
K. Mani Chandy and J. Misra, Parallel program design, a foundation (Addison-Wesley, Reading, MA, 1988).
R.-J.R. Back and R. Kurki-Suonio, Decentralization of process nets with centralized control, Distributed Computing, (1989) 3:73–87.
R.-J.R. Back and K. Sere, Deriving an occam implementation of action systems. In Proc. of the 3rd Refinement Workshop BCS FACS, J.M. Morris and R. C. Shaw (Eds.), (Springer Verlag Workshops in Computing Series, 1991).
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1993 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hofstee, H.P. (1993). Distributing a class of sequential programs. In: Bird, R.S., Morgan, C.C., Woodcock, J.C.P. (eds) Mathematics of Program Construction. MPC 1992. Lecture Notes in Computer Science, vol 669. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-56625-2_12
Download citation
DOI: https://doi.org/10.1007/3-540-56625-2_12
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-56625-0
Online ISBN: 978-3-540-47613-9
eBook Packages: Springer Book Archive