anchor.diff:      lists:foreach(Fun, ModsToPurge).
   
   %% @spec instrument_and_compile(Files::[file:filename()],
  -%%              Includes::[file:name()], Defines::macros()) -> 'ok' | 'error'
  +%%                              Includes::[file:name()],
  +%%                              Defines::macros())
  +%%          -> {'ok', [mfb()]} | 'error'
   %% @doc: Instrument and compile a list of files.
   %%
   %% Each file is first validated (i.e. checked whether it will compile
  
positive.code:         {ok, Module, Warnings} ->
              %% Log warning messages.
              log_warning_list(Warnings),
              %% A table for holding used variable names.
              ?NT_USED = ets:new(?NT_USED, [named_table, private]),
              %% Instrument given source file.
              concuerror_log:log("Instrumenting file ~p...~n", [File]),
              case instrument(File, Includes, Defines) of
                  {ok, NewForms} ->
                      %% Delete `used` table.
                      ets:delete(?NT_USED),
                      %% Compile instrumented code.
                      %% TODO: More compile options?
                      concuerror_log:log("Compiling instrumented code...~n"),
                      CompOptions = [binary],
                      case compile:forms(NewForms, CompOptions) of
                          {ok, Module, Binary} -> {Module, File, Binary};
                          error -> concuerror_log:log("error~n"), error
                      end;
                  {error, Error} ->
                      concuerror_log:log("error: ~p~n", [Error]),
                      %% Delete `used` table.
                      ets:delete(?NT_USED),
                      error
              end;
          {error, Errors, Warnings} ->
  
negative.code: 
  %% Instrument a function.
  instrument_function(Tree) ->
      %% A set of all variables used in the function.
      Used = erl_syntax_lib:variables(Tree),
      %% Insert the used set into `used` dictionary.
      put(?NT_USED, Used),
      instrument_tree(Tree).
  
  %% Instrument a Tree.
  instrument_tree(Tree) ->
      MapFun = fun(T) -> instrument_term(T) end,
      erl_syntax_lib:map(MapFun, Tree).
  
  %% Instrument a term.
  instrument_term(Tree) ->
      case erl_syntax:type(Tree) of
          application ->
              case get_mfa(Tree) of
                  no_instr -> Tree;
                  {normal, Mfa} -> instrument_application(Mfa);
                  {var, Mfa} -> instrument_var_application(Mfa)
              end;
          infix_expr ->
              Operator = erl_syntax:infix_expr_operator(Tree),
              case erl_syntax:operator_name(Operator) of
                  '!' -> instrument_send(Tree);
                  _Other -> Tree
              end;
          receive_expr -> instrument_receive(Tree);
          underscore -> new_underscore_variable();
          _Other -> Tree
      end.
  
  %% Return {ModuleAtom, FunctionAtom, [ArgTree]} for a function call that
  %% is going to be instrumented or 'no_instr' otherwise.
  get_mfa(Tree) ->
      Qualifier = erl_syntax:application_operator(Tree),
      ArgTrees  = erl_syntax:application_arguments(Tree),
      case erl_syntax:type(Qualifier) of
          atom ->
              Function = erl_syntax:atom_value(Qualifier),
  