anchor.diff:      %% Should we explore any new schedules we have discovered?
       case os:getenv("RECURSIVE") of 
           "true" ->
  -            analyze(Pass + 1, PreloadOmissionFile, ReplayTraceFile, TraceFile, Causality, Annotations, 1, [], PreloadAdditionalTraces);
  +            analyze(Pass + 1, PreloadOmissionFile, ReplayTraceFile, TraceFile, Causality, CausalityAnnotations, BackgroundAnnotations, 1, [], PreloadAdditionalTraces);
           _ ->
  -            analyze(Pass + 1, PreloadOmissionFile, ReplayTraceFile, TraceFile, Causality, Annotations, GenIteration, PreloadClassificationsExplored, RestTraceLines)
  +            analyze(Pass + 1, PreloadOmissionFile, ReplayTraceFile, TraceFile, Causality, CausalityAnnotations, BackgroundAnnotations, GenIteration, PreloadClassificationsExplored, RestTraceLines)
       end.
   
   %% @doc Generate the powerset of messages.
  
positive.code:     %% Perform recursive analysis of the traces.
      PreviousIteration = 1,
      PreviousClassificationsExplored = [],
      analyze(1, PreloadOmissionFile, ReplayTraceFile, TraceFile, Causality, Annotations, PreviousIteration, PreviousClassificationsExplored, [{TraceLinesWithoutFailure, [], [], []}]),
  
      %% Should we try to find witnesses?
      case os:getenv("FIND_WITNESSES") of 
  
negative.code: 
          % io:format("=> type: ~p, preconditions: ~p~n", [Type, Result]),
          dict:store(Type, Result, Dict0)
      end, dict:new(), dict:to_list(CausalityAnnotations)),
  
      % io:format("classification: ~p~n", [dict:to_list(Classification)]),
  
      Classification.
  
  %% @private
  ensure_preconditions_present(Causality, CausalityAnnotations, BackgroundAnnotations) ->
      %% Get all messages that are the result of other messages.
      CausalMessages = lists:foldl(fun({_, Messages}, Acc) ->
          Messages ++ Acc
      end, [], dict:to_list(Causality)),
  
      lists:foldl(fun(Message, Acc) ->
          case lists:keymember(Message, 1, dict:to_list(CausalityAnnotations)) of 
              true ->
                  Acc andalso true;
              false ->
                  case lists:member(element(2, Message), BackgroundAnnotations) of 
                      true ->
                          Acc andalso true;
                      false ->
                          io:format("Precondition not found for message type: ~p~n", [Message]),
                          Acc andalso false
                  end
          end
      end, true, CausalMessages).
  
  