AliEnv: automatic migration from triads to tuples