anchor.diff:  %% the progress in per cent,
   %% the number of interleaving contained in this preemption number,
   %% the number of errors we have found so far.
  --type state() :: {non_neg_integer(), non_neg_integer(),
  -                  non_neg_integer(), non_neg_integer()}
  -                 | 'no_progress'.
  +-type progress() :: {non_neg_integer(), non_neg_integer(),
  +                     non_neg_integer(), non_neg_integer()}.
  +
  +-type state() :: {progress() | 'noprogress',
  +                  'log' | 'nolog'}.
   
   %% Command line options
   -type options() ::
  
positive.code:     log:stop(),
      true.
  
  showAux({error, analysis, {_Target, _RunCount}, Tickets}, Indexes, Details) ->
      TickLen = length(Tickets),
      NewIndexes = uIndex(Indexes, TickLen),
      KeyTickets = lists:zip(lists:seq(1, TickLen), Tickets),
      NewTickets = selectKeys(NewIndexes, KeyTickets, []),
      lists:foreach(fun(T) -> showDetails(Details, T) end, NewTickets);
  showAux({error, instr, {_Target, _RunCount}}, _Indexes, _Details) ->
      log:log("Instrumentation error.");
  showAux({ok, _RunCount}, _Indexes, _Details) ->
      log:log("No errors found.\n").
  
  %% Take the indexes from command line and create a sorted list
  uIndex(all, TickLen) ->
  
negative.code: %% Show details about each ticket
  showDetails(false, {I, Ticket}) ->
      Error = ticket:get_error(Ticket),
      io:format("~p\t~s: ~s\n", [I, error:type(Error), error:short(Error)]);
  showDetails(true, {I, Ticket}) ->
      Error = ticket:get_error(Ticket),
      io:format("~p\n~s\n", [I, error:long(Error)]),
      %% Disable log event handler while replaying.
      Details = sched:replay(Ticket),
      lists:foreach(fun(Detail) ->
                  D = proc_action:to_string(Detail),
                  io:format("  ~s\n", [D]) end,
          Details),
      io:format("\n\n").
  
  
  
  