anchor.diff:              end
       end,
   
  -    %% For each trace, write out the preload omission file.
  -    NewIteration = lists:foldl(fun(Omissions, Iteration) ->
  +    %% Generate schedules.
  +    {GenIteration, GenNumPassed, GenNumFailed, GenNumPruned, GenClassificationsExplored, GenAdditionalTraces} = lists:foldl(fun(Omissions, {GenIteration0, GenNumPassed0, GenNumFailed0, GetNumPruned0, GenClassificationsExplored0, GenAdditionalTraces0}) ->
           % io:format("~n", []),
   
           %% Generate a new trace.
  
positive.code: 
          ClassifySchedule = classify_schedule(3, Annotations, PrefixMessageTypes, OmittedMessageTypes, ConditionalMessageTypes),
  
          %% Store generated schedule.
          true = ets:insert(?SCHEDULES, {Iteration, {Omissions, FinalTraceLines, ClassifySchedule, ScheduleValid}}),
  
          %% Bump iteration.
          Iteration + 1
      end, PreviousIteration, TracesToIterate),
  
      %% Run schedules.
      {NumberPassed, NumberFailed, NumberPruned, NewClassificationsExplored, AdditionalTraces} = ets:foldl(fun({Iteration, {Omissions, FinalTraceLines, ClassifySchedule, ScheduleValid}}, {NumPassed, NumFailed, NumPruned, ClassificationsExplored0, NewTraces0}) ->
          Size = proplists:get_value(size, ets:info(?SCHEDULES)),
          io:format("Exploring schedule for iteration ~p of ~p~n:", [Iteration, Size]),
  
          case execute_schedule(PreloadOmissionFile, ReplayTraceFile, TraceFile, TraceLines, {Iteration, {Omissions, FinalTraceLines, ClassifySchedule, ScheduleValid}}, ClassificationsExplored0, NewTraces0) of
              pruned ->
                  {NumPassed, NumFailed, NumPruned + 1, ClassificationsExplored0, NewTraces0};
              {passed, ClassificationsExplored, NewTraces} ->
                  {NumPassed + 1, NumFailed, NumPruned, ClassificationsExplored, NewTraces};
              {failed, ClassificationsExplored, NewTraces} ->
                  {NumPassed, NumFailed + 1, NumPruned, ClassificationsExplored, NewTraces};
              invalid ->
                  {NumPassed, NumFailed, NumPruned + 1, ClassificationsExplored0, NewTraces0}
          end
      end, {0, 0, 0, PreviousClassificationsExplored, []}, ?SCHEDULES),
  
      io:format("Pass: ~p, Iterations: ~p - ~p, Results: ~p, Failed: ~p, Pruned: ~p~n", [Pass, PreviousIteration, NewIteration, NumberPassed, NumberFailed, NumberPruned]),
  
      case os:getenv("RECURSIVE") of 
          false ->
              analyze(Pass + 1, PreloadOmissionFile, ReplayTraceFile, TraceFile, Causality, Annotations, NewIteration, NewClassificationsExplored, RestTraceLines);
          "false" ->
              analyze(Pass + 1, PreloadOmissionFile, ReplayTraceFile, TraceFile, Causality, Annotations, NewIteration, NewClassificationsExplored, RestTraceLines);
          _Other ->
              analyze(Pass + 1, PreloadOmissionFile, ReplayTraceFile, TraceFile, Causality, Annotations, NewIteration, NewClassificationsExplored, RestTraceLines ++ AdditionalTraces)
      end.
  
  %% @doc Generate the powerset of messages.
  
negative.code:                     NewTraces = case length(Difference) > 0 of
                          true ->
                              io:format("=> * Adding trace to list to explore.~n", []),
  
                              case lists:keymember(Difference, 3, NewTraces0) of 
                                  true ->
                                      io:format("=> * Similar trace already exists, ignoring!~n", []),
                                      NewTraces0;
                                  false ->
                                      NewTraces0 ++ [{hd(NewTraceLines), Omissions, Difference}]
                              end;
                          false ->
                              NewTraces0
                      end,
  