Let P be an aspect-oriented program and G = (V, A) be the DADG of P.
Construction of DADG: To Construct the DADG of the aspect-oriented program P with respect to the trace file, do the following:
a) For each statement s in the trace file, create a vertex in the DADG.
Computation of dynamic slice: To compute the dynamic slice over the DADG, do the following:
a) Perform the breadth-first or depth-first graph traversal over the DADG taking any vertex corresponding to the statement of interest as the starting point of traversal.
b) Map the resulting slice obtained in Step 3(a) over the DADG to the source code P using f since the slice may contain multiple occurrences of the same vertex.
Figure 6 shows the DADG of the example program given in Figure 2 with respect to the trace file given in Figure 5.
Starting from the vertex 11, we can perform either the breadth-first search algorithm or depth-first search algorithm on the DADG.
In the following, we discuss the space and time complexity of our DADG algorithm.
Thus, it can be stated that there are S number of vertices in the DADG corresponding to all executed statements of program P.
time required to construct the DADG with respect to the execution trace file which is O(S).
time required to traverse the DADG and to reach at the specified vertex which is O([S.