anchor.diff:  %% Record declarations ("q" is short for "query")
   -record(and_q,  {l_sub_q :: q(), r_sub_q :: q()}).
   -record(or_q,   {l_sub_q :: q(), r_sub_q :: q()}).
  --record(not_q,  {sub     :: q()}).
  +-record(not_q,  {sub_q   :: q()}).
   -record(term_q, {keyword :: utf8_str()}).
   
   %% Type definitions
  
positive.code:     lists:usort([keyword(Q)||Q <- Qs]).
  
  keyword(Q = #not_q{}) ->
      Q#not_q.sub#term_q.keyword;
  keyword(Q) ->
      Q#term_q.keyword.
  
  
negative.code:     {#or_q{l_sub_q = L,r_sub_q = R},max(DepthL, DepthR)+1};
  tree_to_query({not_q,SubTree}) ->
      {Sub,Depth} = tree_to_query(SubTree),
      {#not_q{sub_q = Sub},Depth+1};
  tree_to_query({term_q,{string,Keyword,_}}) ->
      {#term_q{keyword = Keyword},0}.
  
  