anchor.diff:    ok.
   -endif.
   
  -failed_list(#constraint_list{id = Id}, #v2_state{constr_data = D}=V2State) ->
  +failed_list(#constraint_list{id = Id}, #v2_state{constr_data = D0}=V2State) ->
     ?debug("error list ~w~n", [Id]),
  -  V2State#v2_state{constr_data = maps:put(Id, failed, D)}.
  +  D = D0#{ Id => failed },
  +  V2State#v2_state{constr_data = D}.
   
   is_failed_list(#constraint_list{id = Id}, #v2_state{constr_data = D}) ->
  -  maps:find(Id, D) =:= {ok, failed}.
  +  case D of
  +    #{ Id := failed } -> true;
  +    #{} -> false
  +  end.
   
   solve_one_c(#constraint{lhs = Lhs, rhs = Rhs, op = Op}, Map) ->
     LhsType = lookup_type(Lhs, Map),
  
positive.code:              not is_failed_list(C, V2State)] ++ Uneval0,
    v2_solve_disj(Is, Cs, I+1, Map, V2State, UL, MapL, Eval, Uneval, Failed).
  
  save_local_map(#v2_state{constr_data = ConData}=V2State, Id, U, Map) ->
    Part0 = [{V,maps:get(V, Map)} || V <- U],
    Part1 =
      case maps:find(Id, ConData) of
        error -> []; % cannot happen
        {ok, {Part2,[]}} -> Part2
      end,
    ?debug("save local map Id=~w:\n", [Id]),
    Part = lists:ukeymerge(1, lists:keysort(1, Part0), Part1),
    ?pp_map("New Part", maps:from_list(Part0)),
    ?pp_map("Old Part", maps:from_list(Part1)),
    ?pp_map(" => Part", maps:from_list(Part)),
    V2State#v2_state{constr_data = maps:put(Id, {Part,[]}, ConData)}.
  
  restore_local_map(#v2_state{constr_data = ConData}, Id, Map0) ->
    case maps:find(Id, ConData) of
      error -> Map0;
      {ok, failed} -> Map0;
      {ok, {[],_}} -> Map0;
      {ok, {Part0,U}} ->
        Part = [KV || {K,_V} = KV <- Part0, not lists:member(K, U)],
        ?debug("restore local map Id=~w U=~w\n", [Id, U]),
        ?pp_map("Part", maps:from_list(Part)),
        ?pp_map("Map0", Map0),
        Map = lists:foldl(fun({K,V}, D) -> maps:put(K, V, D) end, Map0, Part),
        ?pp_map("Map", Map),
        Map
    end.
  
  v2_solve_conjunct(Conj, Map, V2State0) ->
  
negative.code:   lists:umerge(Is, F).
  
  get_mask(V, Masks) ->
    case Masks of
      #{ V := M } -> M;
      #{} -> []
    end.
  
  get_flags(#v2_state{constr_data = ConData0}=V2State0, C) ->
    #constraint_list{id = Id, list = Cs, masks = Masks} = C,
    case ConData0 of
      #{ Id := {Part, U} } ->
        true = U =/= [],                          %Assertion.
        ?debug("get_flags Id=~w U=~w\n", [Id, U]),
        ConData = ConData0#{ Id => {Part, []}},
        V2State = V2State0#v2_state{constr_data = ConData},
        save_updated_vars_list(Cs, vars_per_child(U, Masks), V2State);
      #{ Id := failed } ->
        {V2State0, failed_list};
      #{} ->
        ?debug("get_flags Id=~w Flags=all ~w\n", [Id, length(Cs)]),
        ConData = ConData0#{ Id => {#{}, []}},
        V2State = V2State0#v2_state{constr_data = ConData},
        {V2State, [every_i]}
    end.
  
  vars_per_child(U, Masks) ->
  