anchor.diff:  -export_type([passed_state/0]).
   -endif.
   
  --record(state, {
  -          msg_queues       = ?required(state, msg_queues)
  -          :: list({{Src :: comm:mypid(), Dest :: comm:mypid()}, queue()}),
  -          msg_delay_queues = ?required(state, msg_delay_queues)
  -          :: list({{Dest :: comm:mypid()}, queue()}),
  -          status           = ?required(state, status)
  -          :: stopped | running | start_delivery,
  -          passed_state     = ?required(state, passed_state)
  -          :: none | passed_state(),
  -          num_possible_executions = ?required(state, passed_state)
  -          :: pos_integer()
  -         }).
  +-type queue_key()        :: {Src :: comm:mypid(), Dest :: comm:mypid()}.
  +-type delay_queue_key()  :: {Dest :: comm:mypid()}.
  +-type msg_queues()       :: [{queue_key(), queue()}].
  +-type msg_delay_queues() :: [{delay_queue_key(), queue()}].
  +
  +-record(state,
  +        {msg_queues              = ?required(state, msg_queues)
  +                                       :: msg_queues(),
  +         msg_delay_queues        = ?required(state, msg_delay_queues)
  +                                       :: msg_delay_queues(),
  +         status                  = ?required(state, status)
  +                                       :: stopped | running | start_delivery,
  +         passed_state            = ?required(state, passed_state)
  +                                       :: none | passed_state(),
  +         num_possible_executions = ?required(state, passed_state)
  +                                       :: pos_integer()
  +        }).
   
   -type state_t() :: #state{}.
   -spec start() -> ok.
  
positive.code:     State2 = State#state{msg_queues = NewQueues},
      {Src, Dest, LorG, M, Len, State2}.
  
  -spec pop_random_delay_message(state_t()) -> {comm:mypid(), comm:message(), state_t()}.
  pop_random_delay_message(#state{msg_delay_queues = OldQueues} = State) ->
      {{Dest} = Key, Q} = util:randomelem(OldQueues),
      {{value, M}, Q2} = queue:out(Q),
      NewQueues = update_queue_in_list_of_queues(Key, Q2, OldQueues),
      State2 = State#state{msg_delay_queues = NewQueues},
      {Dest, M, State2}.
  
  add_to_list_of_queues(Key, M, Queues) ->
      case lists:keyfind(Key, 1, Queues) of
          {_, Queue} ->
  
negative.code:             [{Key, Q} | Queues]
      end.
  
  -spec update_queue_in_list_of_queues
          (queue_key(), queue(), msg_queues()) -> msg_queues().%;
          %(delay_queue_key(), queue(), msg_delay_queues()) -> msg_delay_queues().
  update_queue_in_list_of_queues(Key, Q, Queues) ->
      case queue:is_empty(Q) of
          true ->
  