They get assigned different unique names, but in use sites those unique names aren’t used. So the Stratego code will use the non-unique names from the TS code, but those are free variables.

  PropAssign(e, p): ty
  where definition of p : PropTy(pk, ty, _)
    and e : ety
    and ( ( ety => ItemTy(ek, _)   and ek == pk
         or <coll-item> ety => ek' and ek' == pk
         or ety => GraphTy() )


create-type-task(|ctx) :
    PropAssign(e, p) -> <task-create-id(|ctx,[eq4])> ty
      x4 := <type-lookup(|ctx)> p;
      pk := <new-task(|ctx)> Rewrite("proj2", x4); task-create-id(|ctx, [x4]);
      ty := <new-task(|ctx)> Rewrite("proj3", x4); task-create-id(|ctx, [pk]);
      ety := <type-task(|ctx); task-create-id(|ctx, [ty])> e;
      ek0 := <new-task(|ctx)> Rewrite("proj4", ety); task-create-id(|ctx, [ety]);
      eq1 := <type-match(|ctx, pk); task-create-id(|ctx, [ek0])> ek; // <-- should be ek0
      ek1 := <type-func-coll-item(|ctx); task-create-id(|ctx, [ety])> ety;
      eq2 := <type-match(|ctx, pk); task-create-id(|ctx, [ek1])> ek; // <-- should be ek1
      or0 := <type-is(|ctx)> <task-create-choice(|ctx)> [eq1, eq2];
      ek := <type-is(|ctx); task-create-id(|ctx, [or0])> <task-create-choice(|ctx)> [ek0, ek1];
Submitted by Jeff Smits on 12 June 2015 at 23:46

Log in to post comments