anchor.diff:  empty_map() ->
     #{}.
   
  +map_store(K, V, Map) ->
  +  maps:put(K, V, Map).
  +
  +map_find(K, Map) ->
  +  maps:find(K, Map).
  +
   is_empty_map(Map) ->
     maps:size(Map) =:= 0.
   
   lookup_clock(P, ClockMap) ->
     maps:get(P, ClockMap, clock_new()).
  -
  -clock_map_store(Actor, Clock, ClockMap) ->
  -  maps:put(Actor, Clock, ClockMap).
   
   clock_new() ->
     #{}.
  
positive.code:       true -> independent;
        false -> IrreversibleClock
      end,
    BaseNewClockMap = clock_map_store(state, StateClock, ClockMap),
    NewClockMap = clock_map_store(Actor, HappenedBeforeClock, BaseNewClockMap),
    %% The HB clock should also be added to anything else stemming
    %% from the step (spawns, sends and deliveries)
    FinalClockMap =
  
negative.code: 
  reset_receive_done([Event|Rest], #scheduler_state{use_receive_patterns = true}) ->
    NewSpecial =
      [patch_message_delivery(S, empty_map()) || S <- Event#event.special],
    [Event#event{special = NewSpecial}|Rest];
  reset_receive_done(Done, _) ->
    Done.
  
  fix_receive_info(RevTraceOrEvents) ->
    fix_receive_info(RevTraceOrEvents, empty_map()).
  
  fix_receive_info(RevTraceOrEvents, ReceiveInfoDict) ->
    fix_receive_info(RevTraceOrEvents, ReceiveInfoDict, []).
  