1. A computer implemented method of determining finite state machines, comprising: accessing, via a computer system, a dataflow graph that represents an expression, wherein each variable and operator in the expression is represented by a node in the dataflow graph; performing a cost analysis of computing sub-expressions of the expression corresponding to subsets of the dataflow graph; determining probabilities that ones of the sub-expressions evaluates as true based on input values to respective ones of the sub-expressions; splitting the dataflow graph into a plurality of dataflow graphs based on the respective cost for each of the sub-expressions and the probabilities that ones of the sub-expressions evaluates as true; and determining a plurality of finite state machines corresponding to said plurality of dataflow graphs.