This paper explores the concept of dynamic program slicing, which focuses on identifying statements that actually affect the value of a variable for a specific program input, as opposed to static slicing, which considers all possible statements that could affect the variable. The authors introduce several approaches to compute dynamic slices, including:
1. **Approach 1**: Marking nodes in the Program Dependence Graph based on execution history and using static slicing to find the dynamic slice.
2. **Approach 2**: Marking edges in the Program Dependence Graph during execution and traversing only these marked edges to find the dynamic slice.
3. **Dynamic Dependence Graph**: Creating a separate node for each occurrence of a statement in the execution history, with edges only to statements on which it depends.
4. **Reduced Dynamic Dependence Graph**: Creating a new node only if another node with the same transitive dependencies does not already exist, to reduce the graph's size.
The paper also discusses the limitations of these approaches and their trade-offs in terms of space, time, and accuracy. The authors conclude by highlighting the benefits of dynamic slicing in debugging and testing, emphasizing its ability to focus on statements that actually affect the variable for specific inputs.This paper explores the concept of dynamic program slicing, which focuses on identifying statements that actually affect the value of a variable for a specific program input, as opposed to static slicing, which considers all possible statements that could affect the variable. The authors introduce several approaches to compute dynamic slices, including:
1. **Approach 1**: Marking nodes in the Program Dependence Graph based on execution history and using static slicing to find the dynamic slice.
2. **Approach 2**: Marking edges in the Program Dependence Graph during execution and traversing only these marked edges to find the dynamic slice.
3. **Dynamic Dependence Graph**: Creating a separate node for each occurrence of a statement in the execution history, with edges only to statements on which it depends.
4. **Reduced Dynamic Dependence Graph**: Creating a new node only if another node with the same transitive dependencies does not already exist, to reduce the graph's size.
The paper also discusses the limitations of these approaches and their trade-offs in terms of space, time, and accuracy. The authors conclude by highlighting the benefits of dynamic slicing in debugging and testing, emphasizing its ability to focus on statements that actually affect the variable for specific inputs.