Browsing parallel process networks
Journal of Parallel and Distributed Computing
A h ypertext is a non-linearly organized, browsable information structure. The importance of browsing distinguishes hypertext from other network information systems. In this paper we demonstrate the use of the Trellis hypertext system and its associated parallel browsing semantics for visualization and simulation of the parallel control ow and message network of CSP programs. This is accomplished by automatically translating the text of a CSP program into a Trellis hypertext document. The
... s model employs the dual nature of Petri nets to formally express in one structure both the linked information elements of a hypertext and the reader/document i n teractions during browsing. Translation of CSP involves generating a Petri net to represent the parallel threads and synchronization of the concurrent processes, as well as generation of highlighted text fragments for display during browsing. The advantages of using Trellis for browsing CSP programs stem from Petri nets being a natural concurrency model. Trellis contains a palette of net analysis algorithms that can be used to analyze CSP programs for deadlock, trap states, and other properties of interest to parallel programmers. Moreover, this tool is not a special purpose code browser, but rather it is the application of a general net-based hypertext system to an especially appropriate domain. A Trellis-based visualization environment for other parallel languages, like Ada, can similarly be produced by designing an appropriate Petri net representation for its features. Translation into an Trellis document w ould then be most e ectively implemented as a by-product of program compilation. Program browsing, hypertext, and Trellis Hypertext is a growing research eld that, loosely de ned, encompasses study and exploration of the construction (authoring) and use (navigation, browsing) of non-linearly linked information structures. Conklin's recent article 1] will give the interested reader a comprehensive i n troduction to the concepts and practical applications of current h ypertext research. It is within this context of ongoing hypertext research, speci cally the authors' Trellis project 10], that a browsing technique for parallel programs has been developed. This report illustrates the technique with a speci c visualization environment based on Hoare's CSP language 4, 5]. These browsing ideas can readily be adapted to other languages, though, and easily implemented with only a parser and a Trellis-based hypertext system. The browsing tool described here present s a h ypertextual abstraction of a CSP program, representing the creation and deletion of its parallel processes, the control ow within them, and the message tra c among them. Data states and value transformations are ignored. The reader (the system designer or program user) can simulate execution of the process network by selecting hypertext links to follow, representing transfer of control from one statement to the next, or the synchronized transmission of a message. In this simulation, the reader performs the role of the data state, directing branching and parallelism according to exploratory whims. Multiple windows in the tool provide simultaneous views of the activity within each a c t i v e process. Within each window the text of a process is shown, with the currently active statement highlighted. A graphical representation of the program network is also available, though in the current tool it requires some reader manipulation after generation to make its appearance neat. Activities are depicted in this graph corresponding to the loci of control in the various active processes. Hypertextual exploration of a CSP program will help an author (or a user) to visualize the interrelationships among the components of the program, and will help uncover unexpected behavior or problems in the code. The goal of the visualization environment is to augment the reader's intuition about, and static knowledge of, the code by providing an operational feeling for the individual and collective b e h a viors of the concurrently executing program components. Using the Trellis formalism and the Trellis system (explained below) to do this provides an added advantage, in that Petri net analysis techniques can be employed with the browser to examine a CSP program in ways other than exploratory. Our visualization tool extends the concepts of program browsing from the sequential domain into the domain of concurrent computations. Parallel program browsing requires the ability to examine message connections and visualize concurrent c o n trol threads. Our project is also unique in that it is not a special-purpose application, but is instead constructed by applying a general net-based hypertext model to parallel programs. As suggested previously, the browsing and analysis facilities developed for the readers of hypertext documents are immediately useful when applied to programs. In the following sections, we give a brief overview of the Trellis hypertext model 10], and a description of a prototype system called Trellis 12, 1 1 ] with which the CSP browser has been implemented. This discussion assumes that the reader is somewhat familiar with basic Petri net notation and execution semantics. For those who are not, Murata's recent survey 7] provides an excellent o verview of the topic for a deeper treatment of net theory, Reisig's book 9] is comprehensive and thorough.