anchor.diff:  %%% Internal functions
   %%%===================================================================
   
  -%% @private 
  +%% @private
  +-spec can_deliver_based_on_trace(term(), term(), term(), term()) -> 
  +    {true, delivered} | {true, omitted} | false.
   can_deliver_based_on_trace(Shrinking, {Type, Message}, PreviousTrace, BlockedProcesses) ->
       replay_debug("determining if message ~p: ~p can be delivered.", [Type, Message]),
   
  
positive.code:     %% Iterate blocked processes in an attempt to remove one.
      {ND, T, BP} = lists:foldl(fun({{NextType, NextMessage}, Pid} = BP, {NumDelivered1, Trace1, BlockedProcesses1}) ->
          case can_deliver_based_on_trace(Shrinking, {NextType, NextMessage}, Trace1, BlockedProcesses0) of 
              true ->
                  replay_debug("message ~p ~p can be unblocked!", [NextType, NextMessage]),
  
                  %% Advance the trace.
  
negative.code:                 NewBlockedProcesses = BlockedProcesses1 -- [BP],
  
                  {NewNumDelivered, RestOfTrace, NewBlockedProcesses};
              {true, omitted} ->
                  %% TODO: Not ideal to keep these processes blocked forever, but hey, it works!
                  replay_debug("message ~p ~p should be omitted!", [NextType, NextMessage]),
  
                  %% Advance the trace.
                  [{_, _} | RestOfTrace] = Trace1,
  
                  %% Advance the count of delivered messages.
                  NewNumDelivered = NumDelivered1 + 1,
  
                  {NewNumDelivered, RestOfTrace, BlockedProcesses1};
              false ->
                  replay_debug("pid ~p CANNOT be unblocked yet, unmet dependencies!", [Pid]),
  
  