Patent ID: 8387000

Claim:
A method, comprising: providing a control flow graph that includes at least one condition, providing the control flow graph being performed by a computing device; creating a mode stack for storing one or more values corresponding to a result of evaluating the at least one condition, creating the mode stack being performed by the computing device; creating a mode transition stack, different than the mode stack, for storing one or more values corresponding to a likelihood of an occurrence of one or more mode transitions associated with the control flow graph, creating the mode transition stack being performed by the computing device; generating an update function based on the provided control flow graph, generating the update function being performed by the computing device; executing the update function to evaluate the at least one condition, executing the update function being performed by the computing device; storing a value, corresponding to the evaluated at least one condition, in the mode stack, storing the value in the mode stack being performed by the computing device; generating a mode transition function, generating the mode transition function being performed by the computing device, executing the mode transition function to identify a likelihood of an occurrence of a mode transition relating to the at least one condition, executing the mode transition function being performed by the computing device; storing a value, corresponding to the mode transition, in the mode transition stack, storing the value, corresponding to the mode transition, being performed by the computing device; and re-executing the update function based on the stored value corresponding to the mode transition, re-executing the update function being performed by the computing device.