anchor.diff:        [#backtrack_entry{wakeup_tree = NWT}|Rest] -> {Rest, NWT}
       end,
     NewSchedulingBound =
  -    case SchedulingBoundType of
  -      none -> SchedulingBound;
  -      simple ->
  -        %% First reschedule costs one point, otherwise nothing.
  -        case Done of
  -          [_] -> SchedulingBound - 1;
  -          _ -> SchedulingBound
  -        end
  -    end,
  +    next_bound(SchedulingBoundType, Done, PreviousActor, SchedulingBound),
     NewLastDone = [Event|Done],
     InitNextTrace =
       #trace_state{
          actors      = Actors,
          index       = Index + 1,
  +       previous_actor = Actor,
          scheduling_bound = NewSchedulingBound,
          sleeping    = NextSleeping,
          wakeup_tree = NextWakeupTree
  
positive.code:   InitNewState =
      State#scheduler_state{trace = [InitNextTrace, NewLastTrace|Prev]},
    NewState = maybe_log(Event, InitNewState, Index),
    {ok, update_special(Special, NewState)}.
  
  maybe_log(#event{actor = P} = Event, State0, Index) ->
    #scheduler_state{
  
negative.code:              true -> Clock;
               false -> {EarlyActor, EarlyIndex}
             end},
          Sleeping = BaseSleeping ++ Done,
          NotDep = not_dep(NewOldTrace, Later, DPORInfo, Event),
          NW =
            case DPOR =:= optimal of
              true ->
                insert_wakeup_optimal(Sleeping, Wakeup, NotDep, Bound, Exploring);
              false ->
                Initials = get_initials(NotDep),
                insert_wakeup_non_optimal(Sleeping, Wakeup, Initials, false, Exploring)
            end,
          case is_atom(NW) of
            true -> NW;
            false ->
              show_plan(NW, false, Logger, EarlyIndex, NotDep),
              NW
          end
      end,
    case MaybeNewWakeup of
      skip ->
  