Skip to content

Object Slicing #153

@KuYaki

Description

@KuYaki

Motivation:

Object Slice allow to extend Complete Computational Slices to improve their accuracy. Algorithm is described in the paper.

Development:

Object slicing has to be added to a slicing directory as a separated algorithm. It has to have same interface as the other slicing algorithms.

Object Slice Decomposer INPUT:

 1 class A {
 2     String a;
 3
 4     int main() {
 5         a = "";
 6         B b = new B();
 7         a = "Hello, World!";
 8         System.out.println(a);
 9         foo(b);
10         return b;
11     }
10 
11     void foo(B b) {
12         b.f = 0;
13     }
14 }

Object Slice Decomposer OUTPUT:

{
    "a": [5, 7],
    "b": [6, 9],
}

There is a list of necessary steps to implement:

  • 1. References - identify the set of object references existing inside the method
  • 2. Modified Fields - identify the set of fields which are modified through each reference by method invocations
  • 3. Field Seed Statements - identify the set of seed statements that contain the field in their set of defined variables
  • 4. Boundary Blocks - compute the set of boundary blocks
  • 5. Statements Common Boundary Blocks - calculate the common boundary blocks for the statements in each set
  • 6. Fields Common Boundary Blocks - calculate the common boundary blocks for all fields (referring to object reference)
  • 7. Block Slices - compute the block-based slices
  • 8. Field Slices - build the union of slices for each field
  • 9. Reference Slices - build the union of slices for each reference
  • 10. Object slices wrap - combine object slices with Complete Computational Slices
  • 11. Documentation - add new functions to the readme
  • 12. Tests - add test suits

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions