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.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
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.
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.
de Bakker, J. W.,Mathematical Theory of Program Correctness, Prentice-Hall, N. J., 1980.
Brinch Hansen, P., “Distributed processs: a concurrent programming concept,”Communications of the ACM, Vol. 21, No. 11, pp. 934–941, 1978.
Broy, M., “Transformational semantics of concurrent programs,”Information Processing Letters, Vol. 11, No. 2, pp. 87–91, 1980.
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.
Burge, W. H.,Recursive Programming Techniques, Addison-Wesley, Massachusetts, 1975.
Catto, A. J. and Gurd, J. R., “Nondeterministic dataflow graphs,” inInformation Processing 80, (S. H. Lavington, ed.) North-Holland, Amsterdam, pp. 251–256, 1980.
Dijkstra, E. W.,A Discipline of Programming, Prentice-Hall, N. J., 1976.
Elrad, T. and Francez, N. “Decomposition of distributed programs into communication-closed layers”,Science of Computer Programming 2, pp. 155–173, 1982.
Flon, L. and Suzuki, N., “The total correctness of parallel programs,”SIAM Journal of Computing, Vol. 10, No. 2, pp. 227–246, 1981.
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.
Francez, N., “Distributed termination,”ACM Transactions on Programming Languages and Systems, Vol. 2, No. 1, pp. 42–55, 1980.
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.
Hoare, C. A. R., “An axiomatic basis for computer programming,”Communications of the ACM, Vol. 12, No. 10, pp. 576–583, 1969.
Hoare, C. A. R., “Communicating sequential processes,”Communications of the ACM, Vol. 21, No. 8, pp. 666–677, 1978.
Ida, T. and Tanaka, J., “Functional programming with streams,” inInformation Processessing 83, R. E. A. Mason, ed., North-Holland, Amsterdam, pp. 265–270, 1983.
Jayaraman, B., “Resource Control in a Demand-driven Data-flow Model,”.Ph. D. thesis, Department of Computer Science, University of Utah, Utah, 1981.
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.
Kahn, G. and Macqueen, D., “Coroutines and networks of parallel processes,” inInformation Processing 77, B. Gilchrist, ed., North-Holland, Amsterdam, pp. 993–998, 1977.
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.
Lamport, L., “Proving the correctness of multiprocess programs,”IEEE Transactions on Software Engineering, Vol. 3, No. 2, pp. 125–143, 1977.
van Lamsweerde, A. and Sintzoff, M., “Formal derivation of strongly correct concurrent programs”,Acta Informatica, 12, pp. 1–31, 1979.
Loeckz, J. and Sieber, K.,The Foundations of Program Verification, John Wiley, Chichester, and B. G. Teubner, Stuttgart, 1984.
Milner, R., “Calculi for synchrony and asynchrony”,Theoretical Computer Science, 25, pp. 267–310, 1983.
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.
Pettorossi, A. and Skowron, A., “Communicating agents for applicative concurrent programming,” inLecture Notes in Computer Science 137, Springer-Verlag, Heidelberg, pp. 305–322, 1982.
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.
Weng, K.-S., “Stream-oriented Computation in Recursive Data Flow Schemas,”Technical Report, Lab. for Computer Science, Mass. Inst. Tech., Mass., 1975.
Author information
Authors and Affiliations
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
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF03037451