anchor.diff:  %% Dimensional Query
   %%------------------------------------------------------------------------------
   transform1({'#', E0}, P, HD, HV) ->
  +  %% Changing the position in the evaluation tree is not needed as:
  +  %% * There is only one subexpression
  +  %% * No hidden dimensions are created in the current expression
     {'#', transform1(E0, P, HD, HV)};
   
   %%------------------------------------------------------------------------------
   %% Base Abstraction
   %%------------------------------------------------------------------------------
   transform1({b_abs, Is, Params, E}, P, HD, HV) ->
  +  Ps = lists:map(fun(N) -> subexpr_pos(N,P) end, %% Pos 1,2,...
  +                 lists:seq(1, length(Is))),
     ParamsAsDims = lists:map(fun(Param) -> {phi, Param} end, Params),
  -  {b_abs, transform1_frozen_dims(Is, P, HD, HV),
  +  {b_abs, transform1_frozen_dims(Is, Ps, HD, HV),
      ParamsAsDims,
      transform1(E, subexpr_pos(0,P), HD, tset:union(HV, ParamsAsDims))};
   
   transform1({b_apply, E0, Eis}, P, HD, HV) ->
  +  Ps = lists:map(fun(N) -> subexpr_pos(N,P) end, %% Pos 1,2,...
  +                 lists:seq(1, length(Eis))),
     {b_apply, transform1(E0, subexpr_pos(0,P), HD, HV),
  -   transform1_actual_params(Eis, P, HD, HV)};
  +   transform1_actual_params(Eis, Ps, HD, HV)};
   
   %%------------------------------------------------------------------------------
   %% Value Abstraction
   %%------------------------------------------------------------------------------
   transform1({v_abs, Is, Params, E}, P, HD, HV) ->
  +  Ps = lists:map(fun(N) -> subexpr_pos(N,P) end, %% Pos 1,2,...
  +                 lists:seq(1, length(Is))),
     ParamsAsDims = lists:map(fun(Param) -> {phi, Param} end, Params),
  -  {v_abs, transform1_frozen_dims(Is, P, HD, HV),
  +  {v_abs, transform1_frozen_dims(Is, Ps, HD, HV),
      ParamsAsDims,
  +   %% XXX Pos 0?
      transform1(E, subexpr_pos(0,P), HD, tset:union(HV, ParamsAsDims))};
   
   transform1({v_apply, E0, Eis}, P, HD, HV) ->
  +  Ps = lists:map(fun(N) -> subexpr_pos(N,P) end, %% Pos 1,2,...
  +                 lists:seq(1, length(Eis))),
     {v_apply, transform1(E0, subexpr_pos(0,P), HD, HV),
  -   transform1_actual_params(Eis, P, HD, HV)};
  +   %% XXX Shouldn't another context application be here somewhere?
  +   transform1_actual_params(Eis, Ps, HD, HV)};
   
   %%------------------------------------------------------------------------------
   %% Intension Abstraction
   %%------------------------------------------------------------------------------
   transform1({i_abs, Is, E}, P, HD, HV) ->
  -  {i_abs, transform1_frozen_dims(Is, P, HD, HV),
  +  Ps = lists:map(fun(N) -> subexpr_pos(N,P) end, %% Pos 1,2,...
  +                 lists:seq(1, length(Is))),
  +  {i_abs, transform1_frozen_dims(Is, Ps, HD, HV),
  +   %% XXX Pos 0?
      transform1(E, subexpr_pos(0,P), HD, HV)};
   
   transform1({i_apply, E}, P, HD, HV) ->
  -  {i_apply, transform1(E, subexpr_pos(0,P), HD, HV)}; %% XXX Need for subexpression???
  +  %% XXX Is subexpression with position really needed? And BTW -
  +  %% shouldn't another context application be here somewhere?
  +  {i_apply, transform1(E, subexpr_pos(0,P), HD, HV)};
   
   %%------------------------------------------------------------------------------
   %% Wherevar
  
positive.code:   NewXiEis =
      [{Xi, transform1(Ei, subexpr_pos(N,P), HD, HV)} %% Pos 1,2,...
       || {{Xi, Ei}, N} <- lists:zip(XiEis, Ns)],
    {wherevar, transform1(E0, subexpr_pos(0,P), HD, HV),
     NewXiEis};
  
  
negative.code: %%-------------------------------------------------------------------------------------
  %% Internal - Helpers for transforming abstractions and applications
  %%-------------------------------------------------------------------------------------
  transform1_frozen_dims(Is, Ps, HD, HV) ->
    tset:union(
      tset:union(HD, HV),
      [transform1(I, P, HD, HV) || {I, P} <- lists:zip(Is, Ps)]).
  
  transform1_actual_params(Eis, Ps, HD, HV) ->
    lists:map(fun({Ei, P}) -> transform1(Ei, P, HD, HV) end, lists:zip(Eis, Ps)).
  
  
  %%-------------------------------------------------------------------------------------
  