Skip to main content
Log in

A functional style of programming with CSP-like communication mechanisms

  • Regular Papers
  • Published:
New Generation Computing Aims and scope Submit manuscript

Abstract

This paper introduces CSP-like communication mechanisms into Backus’ Functional Programming (FP) systems extended by nondeterministic constructs. Several new functionals are used to describe nondeterminism and communication in programs. The functionals union and restriction are introduced into FP systems to develop a simple algebra of programs with nondeterminism. The behaviour of other functionals proposed in this paper are characterized by the properties of union and restriction. The axiomatic semantics of communication constructs are presented. Examples show that it is possible to reason about a communicating program by first transforming it into a non-communicating program by using the axioms of communication, and then reasoning about the resulting non-communicating version of the program. It is also shown that communicating programs can be developed from non-communicating programs given as specifications by using a transformational approach.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Backus, J., “The algebra of functional programs; function level reasoning, linear equations, and extended definitions,” inLecture Notes in Computer Science 107, Springer-Verlag, Heidelberg, pp. 1–43, 1981.

    Google Scholar 

  2. Backus, J., “Can programming be liberated from the von Neumann style? A functional style and its algebra of programs,”Communications of the ACM, Vol. 21, No. 8, pp. 613–641, 1978.

    Article  MATH  MathSciNet  Google Scholar 

  3. de Bakker, J. W.,Mathematical Theory of Program Correctness, Prentice-Hall, N. J., 1980.

    MATH  Google Scholar 

  4. Brinch Hansen, P., “Distributed processs: a concurrent programming concept,”Communications of the ACM, Vol. 21, No. 11, pp. 934–941, 1978.

    Article  MATH  Google Scholar 

  5. Broy, M., “Transformational semantics of concurrent programs,”Information Processing Letters, Vol. 11, No. 2, pp. 87–91, 1980.

    Article  MATH  MathSciNet  Google Scholar 

  6. Broy, M., Gnatz, R. and Wirsing, M., “Semantics of nondeterministic and non-continuous constructs,” inLecture Notes in Computer Science 69, Springer-Verlag, Heidelberg, pp. 533–592, 1979.

    Google Scholar 

  7. Burge, W. H.,Recursive Programming Techniques, Addison-Wesley, Massachusetts, 1975.

    MATH  Google Scholar 

  8. Catto, A. J. and Gurd, J. R., “Nondeterministic dataflow graphs,” inInformation Processing 80, (S. H. Lavington, ed.) North-Holland, Amsterdam, pp. 251–256, 1980.

    Google Scholar 

  9. Dijkstra, E. W.,A Discipline of Programming, Prentice-Hall, N. J., 1976.

    MATH  Google Scholar 

  10. Elrad, T. and Francez, N. “Decomposition of distributed programs into communication-closed layers”,Science of Computer Programming 2, pp. 155–173, 1982.

    Article  MATH  Google Scholar 

  11. Flon, L. and Suzuki, N., “The total correctness of parallel programs,”SIAM Journal of Computing, Vol. 10, No. 2, pp. 227–246, 1981.

    Article  MATH  MathSciNet  Google Scholar 

  12. de Francesco, N. Perego G., Tomasi, A., Vaglini, G. and Vanneschi, M., “On the feasibility of nondeterministic and interprocess communication constructs in data-flow systems”, inProceedings First European Conference on Parallel and Distributed Processing, pp. 93–100, 1979.

  13. Francez, N., “Distributed termination,”ACM Transactions on Programming Languages and Systems, Vol. 2, No. 1, pp. 42–55, 1980.

    Article  MATH  Google Scholar 

  14. Goswami, A. K., “Nondeterminism and Communication in Functional Programming Systems: A Study in Formal Program Development”.Ph. D. thesis, School of Automation, Indian Institute of Science, Bangalore, 1985.

    Google Scholar 

  15. Hoare, C. A. R., “An axiomatic basis for computer programming,”Communications of the ACM, Vol. 12, No. 10, pp. 576–583, 1969.

    Article  MATH  Google Scholar 

  16. Hoare, C. A. R., “Communicating sequential processes,”Communications of the ACM, Vol. 21, No. 8, pp. 666–677, 1978.

    Article  MATH  MathSciNet  Google Scholar 

  17. Ida, T. and Tanaka, J., “Functional programming with streams,” inInformation Processessing 83, R. E. A. Mason, ed., North-Holland, Amsterdam, pp. 265–270, 1983.

    Google Scholar 

  18. Jayaraman, B., “Resource Control in a Demand-driven Data-flow Model,”.Ph. D. thesis, Department of Computer Science, University of Utah, Utah, 1981.

    Google Scholar 

  19. Kahn, G., “The semantics of a simple language for parallel programming,” inInformation Processing 74, J. L. Rosenfeld, ed., North-Holland, Amsterdam, pp. 471–475, 1974.

    Google Scholar 

  20. Kahn, G. and Macqueen, D., “Coroutines and networks of parallel processes,” inInformation Processing 77, B. Gilchrist, ed., North-Holland, Amsterdam, pp. 993–998, 1977.

    Google Scholar 

  21. Kieburtz, R. B. and Silberschatz, A., “Comments on communicating sequential processes”,ACM Transactions on Programming Languages and Systems, Vol. 1, No. 2, pp. 218–225, 1979.

    Article  MATH  Google Scholar 

  22. Lamport, L., “Proving the correctness of multiprocess programs,”IEEE Transactions on Software Engineering, Vol. 3, No. 2, pp. 125–143, 1977.

    Article  MathSciNet  Google Scholar 

  23. van Lamsweerde, A. and Sintzoff, M., “Formal derivation of strongly correct concurrent programs”,Acta Informatica, 12, pp. 1–31, 1979.

    Article  MATH  MathSciNet  Google Scholar 

  24. Loeckz, J. and Sieber, K.,The Foundations of Program Verification, John Wiley, Chichester, and B. G. Teubner, Stuttgart, 1984.

    Google Scholar 

  25. Milner, R., “Calculi for synchrony and asynchrony”,Theoretical Computer Science, 25, pp. 267–310, 1983.

    Article  MATH  MathSciNet  Google Scholar 

  26. Pettorossi, A., “Towards a theory of parallelism and communications for increasing efficiency in applicative languages,” inLecture Notes in Computer Science 148, Springer-Verlag, Heidelberg, pp. 224–249, 1983.

    Google Scholar 

  27. Pettorossi, A. and Skowron, A., “Communicating agents for applicative concurrent programming,” inLecture Notes in Computer Science 137, Springer-Verlag, Heidelberg, pp. 305–322, 1982.

    Google Scholar 

  28. Sintzoff, M., “Issues in the methodical design of concurrent programs,” inComputer Program Synthesis Methodologies (A. W. Biermann and G. Guiho, eds.), D. Reidel, Dordrecht, pp. 51–78, 1983.

    Google Scholar 

  29. Weng, K.-S., “Stream-oriented Computation in Recursive Data Flow Schemas,”Technical Report, Lab. for Computer Science, Mass. Inst. Tech., Mass., 1975.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

About this article

Cite this article

Goswami, A.K., Patnaik, L.M. A functional style of programming with CSP-like communication mechanisms. New Gener Comput 7, 341–364 (1990). https://doi.org/10.1007/BF03037451

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF03037451

Keywords

Navigation