Optimizing Iterative Data-flow Scientific Applications using Directed Cyclic Graphs