anchor.diff:  
   % define the commands to test
   command(S) ->
  -    oneof([
  -        symb_call(append, elements(?STREAMNAMES), null),
  -%        symb_call(range_query, elements(?STREAMNAMES), S#state.starttime),
  -        symb_call(all_since, elements(?STREAMNAMES), S#state.starttime)%,
  -%        symb_call(last_entry_at, elements(?STREAMNAMES), S#state.starttime)
  -    ]).
  +    frequency(
  +        [
  +            {9,{call,?DRIVER,append,[elements(?STREAMNAMES),list(integer(65,122))]}},
  +            {1,symb_call(range_query, elements(?STREAMNAMES), S#state.starttime)},
  +            {1,symb_call(all_since, elements(?STREAMNAMES), S#state.starttime)},
  +            {1,symb_call(last_entry_at, elements(?STREAMNAMES), S#state.starttime)}
  +        ]
  +    ).
   
   % define when a command is valid
  -precondition(S,{call,?DRIVER,last_entry_at,[StreamName,TS]}) ->
  +precondition(S,{call,?DRIVER,_Query,[StreamName|_OtherArgs]}) ->
       case lists:keysearch(StreamName,1,S#state.streams) of
           {value, {StreamName,Data}} ->
               case Data of
                   [] ->
  -                    false;
  +                    true;
                   _ ->
  -                    TimeStamps = [X || {X,_} <- Data],
  -                    TS > lists:min(TimeStamps)
  +                    % Make sure CakeDB had time to flush
  +                    timer:sleep(?TIMEOUT),
  +                    true
               end;
           false ->
  -            false
  +            true
       end;
   precondition(_S, _Command) ->
       true.
  
positive.code: 
  % Returns a symbolic call to one of the driver's functions
  symb_call(Function, StreamName, MinTime) ->
      timer:sleep(50), % give time to CakeDB to flush
      case Function of
          append ->
              {call, ?DRIVER, append, [StreamName, list(integer(65,122))]};
          range_query ->
              Start = integer(MinTime, timestamp()),
              End = integer(MinTime, timestamp()),
              {call, ?DRIVER, range_query, [StreamName, Start, End]};
          _ -> % all_since and last_entry_at
              Now = {call, ?MODULE, timestamp, []},
              Diff = {call, ?MODULE, diff, [Now, MinTime]},
              Rand = {call, random, uniform, [Diff]},
              TS = {call, ?MODULE, sum, [MinTime, Rand]},
              {call, ?DRIVER, Function, [StreamName, TS]}
      end.
  
  
negative.code:         postcondition/3, next_state/3, diff/2, sum/2, timestamp/0]).
  
  -define(DRIVER, cakedb_driver).
  -define(TIMEOUT, 1000). % milliseconds
  -define(STREAMNAMES, ["tempfile", "file001", "anotherfile",
          "somefile", "binfile", "cakestream"]).
  
  