10. A data storage storing computer-executable instructions for controlling a computer to generate reduced expressions for a loop having a plurality of expressions, by a method comprising: identifying candidate expressions from the plurality of loop expressions; generating a cost matrix indicating a cost of generating each candidate expression from each other candidate expression; identifying paths through the cost matrix that do not have cycles, each path having a cost; selecting an identified path based on the cost of the identified paths; generating shortest path expressions based on the selected path; and replacing expressions in the loop with the shortest path expressions.
12. The data storage of claim 10 wherein the cost of generating each candidate expression from each other candidate expression is based on a subtraction of the candidate expressions.