Patent ID: 7788635

Claim:
A method for processing, in a computer system, a computer program having a plurality of operations, said method comprising: generating a directed graph representing said plurality of operations and having precedence relations associated therewith by a processor of said computer system; and calling a dynamic programming routine to generate a schedule for executing a subgroup of said plurality of operations to place said computer system in a final machine state (finMS), in accordance with said precedence relations, by modeling operations of a computational processor associated with said computer system to minimize a computational cost of placing said computer system in said finMS, wherein each of the plurality of operations include an associated computational cost, and the modeling operations of the computational processor include identifying pre-condition machine states (preCMS) and post condition machine states (postCMS) of said computer system associated with each of the plurality of operations of said subgroup, and wherein when the computer system does not possess one or more resource to satisfy the associated computational cost for any one of the plurality of operations of said subgroup, executing a partition to free the one or more resource of the computer system so as to continue executing the subgroup of the plurality of operations that would place said computer system in said finMS to minimize the computational cost.