previous up next
Go up to 2 Using the Toolkit
Go forward to 2.2 Writing the Program
RISC-Linz logo

2.1 Executing the Program

If you view this document in HTML format on our Web page, you should see a button labelled "Press Me" embedded below. If you do not see this button but the string "Please enable Java!" instead, you must enable Java on your Web browser1 and then reload the page by pressing the "Reload" button.

Please enable Java!

In case your browser does not support Java or you read this document in text form, we include an image of the window below.

A Trivial Program
 

Do as the "Press Me" button says; you should see a window pop up that visualizes a program implementing the example described above. The window displays three network nodes linked by three pairs of channels; the receiver side of each channel is denoted by a small bullet where the channel touches the node. The nodes contain labels "0", "1", and "2"; the small numerical subscript of each label denotes the current local time of this node; the small number in the left upper corner of the window denotes the global network time.

Pressing the "Run" button starts execution. After the program has terminated, press "Reset" to initialize the visualization again. "Walk" lets the program run in slow mode, "Interrupt" suspends the program, "Step" allows the program advance one step (i.e., one communication operation). "Redraw" redraws the screen, "Quit" lets the visualization terminate (if the network is currently executing, you have to interrupt it before).

During execution, the current state of each node is represented by the color of its boundary:

Green
the node is ready for execution.
Red
the node is blocked (waiting for a message on some channel).
Blue
the node has terminated execution.

Likewise, channel states are denoted by boundary colors:

Gray
the channel is empty.
Green
the channel holds at least one message.
Red
the channel is empty and the receiver node waits for a message.

Textual explanations of the different states are given in the bottom line of the window when you move the mouse cursor over the node respectively channel. Simultaneously, a window pops up that exhibits the internal state of the node respectively channel (in the case of the later, about the queue of messages contained in the channel). A node can be dragged to a different location by clicking on it and moving the mouse while keeping the mouse button pressed.

Selecting in menu "Help" one of the items "About Algorithm" or "About Toolkit" lets some informative panels pop up. Selecting "Home", "Copying", or "Help" loads the corresponding Web page into a window of your Web browser.


Maintainer: Wolfgang Schreiner
Last Modification: November 14, 1997

previous up next