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