This method can be extended in a straightforward manner to programs with natural loops. The algorithm presented above can be applied to every loop individually, starting with the innermost. A loop can then be considered as a single node with known earliest and latest start offsets when analyzing the outer loop of the whole program. Similarly, tasks containing function calls can be analyzed provided that their call graph is acyclic by first analyzing the leaves in the call graph.