anchor.diff:  %% Function Transformation
   %%------------------------------------------------------------------------------
   transform0({fn, X, Params, E}) ->
  -  {var, X, transform0_prime(lists:reverse(Params), transform0(E))};
  +  {wherevar, X,
  +   [{X, transform0_prime(lists:reverse(Params), transform0(E))}]};
   
   %%------------------------------------------------------------------------------
   %% Base Abstraction
   %%------------------------------------------------------------------------------
  -transform0({b_abs, Is, Params, E}) ->
  -  {b_abs, Is, Params, transform0(E)};
  +transform0({b_abs, Is, Params, E, P}) ->
  +  {b_abs, Is, Params, transform0(E), P};
   
   transform0({b_apply, E0, E1}) ->
     {b_apply, transform0(E0), transform0(E1)};
  +
  +%%------------------------------------------------------------------------------
  +%% Value Abstraction
  +%%------------------------------------------------------------------------------
  +transform0({v_abs, Is, Params, E}) ->
  +  {v_abs, Is, Params, transform0(E)};
  +
  +transform0({v_apply, E0, E1}) ->
  +  {v_apply, transform0(E0), transform0(E1)};
  +
  +%%------------------------------------------------------------------------------
  +%% Intension Abstraction
  +%%------------------------------------------------------------------------------
  +transform0({i_abs, Is, E}) ->
  +  {i_abs, Is, transform0(E)};
  +
  +transform0({i_apply, E}) ->
  +  {i_apply, transform0(E)};
  +
  +%%------------------------------------------------------------------------------
  +%% Where
  +%%------------------------------------------------------------------------------
  +transform0({where, E0, VDisEis}) ->
  +  %% We should probably signal an error when the body contains other elements..
  +  Vars = [{Xi,transform0(Ei)} || {var,Xi,Ei} <- VDisEis],
  +  Dims = [{Xi,transform0(Ei)} || {dim,Xi,Ei} <- VDisEis],
  +  transform0_where(Vars, Dims, E0);
   
   %%------------------------------------------------------------------------------
   %% Identifiers
  
positive.code:   {'if', transform0(E0), transform0(E1), transform0(E2)};
  
  %%------------------------------------------------------------------------------
  %% Where
  %%------------------------------------------------------------------------------
  transform0({where, E0, VDisEis}) ->
    %% We should probably signal an error when the body contains other elements..
    Vars = [{Xi,transform0(Ei)} || {var,Xi,Ei} <- VDisEis],
    Dims = [{Xi,transform0(Ei)} || {dim,Xi,Ei} <- VDisEis],
    transform0_where(Vars, Dims, E0);
  
  %%------------------------------------------------------------------------------
  %% Dimensional Query
  %%------------------------------------------------------------------------------
  transform0({'#', E0}) ->
  
negative.code: transform0_prime([], E) ->
    E;
  transform0_prime([{b_param, Param}|Ps], E) ->
    transform0_prime(Ps, {b_abs, [], [Param], E, undef});
  transform0_prime([{v_param, Param}|Ps], E) ->
    transform0_prime(Ps, {v_abs, [], [Param], E});
  transform0_prime([{n_param, Param}|Ps], E) ->
    %%------------------------------------------------------------------------------
    %% FIXME -- Here we need to replace Param in E with an intension application
    %%------------------------------------------------------------------------------
    transform0_prime(Ps, {v_abs, [], [Param], E}).
  
  %%------------------------------------------------------------------------------
  %% Transform0 where transforms a where clause into wherevar / wheredims.
  