Abstract
Data flow analysis is a technique essential to the compile-time optimization of computer programs, wherein facts relevant to program optimizations are discovered by the global propagation of facts obvious locally. This paper extends several known techniques for data flow analysis of sequential programs to the static analysis of distributed communicating processes. In particular, we present iterative algorithms for detecting unreachable program statements, and for determining the values of program expressions. The latter information can be used to place bounds on the size of variables and messages. Our main innovation is theevent spanning graph, which serves as a heuristic for ordering the nodes through which data flow information is propagated. We consider bothstatic communication, where all channel arguments are constants, and the more difficultdynamic communication, where channel arguments may be variables and channels may be passed as messages.
Similar content being viewed by others
References
C. A. R. Hoare, Communicating sequential processes,Comm. ACM 21(8):666–677 (1978).
R. E. Strom and N. Halim, A new programming methodology for long-lived software systems,IBM J. Research and Development 28(1):52–59 (1984).
U. Engberg and M. Nielsen,A Calculus of Communicating Systems with Label-Passing, Report DAIMI PB-208, Computer Science Department, University of Aarhus (1986).
R. Milner, J. Parrow, and D. Walker,A Calculus of Mobile Processes, Part I, Technical Report ECS-LFCS-89-85, Department of Computer Science, University of Edinburgh (June 1989).
J. A. Feldman, A programming methodology for distributed computing (among other things),Comm. ACM 22(6):353–368 (1979).
J. H. Reif and P. Spirakis, Distributed algorithms for synchronizing interprocess communication within real time,Proc. 13th ACM Symp. Theory of Computation, Madison, Wisconsin 133–145 (1981). Also rewritten as Real-time synchronization of interprocess communications, TR-25-82, Aiken Computation Lab, Harvard Univ., Cambridge, Massachusetts (1982).
J. H. Reif, Dataflow analysis of communicating processes,Proc. 6th ACM Symp. Principles of Programming Languages, pp. 257–268 (June 1979).
M. S. Hecht,Data Flow Analysis of Computer Programs, American Elsevier, New York (1977).
M. S. Hecht and J. D. Ullman, A simple algorithm for global data flow analysis problems,SIAM J. Comput. 4(4):519–532 (1975).
P. Cousot and R. Cousot, Semantic analysis of communicating sequential processes, inProc. 7th Int'l Colloq. on Automata, Languages and Programming, Lecture Notes in Computer Science85:119–133, Springer-Verlag (1980).
W. Peng and S. Purushothaman, Towards data flow analysis of communicating finite state machines,Proc. 8th ACM Symp. Principles of Distributed Computing (August 1989).
R. D. Schilichting and F. B. Schneider, Understanding and using asynchronous message passing,Proc. 1st ACM Symp. Principles of Distributed Computing, Ottawa, Canada, pp. 141–147 (August 1982).
P. F. Kearney,Reasoning about Nondeterministic Data Flow Ph.D. Thesis, Department of Computer Science, University of Queensland, Australia (July 1988).
J. H. Reif and S. A. Smolka, The complexity of reachability in distributed communicating processes,Acta Informatica 25:333–354 (1988).
G. D. Plotkin,A Structural Approach to Operational Semantics Report DAIMI FN-19, Computer Science Department, Aarhus University (1981).
U. Goltz and W. Reisig, CSP programs as nets with individual tokens,Advances in Petri Nets 1984 (G. Rozenberg, ed.), Lecture Notes in Computer Science188:169–196. Springer-Verlag (1985).
S. L. Graham and M. Wegman, A fast and usually linear algorithm for global flow analysis.J. ACM 23(1):172–202 (1976).
B. Wegbreit, Property extraction in well-founded property sets,IEEE Trans. on Software Engineering 1(3):270–285 (1975).
D. E. Knuth,The Art of Computer Programming, Vol. I: Fundamental Algorithms, Addison-Wesley, Reading, Massachusetts (1968).
A. V. Aho, R. Sethi, and J. D. Ullman,Compilers: Principles, Techniques, and Tools, Addison-Wesley, Reading, Massachusetts (1986).
B. K. Rosen, Data flow analysis for procedural languages, RC-5211, IBM T.J. Watson Research Center, Yorktown Heights, New York (1975).
T. C. Spillman, Exposing side effects in a PL/I optimizing compiler,Proc. IFIP Congress 71, North Holland, Amsterdam, pp. 376–381 (1971).
Author information
Authors and Affiliations
Additional information
A preliminary version of this paper appeared in the proceedings of the Sixth Annual ACM Symposium on Principles of Programming Languages, pp. 257–268, June 1979.
Supported by National Science Foundation Grant NSF MCS82-00269 and the Office of Naval Research Contract N00014-80-C-0647.
Supported by National Science Foundation Grants NSF DCR-8505873 and NSF CCR-8704309.
Rights and permissions
About this article
Cite this article
Reif, J.H., Smolka, S.A. Data flow analysis of distributed communicating processes. Int J Parallel Prog 19, 1–30 (1990). https://doi.org/10.1007/BF01407862
Received:
Revised:
Issue Date:
DOI: https://doi.org/10.1007/BF01407862