[cs63201] FW: Project 1

Mikhail Nesterenko mikhail at cs.kent.edu
Fri Sep 20 15:27:58 EDT 2013


> Sent: Thursday, September 19, 2013 2:45 PM
> To: NESTERENKO, MIKHAIL
> Subject: Project 1
> 
> Hi Professor Nesterenko,
> 
[...]
> 
> Thanks!




The code looks nice. Several suggestions. It is designed to execute a
single distributed program - flooding. It is not easy to extract this
program from your code and change it to anther program. Instead,
consider coding your simulation engine such that it can execute any
message-passing guarded command program. And the example of such
program would be flooding. For that you would need code to evaluates
which process is enabled (actions may be enabled even if there there
are no incoming messages, for example, the start action of the
initiator), then randomly select the enabled process and execute the
enabled guarded command. Note that in general, there may be several
guarded commands enabled in a single process. For example, if there
are several incoming messages coming from different neighbors.

So in effect, your distributed system should have a function that
evaluates the predicates of actions (to see which ones are enabled)
and then another function that randomly picks a guarded command among
enabled actions and executes it.

As a debugging and observing tool, it would be nice if your program
prints the executed action and the resultant global state. This way
you would have the whole computation printed for you.

Thanks,
-- 
Mikhail


More information about the cs63201 mailing list