anchor.diff:      end.
   
   %%
  +%% Define an upper limit for functions that return sizes of data
  +%% structures. The chosen value is about half the maxium size of a
  +%% smallnum. That means that adding a small constant to it will result
  +%% in a smallnum, but still the value is still sufficiently high to
  +%% make it impossible to reach in the foreseeable future.
  +%%
  +-define(SIZE_UPPER_LIMIT, ((1 bsl 58) - 1)).
  +
  +%%
   %% Returns the inferred return and argument types for known functions, and
   %% whether it's safe to subtract argument types on failure.
   %%
  
positive.code: %% Bitwise ops
  types(erlang, 'band', [_,_]=Args) ->
      sub_unsafe(erlang_band_type(Args), [#t_integer{}, #t_integer{}]);
  types(erlang, 'bor', [_,_]) ->
      sub_unsafe(#t_integer{}, [#t_integer{}, #t_integer{}]);
  types(erlang, 'bxor', [_,_]) ->
      sub_unsafe(#t_integer{}, [#t_integer{}, #t_integer{}]);
  types(erlang, 'bsl', [_,_]) ->
      sub_unsafe(#t_integer{}, [#t_integer{}, #t_integer{}]);
  types(erlang, 'bsr', [_,_]) ->
      sub_unsafe(#t_integer{}, [#t_integer{}, #t_integer{}]);
  types(erlang, 'bnot', [_]) ->
      sub_unsafe(#t_integer{}, [#t_integer{}]);
  
  
negative.code: %% Note that these are all from the erlang module; suitable functions in other
  %% modules could fail due to the module not being loaded.
  types(erlang, 'map_size', [_]) ->
      sub_safe(#t_integer{elements={0,?SIZE_UPPER_LIMIT}}, [#t_map{}]);
  types(erlang, 'tuple_size', [Src]) ->
      Min = case Src of
                #t_tuple{size=Sz} -> Sz;
                _ -> 0
            end,
      Max = (1 bsl 24) - 1,                       %Documented max size of a tuple.
      sub_safe(#t_integer{elements={Min,Max}}, [#t_tuple{}]);
  types(erlang, 'bit_size', [_]) ->
      sub_safe(#t_integer{elements={0,?SIZE_UPPER_LIMIT}}, [#t_bitstring{}]);
  types(erlang, 'byte_size', [_]) ->
      sub_safe(#t_integer{elements={0,?SIZE_UPPER_LIMIT}}, [#t_bitstring{}]);
  types(erlang, hd, [Src]) ->
      RetType = erlang_hd_type(Src),
      sub_safe(RetType, [#t_cons{}]);
  