anchor.diff:     end}.
   
   
  -%% Example Trace (raw event info, from the ?LOG macro)
  +%% Example Trace0 (raw event info, from the ?LOG macro)
   %%
   %% [{32014,{call,<0.467.0>,{append,<<"O">>}}},
   %%  {32421,{call,<0.466.0>,{append,<<134>>}}},
  
positive.code:     %%  {44522,47651,[{call,<0.466.0>,{append,<<134>>,will_be,2}}]},
      %%  {47651,infinity,[]}]
  
      %% Remember: Appends contains only successful append ops!
      Appends = eqc_temporal:stateful(
                 fun({call, Pid, {append, Pg, will_be, LPN}}) ->
                         {status, LPN, Pid, Pg}
                 end,
                 fun({status, LPN, Pid, Pg}, {result, Pid, {ok, LPN}})->
                         [{status, LPN, x, Pg}]
                 end,
                 Events),
      if length(Appends) < 10 -> io:format("Trace ~p\n", [Trace]), io:format("Events ~p\n", [Events]), io:format("Appends ~p\n", [Appends]); true -> ok end,
      %% The last item in the relation tells us what the last/infinite future
      %% state of each LPN is.  We'll use it to identify all successfully
      %% written LPNs and other stuff.
      {_, infinity, FinalStatus} = lists:last(eqc_temporal:all_future(Appends)),
  
  
      InitialVals = eqc_temporal:elems(eqc_temporal:ret([{status, LPN, x, error_unwritten} || {status, LPN, _, _} <- FinalStatus])),
      Vals = eqc_temporal:union(InitialVals, Appends),
  
      Values = eqc_temporal:stateful(
                 fun({status, _LPN, Pid, _Pg} = I) when is_pid(Pid) -> I end,
                 fun({status, LPN, Pid, Pg}, {status, LPN, x, Pg})
                       when is_pid(Pid) -> [] end,
                 Vals),
      if length(Appends) < 10 -> io:format(user, "Values ~P\n", [Values, 100]); true -> ok end,
  
      %% Desired properties
      AllCallsFinish = eqc_temporal:is_false(eqc_temporal:all_future(Calls)),
      NoAppendLPNDups = true, %%% QQQ TODO!!!!!!!! lists:sort(AppendLPNs) == lists:usort(AppendLPNs),
  
      ?WHENFAIL(begin
      ?QC_FMT("*AppendLPNs: ~p\n", [todoTODO]) %%%%% [range_ify(AppendLPNs)])
      end,
      conjunction(
        [
         {all_calls_finish, AllCallsFinish},
         {no_append_duplicates, NoAppendLPNDups},
         %% If you want to see PULSE causing crazy scheduling, then
         %% change one of the "true orelse" -> "false orelse" below.
         %% {bogus_no_gaps,
  
negative.code:         event_logger:event({result, self(), LOG__Result}),
          LOG__Result).
  
  -ifndef(TEST_TRIP_no_append_duplicates).
  
  append(#run{seq=Seq,proj=Proj}, Page) ->
      ?LOG({append, Page},
           corfurl:append_page(Seq, Proj, Page)).
  -else. % TEST_TRIP_no_append_duplicates
  
  %% If the appended LPN > 3, just lie and say that it was 3.
  
  append(#run{seq=Seq,proj=Proj}, Page) ->
      ?LOG({append, Page},
           begin
               case corfurl:append_page(Seq, Proj, Page) of
                   {ok, LPN} when LPN > 3 ->
                       {ok, 3};
                   Else ->
                       Else
               end
           end).
  -endif. % TEST_TRIP_no_append_duplicates
  
  -endif. % PULSE
  -endif. % TEST
  