Skip to main content

Distributing a class of sequential programs

  • Conference paper
  • First Online:
Mathematics of Program Construction (MPC 1992)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 669))

Included in the following conference series:

  • 144 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. E. W. Dijkstra, A discipline of programming (Prentice-Hall, Englewood Cliffs, NJ, 1976).

    Google Scholar 

  2. C.A.R. Hoare, Communicating sequential processes, Comm. ACM (1978) 666–677.

    Google Scholar 

  3. C.A.R. Hoare, Communicating sequential processes (Prentice-Hall International Series in Computer Science, 1985).

    Google Scholar 

  4. A.J. Martin, An axiomatic definition of synchronization primitives, Acta Informatica 16 (1981) 219–235.

    Google Scholar 

  5. A.J. Martin, The probe: an addition to communication primitives, Information Processing Letters, 20 (1985) 125–130.

    Google Scholar 

  6. H. P. Hofstee, A. J. Martin and J. L. A. van de Snepscheut, Distributed sorting, Science of Computer Programming 15 (1990) 119–133.

    MathSciNet  Google Scholar 

  7. 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.

    Google Scholar 

  8. H. P. Hofstee, Distributed sorting revisited, unpublished.

    Google Scholar 

  9. K. Mani Chandy and J. Misra, Parallel program design, a foundation (Addison-Wesley, Reading, MA, 1988).

    Google Scholar 

  10. R.-J.R. Back and R. Kurki-Suonio, Decentralization of process nets with centralized control, Distributed Computing, (1989) 3:73–87.

    Google Scholar 

  11. 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).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

R. S. Bird C. C. Morgan J. C. P. Woodcock

Rights and permissions

Reprints 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

Publish with us

Policies and ethics