anchor.diff:              dim s <- 3
           end"),
     ?assertEqual(
  -     {where, plus({'#',{dim,"t"}},
  -                  {'#',{dim,"s"}}),
  +     {where, tprimop:plus({'#',{dim,"t"}},
  +                          {'#',{dim,"s"}}),
         [{dim,"t",2},
          {dim,"s",3}]},
        Tree).
  
positive.code:      {where, {'@', "Y1", {t, [{XD,0}]}},
         [
          {var, "Y1",
           {'if', lte({'#', TimeD}, 0),
            "X1",
            {'@', plus(
                    plus({'@', "Y1",
                          {t, [{XD,      times({'#', XD}, 2)    },
                               {YD,      times({'#', YD}, 2)    }]}},
                         {'@', "Y1",
                          {t, [{XD, plus(times({'#', XD}, 2), 1)},
                               {YD,      times({'#', YD}, 2)    }]}}),
                    plus({'@', "Y1",
                          {t, [{XD,      times({'#', XD}, 2)    },
                               {YD, plus(times({'#', YD}, 2), 1)}]}},
                         {'@', "Y1",
                          {t, [{XD, plus(times({'#', XD}, 2), 1)},
                               {YD, plus(times({'#', YD}, 2), 1)}]}})
                   ),
             {t, [{TimeD, minus({'#', TimeD}, 1)}]}}}},
          {var, "X1",
           {'if', tand(
                    tand(gte({'#', XD},    1),
                         lte({'#', YD}, 1024)),
                    tand(gte({'#', YD},    1),
                         lte({'#', YD}, 1024))),
            {'#', XD},
            1}},
          {dim, "t", 2},
  
negative.code:         end"),
    ?assertEqual(
       {where, "X",
        [{var, "X", tprimop:plus({'#',{dim,"t"}},
                                 {'#',{dim,"s"}})},
         {dim, "t", 2},
         {dim, "s", 3} ]},
       Tree).
  