This is a simple directed acyclic graph, which means that evaluating the nodes shouldn't be terribly complicated. The algorithms mentioned in the "Topological sorting and recognition" section of the Wikipedia article allow you to break the graph evaluation into a linear sequence of steps. Also see this answerthis answer.