anchor.diff:  %%--------------------------------------------------------------------
   -spec exec_test(M :: atom(), F :: atom(), Inputs :: list()) -> list() | {error, term()}.
   exec_test(M, F, Inputs) ->
  -  try
  -    BeforeProcessing = os:timestamp(),
  -    Ans = annotation:call_advised(M, F, Inputs),
  -    AfterProcessing = os:timestamp(),
  -    case check_links() of
  -      ok ->
  -        TestTime = timer:now_diff(AfterProcessing, BeforeProcessing),
  -        case Ans of
  -          {K, V} when is_number(V) ->
  -            [{test_time, TestTime}, {K, V}];
  -          AnsList when is_list(AnsList) ->
  -            lists:foldl(fun(AnsPart, Acc) ->
  -              case AnsPart of
  -                {K2, V2} when is_number(V2) ->
  -                  [{K2, V2} | Acc];
  -                _ ->
  -                  Acc
  -              end
  -            end, [{test_time, TestTime}], AnsList);
  -          _ ->
  -            [{test_time, TestTime}]
  -        end;
  -      E ->
  -        E
  -    end
  -  catch
  -    E1:E2 ->
  -      {error, {E1, E2, erlang:get_stacktrace()}}
  -  end.
  +    try
  +        BeforeProcessing = os:timestamp(),
  +        Ans = annotation:call_advised(M, F, Inputs),
  +        AfterProcessing = os:timestamp(),
  +        case check_links() of
  +            ok ->
  +                TestTime = timer:now_diff(AfterProcessing, BeforeProcessing),
  +                case Ans of
  +                    {K, V} when is_number(V) ->
  +                        [{test_time, TestTime}, {K, V}];
  +                    AnsList when is_list(AnsList) ->
  +                        lists:foldl(fun(AnsPart, Acc) ->
  +                            case AnsPart of
  +                                {K2, V2} when is_number(V2) ->
  +                                    [{K2, V2} | Acc];
  +                                _ ->
  +                                    Acc
  +                            end
  +                        end, [{test_time, TestTime}], AnsList);
  +                    _ ->
  +                        [{test_time, TestTime}]
  +                end;
  +            E ->
  +                E
  +        end
  +    catch
  +        _:E2 ->
  +            {error, {E2, list_to_binary(io_lib:fwrite("~p", [erlang:get_stacktrace()]))}}
  +    end.
   
   %%--------------------------------------------------------------------
   %% @doc
  
positive.code: %%--------------------------------------------------------------------
  -spec check_links() -> ok | {error, term()}.
  check_links() ->
    receive
      {'EXIT', _, normal} ->
        check_links();
      {'EXIT',_,_} ->
        {error, linked_proc_error}
    after 0 ->
      ok
    end.
  
  %%--------------------------------------------------------------------
  %% @doc
  
negative.code: %% Executes multiple test configurations.
  %% @end
  %%--------------------------------------------------------------------
  -spec exec_perf_config(M :: atom(), F :: atom(), Inputs :: list(),
      Ext :: list() | tuple(), Repeats :: integer()) -> ok.
  exec_perf_config(M, F, Inputs, {Name, ExtList}, Repeats) ->
      exec_perf_config(M, F, Inputs, ExtList, Name, Repeats);
  exec_perf_config(M, F, Inputs, Ext, Repeats) ->
      exec_perf_config(M, F, Inputs, Ext, [], Repeats).
  
  %%--------------------------------------------------------------------
  %% @doc
  %% Executes multiple test configurations.
  %% @end
  %%--------------------------------------------------------------------
  -spec exec_perf_config(M :: atom(), F :: atom(), Inputs :: list(), Ext :: list(),
      ConfigName :: term(), Repeats :: integer()) -> ok.
  exec_perf_config(M, F, Inputs, Ext, ConfigName, Repeats) ->
      [I1] = Inputs,  % get first arg (test config)
      [Values, OkNum, Errors] = exec_multiple_tests(M, F, [I1 ++ Ext], Repeats),
      Json = case file:read_file("perf_results") of
                 {ok, FileBinary} ->
                     json_parser:parse_json_binary_to_atom_proplist(FileBinary);
                 _ ->
                     []
             end,
      {ok, File} = file:open("perf_results", [write]),
  
  
      MJson = proplists:get_value(M, Json, []),
      Json2 = proplists:delete(M, Json),
  
      FJson = proplists:get_value(F, MJson, []),
      MJson2 = proplists:delete(F, MJson),
  
      ConfKey = case ConfigName of
                    N when is_atom(N) -> N;
                    _ ->
                        list_to_atom("config" ++ integer_to_list(length(FJson) + 1))
                end,
  
      Json3 = [
          {M, [
              {F, [
                  {ConfKey,
                      [
                          {config_extension, Ext},
                          {repeats, Repeats},
                          {ok_counter, OkNum},
                          {results, {struct, Values}},
                          {errors, Errors}
                      ]
                  }
                  | FJson]}
              | MJson2]}
          | Json2],
  
      try
          file:write(File, [iolist_to_binary(mochijson2:encode(prepare_to_write(Json3)))])
      catch
          _:Err ->
              ct:print("~p ~n~p", [Err, erlang:get_stacktrace()])
      end,
      file:close(File),
      ok.
  
  %%--------------------------------------------------------------------
  %% @doc
  %% Executes test configuration many times. Returns [Values, OkNum, Errors].
  %% @end
  %%--------------------------------------------------------------------
  -spec exec_multiple_tests(M :: atom(), F :: atom(), Inputs :: list(),
      Count :: integer()) -> list().
  exec_multiple_tests(M, F, Inputs, Count) ->
      exec_multiple_tests(M, F, Inputs, Count, [], 0, []).
  
  exec_multiple_tests(_M, _F, _Inputs, 0, Values, OkNum, Errors) ->
      [Values, OkNum, Errors];
  
  exec_multiple_tests(M, F, Inputs, Count, Values, OkNum, Errors) ->
      case exec_test(M, F, Inputs) of
          {error, E} ->
              exec_multiple_tests(M, F, Inputs, Count - 1, Values, OkNum, [E | Errors]);
          V ->
              case Values of
                  [] ->
                      exec_multiple_tests(M, F, Inputs, Count - 1, V, OkNum + 1, Errors);
                  _ ->
                      NewV = lists:zipwith(fun({K, V1}, {K, V2}) ->
                          {K, V1 + V2}
                      end, V, Values),
                      exec_multiple_tests(M, F, Inputs, Count - 1, NewV, OkNum + 1, Errors)
              end
      end.
  
  %%--------------------------------------------------------------------
  %% @doc
  