**Require:** An execution trace . |

**Ensure:** The execution trace in SSA form and a function that maps each variable |

to its maximum index value used in the SSA form. |

(1) Let *index* be a function mapping variables to integers. The initial integer value |

for each variable is 0. |

(2) Let be the empty sequence. |

(3) **for** to **do** |

(4) **If** is an assignment statement of the form **then** |

(5) Let be where all variables are replaced with . |

(6) Let be . |

(7) Add to the end of the sequence . |

(8) **else** |

(9) Let be the statement where all variables are replaced with |

. |

(10) Add to the end of the sequence . |

(11) **end if** |

(12) **end for** |

(13) Return . |