Patent ID: 7437719

Claim:
A method, comprising: modifying source code, including multiple instructions, by performing a Lexical Functional Grammar Analysis (LFGA) operation on one or more instructions as a function of a Digital Signal Processor (DSP) architecture wherein modifying the source code by performing Lexical Functional Grammar Analysis operation further comprises: analyzing the modified source code for syntax and semantic; and further modifying the source code based on the outcome of the analysis; and generating assembly code using the modified source code wherein selecting and comparing one or more instructions in the intermediate code using the Genetic algorithm comprises: selecting an instruction in the intermediate code to generate the efficient code; computing a current number of clock cycles required to execute the selected instruction; computing reduction in number of clock cycles by using the current and previous computed number of clock cycles; comparing the reduction in the number of clock cycles with a predetermined reduction in number of clock cycles; if the reduction in the number of clock cycles is greater than the predetermined reduction in the number of clock cycles, then selecting a relevant instruction based on specific Digital Signal Processor architecture and applying cross over for the selected instruction and repeating the computing number of clock cycles, the computing reduction in number of clock cycles, and the comparing operations until the reduction in the number of clock cycles is less than or equal to the predetermined reduction in the number of clock cycles; if the reduction in the number of clock cycles is less than the predetermined reduction in the number of clock cycles, then selecting the instruction for the efficient code and repeating the above operations for a next instruction in the intermediate code; and changing structure of the modified source code through a series of iterations using Finite State Morphology (FSM) to generate efficient source code wherein modifying the structure of the modified source code using Finite State Morphology comprises: generating intermediate code by rearranging concurrent distributed instructions based on Digital Signal Processor resources using Petri Nets algorithm; and generating the efficient code by selecting and comparing one or more instructions in the intermediate code to one or more other similar available instructions using Genetic algorithm.