anchor.diff:        skip;
       over_bound ->
         concuerror_logger:bound_reached(Logger),
  +      put(bound_exceeded, true),
         skip;
       NewWakeup ->
         NS = TraceState#trace_state{wakeup_tree = NewWakeup},
  
positive.code: 
  %%------------------------------------------------------------------------------
  
  update_state(#event{special = Special} = Event, State) ->
    #scheduler_state{
       logger = Logger,
       scheduling_bound_type = SchedulingBoundType,
  
negative.code:       ?unique(Logger, ?linfo, msg(show_races), [])
    end.
  
  insert_wakeup_non_optimal(Sleeping, Wakeup, Initials, Conservative, Exploring) ->
    case existing(Sleeping, Initials) of
      true -> skip;
      false -> promote_or_add(Wakeup, Initials, Conservative, Exploring)
    end.
  
  promote_or_add(Wakeup, Initials, Conservative, Exploring) ->
    promote_or_add(Wakeup, Initials, Conservative, Exploring, []).
  
  promote_or_add([], [E|_], Conservative, Exploring, Acc) ->
    Entry =
      #backtrack_entry{
         conservative = Conservative,
         event = E, origin = Exploring,
         wakeup_tree = []
        },
    lists:reverse([Entry|Acc]);
  promote_or_add([Entry|Rest], Initials, Conservative, Exploring, Acc) ->
    #backtrack_entry{conservative = C, event = E, wakeup_tree = []} = Entry,
    #event{actor = A} = E,
    Pred = fun(#event{actor = B}) -> A =:= B end,
    case lists:any(Pred, Initials) of
      true ->
        case C andalso not Conservative of
          true ->
            NewEntry = Entry#backtrack_entry{conservative = false},
            lists:reverse(Acc, [NewEntry|Rest]);
          false -> skip
        end;
      false ->
        promote_or_add(Rest, Initials, Conservative, Exploring, [Entry|Acc])
    end.
  
  insert_wakeup_optimal(Sleeping, Wakeup, NotDep, Bound, Exploring) ->
    case has_sleeping_initial(Sleeping, NotDep) of
      true -> skip;
      false -> insert_wakeup(Wakeup, NotDep, Bound, true, Exploring)
  