anchor.diff:          false ->
               %% This is not a replay, so store the current trace.
               lager:info("~p: recording trace to file.", [?MODULE]),
  -            {ok, #state{trace=[]}};
  +            {ok, #state{trace=[], blocked_processes=[]}};
           _ ->
               %% This is a replay, so load the previous trace.
               lager:info("~p: loading previous trace for replay.", [?MODULE]),
   
               {ok, Bin} = file:read_file(?FILENAME),
               Lines = binary_to_term(Bin),
  -            {ok, #state{previous_trace=Lines, replay=true}}
  +
  +            lists:foreach(fun(Line) ->
  +                lager:info("~p: ~p", [?MODULE, Line])
  +            end, Lines),
  +
  +            lager:info("~p: trace loaded.", [?MODULE]),
  +
  +            {ok, #state{previous_trace=Lines, replay=true, blocked_processes=[]}}
       end.
   
   %% @private
  
positive.code: -record(state, {previous_trace=[],
                  trace=[], 
                  replay=false,
                  identifier=undefined}).
  
  -define(FILENAME, "/tmp/partisan.trace").
  
negative.code: handle_call({trace, Type, Message}, _From, #state{trace=Trace0}=State) ->
      %% lager:info("~p: recording trace type: ~p message: ~p", [?MODULE, Type, Message]),
      {reply, ok, State#state{trace=Trace0++[{Type, Message}]}};
  handle_call({replay, Type, Message}, From, #state{previous_trace=PreviousTrace0, replay=Replay, blocked_processes=BlockedProcesses0}=State) ->
      case Replay of 
          true ->
              %% Find next message that should arrive based on the trace.
              %% Can we process immediately?
              case can_deliver_based_on_trace({Type, Message}, PreviousTrace0) of 
                  true ->
                      %% Deliver as much as we can.
                      {PreviousTrace, BlockedProcesses} = trace_deliver(PreviousTrace0, BlockedProcesses0),
  
                      %% Record new trace position and new list of blocked processes.
                      {reply, ok, State#state{blocked_processes=BlockedProcesses, previous_trace=PreviousTrace}};
                  false ->
                      %% If not, store message, block caller until processed.
                      BlockedProcesses = [{{Type, Message}, From} | BlockedProcesses0],
  
                      %% Block the process.
                      {noreply, State#state{blocked_processes=BlockedProcesses}}
              end;
          false ->
              {reply, ok, State}
      end;
  