Consider string int x[3], y[5]
its parse tree and dependence graph
After topological sorting, the dependency graph for this expression looks like as shown in the above figure. It will help us in knowing the order in which the resources are allocated in this case. This numbering here is the topological order in which the attributes are calculated.
|