anchor.diff:                      client(Runner, Id, AdsWithContracts, AdList0)
               end
       end.
  +
  +%% @doc Terminate any running clients gracefully issuing final
  +%%      synchronization.
  +terminate(ClientList) ->
  +    TerminateFun = fun(Pid) -> Pid ! terminate end,
  +    lists:map(TerminateFun, ClientList).
  +
   
   %% @doc Simulate clients viewing advertisements.
   simulate(_Runner, ClientList) ->
  
positive.code:     %% Wait until we receive num events.
      wait_for_events(1, ?NUM_EVENTS),
  
      %% Finish and summarize.
      summarize(AdList),
  
  
negative.code: %% @doc Client process; standard recurisve looping server.
  client(Runner, Id, AdsWithContracts, PreviousValue) ->
      receive
          terminate ->
              ok;
          view_ad ->
              %% Get current ad list.
              {ok, {_, _, _, AdList0}} = lasp:read(AdsWithContracts, PreviousValue),
  