Package datk :: Package core :: Module algs :: Class SynchBFSAck
[hide private]
[frames] | no frames]

Class SynchBFSAck

source code

        distalgs.Algorithm --+    
                             |    
distalgs.Synchronous_Algorithm --+
                                 |
                                SynchBFSAck

Constructs a BFS tree with children pointers and the 'leader' Process at its root

Algorithm (Informal): At any point during execution, there is some set of processes that is "marked," initially just i0. Process i0 sends out a search message at round 1, to all of its outgoing neighbors. At any round, if an unmarked process receives a search message, it marks itself and chooses one of the processes from which the search arrived as its parent. At the first round after a process gets marked, it sends a search message to all of its outgoing neighbors, and an acknowledgement to its parent, so that nodes will also know their children.

Requires:

Effects:

Nested Classes [hide private]
  Search
Search for children
  AckParent
Acknowledge Parent
Instance Methods [hide private]
 
is_i0(self, p) source code
 
msgs_i(self, p)
Determines what messages a Process, p, will send.
source code
 
trans_i(self, p, msgs)
Determines what state transition a Process, p, will perform, having received messages, msgs
source code

Inherited from distalgs.Synchronous_Algorithm: execute, msgs, print_algorithm_terminated, round, run, trans

Inherited from distalgs.Algorithm: __call__, __init__, cleanup, cleanup_i, count_msg, delete, get, halt, halt_i, has, increment, output, set

Class Variables [hide private]

Inherited from distalgs.Algorithm: DEFAULT, DEFAULT_PARAMS, QUIET, SILENT, VERBOSE

Method Details [hide private]

msgs_i(self, p)

source code 

Determines what messages a Process, p, will send.

Overrides: distalgs.Algorithm.msgs_i
(inherited documentation)

trans_i(self, p, msgs)

source code 

Determines what state transition a Process, p, will perform, having received messages, msgs

Overrides: distalgs.Algorithm.trans_i
(inherited documentation)