Initially, for every node i in the network, si=nil (this value denotes the ``parent'', i.e., the propagator, of nodei ) and SNi=nil (SNi denotes the set of neighbors from which i has received the message). The cycle starts with the source node sending the message to all its neighbors, and terminates when the source node has received an acknowledgment from all its neighbors. Every node i other than the source node reacts in the following way to input events (reception of message or acknowledgment):
Note that we have defined three test configurations, namely, test3, test4, and test6. test4 is declared as follows in the specification:
eq test4 = (to a broadcast m) < a : Node | nbs : b c, parent : noOid, recdMsg : nil, recdAck : nil > < b : Node | nbs : a c, parent : noOid, recdMsg : nil, recdAck : nil > < c : Node | nbs : b a d, parent : noOid, recdMsg : nil, recdAck : nil > < d : Node | nbs : c, parent : noOid, recdMsg : nil, recdAck : nil > .This configuration models a network with 4 nodes, a, b, c, and d, and where there are links between a and b, between a and c, between b and c, and between c and d. The message (to a broadcast m) initiates a round of the protocol. The initial states can be used to immediately execute the specification. After a round of the protocol, the system should be in a state where all messages have seen the message, and received the various acknowledgments, and there should be no message left in the configuration. Using Maude's default interpreter, we can immediately execute an arbitrary run of the system.
Test runs using Maude's default interpreter.
Sample execution:
1. Store Maude specification as "rbpStatic.maude"
2. Start full-maude
3. "Maude> in rbpStatic.maude"
4. Execute sample runs, e.g., "Maude> (rew test3 .)"
Maude's default interpreter only executes one of the many possible rewrite
paths starting with a given initial term. For a deeper analysis, we
wrote a strategy which returns all nonrewritable states reachable
from the initial state. In the static case, there should only be one such
term.
The specification of the strategy
Test runs of this exhaustive search strategy
for the static case
Sample execution:
1. Store Maude specification for strategy as "strat.maude"
2. Start full-maude
3. "Maude> in rbpStatic.maude"
4. "Maude> in strat.maude"
5. Execute sample runs, e.g., "Maude> (red irreducibleforms(RBP, {'test3}'Configuration, allstaticrules) .)"
[Maude Home Page] |