anchor.diff:  max_cv(D1, D2) ->
     Merger = fun(_Key, V1, V2) -> max(V1, V2) end,
     orddict:merge(Merger, D1, D2).
  +
  +-else.
  +
  +clock_new() ->
  +  #{}.
  +
  +clock_store(Actor, Index, VectorClock) ->
  +  maps:put(Actor, Index, VectorClock).
  +
  +lookup_clock_value(Actor, VectorClock) ->
  +  maps:get(Actor, VectorClock, 0).
  +
  +max_cv(VC1, VC2) ->
  +  ODVC1 = orddict:from_list(maps:to_list(VC1)),
  +  ODVC2 = orddict:from_list(maps:to_list(VC2)),
  +  Merger = fun(_Key, V1, V2) -> max(V1, V2) end,
  +  MaxVC = orddict:merge(Merger, ODVC1, ODVC2),
  +  maps:from_list(MaxVC).
  +
  +-endif.
   
   next_bound(SchedulingBoundType, Done, PreviousActor, Bound) ->
     case SchedulingBoundType of
  
positive.code:       ClockMap = get_base_clock(OldTrace, []),
        StateClock = lookup_clock(state, ClockMap),
        ActorLast = lookup_clock_value(Actor, StateClock),
        ActorClock = orddict:store(Actor, ActorLast, lookup_clock(Actor, ClockMap)),
        BaseClock =
          case ?is_channel(Actor) of
            true ->
  
negative.code:             #trace_state{clock_map = ClockMap} = TraceState,
              EarlyActorClock = lookup_clock(EarlyActor, ClockMap),
              max_cv(
                Clock, clock_store(EarlyActor, EarlyIndex, EarlyActorClock))
          end
      end,
    update_clock(Rest, Event, NewClock, State).
  