The DADG is an arc-classified digraph (V, A), where V is the set of vertices that correspond to the statements and predicates of the aspect-oriented programs, and A is the set of arcs between vertices in V representing dynamic dependence relationships that exist between statements.
For example, in the DADG given in Figure 6, there is a data dependency between vertex 6 and 8, because vertex 6 is Def(p) vertex and vertex 8 is Use(p) vertex.
The DADG of the program in Figure 2 corresponding to the execution trace in Figure 5 is given in Figure 6.
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.