anchor.diff:          {'depth_bound', concuerror_options:bound()} |
           'fatal'.
   
  +-type scope() :: 'all' | [pid()].
  +
   %% DO NOT ADD A DEFAULT VALUE IF IT WILL ALWAYS BE OVERWRITTEN.
   %% Default values for fields should be specified in ONLY ONE PLACE.
   %% For e.g., user options this is normally in the _options module.
  
positive.code:        dpor = ?opt(dpor, Options),
         entry_point = EntryPoint,
         first_process = FirstProcess,
         ignore_error = ?opt(ignore_error, Options),
         interleaving_bound = ?opt(interleaving_bound, Options),
         interleaving_errors = [],
         interleaving_id = 1,
  
negative.code:      interleaving_errors = UnfilteredErrors,
       logger = Logger
      } = State,
    TaggedErrors = [{true, E} || E <- UnfilteredErrors],
    IgnoredErrors = update_all_tags(TaggedErrors, Ignored, false),
    FinalErrors = [E || {true, E} <- IgnoredErrors],
    case FinalErrors =/= UnfilteredErrors of
      true ->
        UniqueMsg = "Some errors were ignored ('--ignore_error').~n",
        ?unique(Logger, ?lwarning, UniqueMsg, []);
      false -> ok
    end,
    FinalErrors.
  
  update_all_tags([], _, _) -> [];
  update_all_tags(TaggedErrors, [], _) -> TaggedErrors;
  update_all_tags(TaggedErrors, Rules, Value) ->
    [update_tag(E, Rules, Value) || E <- TaggedErrors].
  
  update_tag({OldTag, Error}, Rules, NewTag) ->
    RuleAppliesPred = fun(Rule) -> rule_applies(Rule, Error) end,
    case lists:any(RuleAppliesPred, Rules) of
      true -> {NewTag, Error};
      false -> {OldTag, Error}
    end.
  
  rule_applies({Tag, Scope}, {Tag, _} = Error) ->
    scope_applies(Scope, Error);
  rule_applies(_, _) -> false.
  
  scope_applies(all, _) -> true;
  scope_applies(Pids, ErrorInfo) ->
    case ErrorInfo of
      {deadlock, Deadlocked} ->
        DPids = [element(1, D) || D <- Deadlocked],
        DPids -- Pids =/= DPids;
      {abnormal_exit, {_, Pid, _, _}} -> lists:member(Pid, Pids);
      {abnormal_halt, {_, Pid, _}} -> lists:member(Pid, Pids);
      _ -> false
    end.
  
  discard_last_trace_state(State) ->
  