Patent ID: 7337437
Filing Date: 2008-02-26
Classification: G06F

Abstract:
1. A method for performing compiler optimisation of source code during compilation of the source code in a computer environment by determining and utilizing the equivalence of two syntactically correct algebraic expressions comprised by the source code, said method comprising compiling the source code into object code, said compiling comprising determining the equivalence of the two algebraic expressions followed by eliminating a redundant algebraic expression of the two algebraic expressions determined to be equivalent, said determining the equivalence of the two algebraic expressions comprising the steps of: (a) recasting said expressions into a form of one or more token pairs arranged sequentially in a string, each said token pair comprising an operator followed by an operand; (b) reducing said strings in accordance with a set of predetermined simplifing rules; (c) comparing the reduced strings by matching, to detect equivalence of the two algebraic expressions; wherein said determining the equivalence of the two algebraic expressions comprises prior to the recasting step (a) in relation to said algebraic expressions, at least one of the following preconditioning sub-steps: wherein said reducing said strings in accordance with the set of predetermined simplifying rules in step (b) comprises: