anchor.diff:  
   extend_workset(F, #s{ws = W} = S) ->
       S#s{ws = ordsets:add_element(F, W)}.
  -
  -update_tab(Function, Purity, DepList, #s{tab = T} = S) ->
  -    S#s{tab = dict:store(Function, {Purity, DepList}, T)}.
   
   lookup(Function, Table) ->
       dict:fetch(Function, Table).
  
positive.code: contaminate(#s{ws = []} = S) ->
      S;
  contaminate(#s{ws = W} = S) ->
      contaminate(lists:foldl(fun contaminate/2, S#s{ws = []}, W)).
  
  contaminate(E, #s{tab = T} = S) ->
      Dependent = [F || F <- reverse_deplist(E, S), not visited(F, S)],
  
negative.code: contaminate(_, [], S) ->
      S;
  contaminate({_, s}, Fs, #s{tab = T, ws = W} = S) ->
      S#s{tab = dict_store(Fs, {s, []}, T), ws = [Fs|W]};
  contaminate({E, Pe} = EP, [F|Fs], #s{tab = T, ws = W} = S0) ->
      {Pf, Df} = lookup(F, T),
      S1 =
        case { sup(Pe, Pf), remove_dep(E, Df) } of
          {_, []} = P ->
              %% Fully-resolved function, add to workset.
              S0#s{tab = dict:store(F, P, T), ws = [F|W]};
          P ->
              S0#s{tab = dict:store(F, P, T)}
        end,
      contaminate(EP, Fs, S1).
  
  