TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
"Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
Scott Moody <[log in to unmask]>
Wed, 25 Nov 1998 13:14:04 PST
Scott Moody <[log in to unmask]>
text/plain (24 lines)
Funny you should mention Graphical Dining Philosophers...

We have been working with simple Tcl/Tk graphics (through Tash) hooked up to
lots of Ada real-time systems for data visualizations, and I
decided to modify the portable-diners mentioned in the html just sent out:

and use TK windows for both the Philosophers, and also the
Chopstick protected objects (what state they were in).
In a very short time, a cool display of the different states
is displayed, in various colors, and you can arrange the windows
so the PO's are between the philosophers.

What is rather interesting with this new  visualization
(over the current Text curses version), is that it can spot possible
problems in the algorithms.  For example, my very cursory
running of the code sometimes shows a Philosopher Eating, but the
adjacent Chopsticks are not always both in the "Picked Up" state.
I will be looking at this more soon, but this is the type of
things that clever visualizations can help uncover.

- Scott Moody