Partitioning ObjectOriented Code for Inspections - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Partitioning ObjectOriented Code for Inspections

Description:

Induce hammock graphs on the call graph, using these methods as entry/exit points ... sites belonging to slices that are not already in hammock graph are marked ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 11
Provided by: dcsK7
Category:

less

Transcript and Presenter's Notes

Title: Partitioning ObjectOriented Code for Inspections


1
Partitioning Object-Oriented Code for Inspections
Neil Walkinshaw, Marc Roper, Murray Wood The
University of Strathclyde, Glasgow neil.walkinsha
w_at_cis.strath.ac.uk
2
Code Inspection
  • Conceived by Fagan in 1976
  • Involves groups of individuals reading through
    code documents, trying to find faults
  • Best approached by following a policy of divide
    and conquer (Lawson and Parnas)
  • Object-Oriented systems encourage distribution of
    functionality across multiple classes
  • Difficult to inspect a class in isolation
  • Small methods, polymorphism and dynamic binding
    make following trails of functionality difficult

3
Motivation
  • Hotel booking system used at Strathclyde for
    undergraduate course
  • Full System 280 methods spread over 13 classes
  • Call graph contains 1406 edges
  • What is the best way to divide this system?

4
Approach
  • Divide system into use-cases and scenarios
  • Having identified a set of methods M from a
    scenario specification (e.g. sequence diagram),
    proceed as follows
  • Identify direct paths on call graph between
    methods in M
  • Identify other methods that can influence the
    execution of these paths

5
Step 1 Identify direct paths
  • Map methods from a sequence diagram to call graph
  • Induce hammock graphs on the call graph, using
    these methods as entry/exit points

6
Step 2 Resolve Method Dependencies
  • Methods identified in hammock graph(s) have
    dependencies on other methods
  • These methods may not belong to the direct paths
    identified in the hammock graphs
  • Intra-procedurally slice backwards from call
    sites in hammock graphs
  • Any call sites belonging to slices that are not
    already in hammock graph are marked
  • Follow all paths originating from newly marked
    call sites

7
Resolve Method Dependencies (1)
  • A call that is not on a direct path between two
    methods may still be relevant to their execution
  • Here, the call to the Person constructor is not
    part of a direct path.

8
Resolve Method Dependencies (2)
  • We take call statements that are the source of
    edges in the hammock graphs
  • We create intra-procedural backward slices to
    identify further relevant calls

9
Size of Final Partitions
  • Number of methods to be inspected from a scenario
    in Hotel System

10
Future Work
  • Investigation of precision-recall of approach
  • How do we proceed to read through the source code
    in the reduced call graph?
  • How can this be integrated with a formal
    inspection methodology?
  • Does it scale to larger systems?
  • How do we ensure complete coverage of the system?
  • Inter-procedural slicing on reduced call graph
Write a Comment
User Comments (0)
About PowerShow.com