anchor.diff:      false.
   
   trim_next(S, Res, [_Pid, Offset, Length]) ->
  -    case is_ok(Res) of
  -        true ->
  -            NewWritten = cleanup_chunk(Offset, Length, S#state.written),
  -            Trimmed1 = cleanup_chunk(Offset, Length, S#state.trimmed),
  -            NewTrimmed = lists:sort([{Offset, Length}|Trimmed1]),
  -            S#state{trimmed=NewTrimmed,
  -                    written=NewWritten,
  -                    prev_extra=0};
  -        %% planned_trims=tl(S#state.planned_trims)};
  -        _Other ->
  -            S
  -    end.
  +    S1 = case is_ok(Res) of
  +             true ->
  +                 NewWritten = cleanup_chunk(Offset, Length, S#state.written),
  +                 Trimmed1 = cleanup_chunk(Offset, Length, S#state.trimmed),
  +                 NewTrimmed = lists:sort([{Offset, Length}|Trimmed1]),
  +                 S#state{trimmed=NewTrimmed,
  +                         written=NewWritten};
  +             _Other ->
  +                 S
  +         end,
  +    S1#state{prev_extra=0,
  +             planned_trims=tl(S#state.planned_trims)}.
   
   %% Property
   
  
positive.code: %% trim
  
  trim_pre(S) ->
      S#state.pid /= undefined. %% andalso S#state.planned_trims /= [].
  
  trim_args(S) ->
      %% {Offset, Length} = hd(S#state.planned_trims),
      %% [S#state.pid, Offset, Length].
      [S#state.pid, offset(), len()].     
  
  trim(Pid, Offset, Length) ->
      machi_file_proxy:trim(Pid, Offset, Length, false).
  
negative.code: %% rewrite
  
  rewrite_pre(S) ->
      S#state.pid /= undefined andalso
          (S#state.written ++ S#state.trimmed) /= [] .
  
  rewrite_args(S) ->
      ?LET({Off, Len},
           get_written_interval(S#state.written ++ S#state.trimmed),
           [S#state.pid, Off, data_with_csum(Len)]).
  
  rewrite(Pid, Offset, {Bin, Tag, Csum}) ->
  