Reading Techniques for OO Design Inspections - PowerPoint PPT Presentation

1 / 57
About This Presentation
Title:

Reading Techniques for OO Design Inspections

Description:

A customer, giving his account_number, asks for an available parking spot to park his car. ... the customer can confirm the lease of the parking place. ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 58
Provided by: jeffc85
Category:

less

Transcript and Presenter's Notes

Title: Reading Techniques for OO Design Inspections


1
Reading Techniques for OO Design Inspections
Jeff Carver Forrest Shull Guilherme H.
Travassos Victor R. Basili basili,
carver_at_cs.umd.edu fshull_at_fraunhofer.org http//w
ww.cs.umd.edu/projects/SoftEng/ESEG/
  • UFRJ
  • COPPE

Department of Computer Science Experimental
Software Engineering Group
Fraunhofer Center - Maryland
2
Reading Techniques for OO Design
  • OORTs (Object Oriented Reading Techniques)
  • A family of reading techniques that can be used
    to read OO design artifacts against
  • 1. themselves, and
  • 2. requirements descriptions and use-cases
  • within a domain in order to identify defects
    among them.
  • Its a defect based family reading approach

3
Reading Techniques for OO Design
4
Reading Techniques for OO Design
Looking for discrepancies
5
Reading Techniques for OO Design
Looking for discrepancies
6
Reading Techniques for OO Design
  • UML Artifacts

7
Horizontal Reading Techniques
  • Ensure all design artifacts represent the same
    system
  • Design contain complementary views of the
    information
  • Static (class diagrams)
  • Dynamic (interaction diagrams)
  • Not obvious how to compare these different
    perspectives

8
Vertical Reading Techniques
  • Ensure that the design artifacts represent the
    same system described by the requirements and
    use-cases
  • Comparing documents from different lifecycle
    phases
  • Level of abstraction and detail are different

9
What we know so far
  • Techniques are feasible
  • Techniques help find defects
  • Vertical reading finds more OMISSION and
    INCORRECT FACT discrepancies
  • Horizontal reading finds more INCONSISTENCY and
    AMBIGUITY discrepancies

10
Reading Techniques for OO DesignTeam
Organization
An inspection process with OO reading techniques
looking for consistency horizontal reading
Reader 1
Meet as a team to develop a comprehensive defect
list. Each reader is an expert in a different
aspect
looking for consistency horizontal reading
Reader 2
looking for traceability vertical reading
Final list of all defects sent to designer for
repairing
Reader 3
REMEMBER Finding defects not fixing defects
11
Reading Techniques for OO Design
  • Target Artifacts

Requirements
Requirements
Use-Cases
Specification
Descriptions
Class
Class
State Machine
Interaction
High Level
Diagrams
Descriptions
Diagrams
Diagrams
Design
(Sequence)
Vertical reading
Horizontal
reading
12
Example Gas Station Control System (GSCS)
  • Recall our description of the system
  • ... The gas station allows customers to purchase
    gas (self-service) or to pay for maintenance work
    done on their cars. Some local businesses may
    have billing accounts set up so that the business
    is sent a monthly bill, rather than paying for
    each transaction at the time of purchase. There
    will always be a cashier on-duty at the gas
    station to accept cash payments or perform system
    maintenance, as necessary.
  • The requirements in this excerpt ...concern how
    the system receives payment from the customer. A
    customer has the option to be billed
    automatically at the time of purchase, or to be
    sent a monthly bill and pay at that time.
    Customers can always pay via cash or credit card.

13
Defining levels of Functionality
  • Requirement Requirement describes the high-level
    functions of the system. Typically, requirements
    are described from the users point of view.
  • Behavior Behaviors are low-level actions
    performed by the system they are the atomic
    units out of which system requirements are
    composed. Users do not typically consider
    behaviors an end in themselves rather, behaviors
    are the steps by which some larger goal or
    requirement is achieved.
  • Operation Operations are the very lowest-level
    actions out of which system behaviors and, in
    turn, requirments are composed. They represent
    the communication between objects that work
    together to implement system functionality.
    Operations may be shown on sequence diagrams and
    must have associated object behaviors.

14
Example Abstracting operations to behaviors (to
requirements) in GSCS
A customer, giving his account_number, asks for
an available parking spot to park his car. To
get an available parking spot gas station owner
searches for the next parking place
available. With this information the customer can
confirm the lease of the parking place. The time
of payment (time of purchase or a monthly paper
bill) and how the service should be paid (by
cash, personal check or credit card). If the
time of payment is the same as the purchase time
and Customer decides to pay by Credit Card then
Credit Card system should be used. The Customer
can only wait for 30 seconds for the
authorization process otherwise this payment
should made by cash or personal check to avoid
other Customers waiting on the lane. It allows
the Gas Station Owner to mark a new service
purchase for this Customer at this date.
15
Reading Techniques Semantic Checking
  • Operations Sequence diagram describes
    communications between objects.
  • E.g. parking_spot_request(), next_available()

16
Reading Techniques Semantic Checking
  • Behavior Requirements, class methods, state
    diagrams often refer to behaviors provided by the
    system
  • E.g. get an available parking spot, pay by
    credit card

Requirement Reserve a Parking spot with a Credit
Card
17
Constraints/Conditions
  • Condition
  • Describes the situation that must be true for the
    functionality/service/message to which it is
    attached to be executed.
  • Constraint
  • Describes something that always has to be true in
    the system.
  • Is not dependent on the functionality being
    executed.

18
Reading Techniques Semantic Checking
  • Requirements often describe conditions and
    constraints on functionality.
  • If the time of payment is the same as the
    purchase time and Customer decides to pay by
    Credit Card then Credit Card system should be
    used. The Customer can only wait for 30 seconds
    for the authorization process otherwise this
    payment should be made by cash or personal check
    to avoid other Customers waiting on the lane. The
    Gas Station Owner should ask the Customer for a
    new payment type.

19
Example Conditions and Constraints
20
Example Constraints/Conditions GSCS
21
Discrepancy Report Forms
22
Discrepancy Report - Horizontal
23
Discrepancy Report - Vertical
24
Reading Techniques
25
Object model and Classification Diagram x
Sequence diagrams
  • The artifacts
  • An object model and classification diagram that
    describe the objects of a system and how they are
    associated.
  • Sequence diagrams that describe the classes,
    objects, and possibly actors of a system and how
    they collaborate to capture services of the
    system.
  • The goal
  • To verify that the object model and
    classification diagram for the system describes
    classes and their relationships in such a way
    that the behaviors specified in the sequence
    diagrams are correctly captured.

26
Object model and Classification Diagram x
Sequence diagrams
  • Step 1
  • Inputs Sequence diagram.
  • Outputs System objects Behaviors of the system
    Conditions on the behaviors.
  • General instructions Take a sequence diagram and
    read it to understand the system behaviors
    described and how the system should implement
    those behaviors.
  • Specific instructions
  • Identify the system objects and classes, and any
    actors.
  • Identify the information exchanged between
    objects (the horizontal arrows). If the
    information exchanged is very detailed, at the
    level of operations, you should abstract several
    operations together to understand the behaviors
    they work to provide.
  • Identify any constraints on the operations and
    behaviors.

27
Object model and Classification Diagram x
Sequence diagrams
28
Object model and Classification Diagram x
Sequence diagrams
  • Step 1
  • Inputs Sequence diagram.
  • Outputs System objects Behaviors of the system
    Conditions on the behaviors.
  • General instructions Take a sequence diagram and
    read it to understand the system behaviors
    described and how the system should implement
    those behaviors.
  • Specific instructions
  • Identify the system objects and classes, and any
    actors.
  • Identify the information exchanged between
    objects (the horizontal arrows). If the
    information exchanged is very detailed, at the
    level of operations, you should abstract several
    operations together to understand the behaviors
    they work to provide.
  • Identify any constraints on the operations and
    behaviors.

29
Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Pay by Monthly Bill
30
Object model and Classification Diagram x
Sequence diagrams
  • Step 1
  • Inputs Sequence diagram.
  • Outputs System objects Behaviors of the system
    Conditions on the behaviors.
  • General instructions Take a sequence diagram and
    read it to understand the system behaviors
    described and how the system should implement
    those behaviors.
  • Specific instructions
  • Identify the system objects and classes, and any
    actors.
  • Identify the information exchanged between
    objects (the horizontal arrows). If the
    information exchanged is very detailed, at the
    level of operations, you should abstract several
    operations together to understand the behaviors
    they work to provide.
  • Identify any constraints on the operations and
    behaviors.

31
Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Pay by Monthly Bill
32
Object model and Classification Diagram x
Sequence diagrams
  • Step 2
  • Inputs Sequence diagrams, with objects,
    behaviors, and constraints marked Object model
    and classification diagram.
  • Outputs Discrepancy reports.
  • General instructions Identify and inspect the
    related object model, to identify if the
    corresponding system objects are described
    accurately.
  • Specific instructions
  • Verify that every object, class, and actor used
    in the sequence diagram is represented by a
    concrete class in a object model.

33
Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Pay by Monthly Bill
34
Object model and Classification Diagram x
Sequence diagrams
???
Discrepancy
35
Object model and Classification Diagram x
Sequence diagrams
  • Step 2 (cont.)
  • Verify that for every behavior or operation on
    the sequence diagram, there is a corresponding
    operation on the object model. Verify that there
    are class behaviors in the class diagram that
    encapsulate the higher-level behaviors provided
    by the sequence diagram. Verify that for each
    behavior, the operations described by the
    sequence diagram are sufficient to achieve that
    behavior.Is there an operation on the sequence
    diagram for which the receiving object does not
    contain an appropriate behavior on the object
    model?
  • Are there appropriate class behaviors for the
    system behaviors?
  • Is there an association on the classification
    diagram between the two objects between which the
    operation goes?

36
Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Pay by Monthly Bill
37
(No Transcript)
38
Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Discrepancy
Pay by Monthly Bill
39
Object model and Classification Diagram x
Sequence diagrams
  • Step 2 (cont.)
  • Verify that the constraints identified in the
    sequence diagram can be fulfilled according to
    the object model.Is all of the information
    concerning constraints on the sequence diagram
    captured on the object model?

40
Object model and Classification Diagram x
Sequence diagrams
Get an available parking spot
Pay by Credit Card
Pay by Monthly Bill
41
Object model and Classification Diagram x
Sequence diagrams
42
Object model and Classification Diagram x
Sequence diagrams
  • Step 2 (cont.)
  • For each class, operation, and data identified
    above, think about whether, based on your
    previous experience, it results in a reasonable
    design. Does it make sense for the class to
    receive this operation with these data? Could you
    verify if the constraints are feasible? Are all
    of the necessary attributes defined?
  • For the classes specified in the sequence
    diagram, do the behaviors and attributes
    specified for them on the operations model make
    sense? Is the name of the class appropriate for
    the domain, and for its attributes and behaviors?
    Are the relationships with other classes
    appropriate? Are the relationships of the right
    type?

43
Sequence diagram x Requirements and Use Cases
  • The artifacts
  • A requirement and associated use case(s) that
    describe important concepts of the system and the
    services it provides.
  • One or more sequence diagrams that describe the
    objects of a system and the services it provides.
  • The goal
  • To verify that sequence diagrams describe an
    appropriate combination of objects and messages
    that work to capture the functionality described
    by the requirement and use case.

44
Sequence diagram x Requirements and Use Cases
  • Step 1
  • Inputs A Requirement and associated use case.
  • Outputs System concepts Behaviors provided by
    systemData necessary for achieving behaviors.
  • General instructions Identify the functionality
    described by a requirement and use case, and
    important concepts of the system that are
    necessary to achieve that functionality.
  • Specific instructions
  • Find system concepts in the requirement and use
    case.
  • For each concept, identify the behaviors in which
    it is involved. Look for associated constraints
    and conditions.
  • Also identify any information or data that is
    required to be sent or received in order to
    achieve the behaviors.

45
Sequence diagram x Requirements and Use Cases
Text from Requirement/Use Case
- A customer, giving his account_number, asks for
an available parking spot to park his car. - To
get an available parking spot, the gas station
owner searches for the next available parking
place. - With this information the customer can
confirm the lease of the parking place. - The
time of payment (time of purchase or a monthly
paper bill) and how the service should be paid
(by cash, personal check or credit card) should
be given. - If the time of payment is the same
as the purchase time and Customer decides to pay
by Credit Card then Credit Card system should be
used. The Customer can only wait for 30 seconds
for the authorization process otherwise this
payment should made by cash or personal check to
avoid other Customers waiting on the lane. - It
allows the Gas Station Owner to mark a new
service purchase for this Customer at this date.
46
Sequence diagram x Requirements and Use Cases
  • Step 2
  • Inputs Requirement, Use case, sequence diagram.
  • Outputs System concepts Behaviors provided by
    systemData exchanged between objects.
  • General instructions Identify and inspect the
    related sequence diagrams, to identify if the
    corresponding functionality is described
    accurately and whether behaviors and data are
    represented in the right order.
  • Specific instructions
  • For each sequence diagram, identify the system
    objects.
  • Identify the behaviors described by the sequence
    diagrams.
  • Identify the information (or data) that is
    exchanged between system objects.

47
Sequence diagram x Requirements and Use Cases
48
Sequence diagram x Requirements and Use Cases
  • Step 2
  • Inputs Requirement, Use case, sequence diagram.
  • Outputs System concepts Behaviors provided by
    systemData exchanged between objects.
  • General instructions Identify and inspect the
    related sequence diagrams, to identify if the
    corresponding functionality is described
    accurately and whether behaviors and data are
    represented in the right order.
  • Specific instructions
  • For each sequence diagram, identify the system
    objects.
  • Identify the behaviors described by the sequence
    diagrams.
  • Identify the information (or data) that is
    exchanged between system objects.

49
Sequence diagram x Requirements and Use Cases
Get an available parking spot
Pay by Credit Card
50
Sequence diagram x Requirements and Use Cases
  • Step 2
  • Inputs Requirement, Use case, sequence diagram.
  • Outputs System concepts Behaviors provided by
    systemData exchanged between objects.
  • General instructions Identify and inspect the
    related sequence diagrams, to identify if the
    corresponding functionality is described
    accurately and whether operations and data are
    represented in the right order.
  • Specific instructions
  • For each sequence diagram, identify the system
    objects.
  • Identify the behaviors described by the sequence
    diagrams.
  • Identify the information (or data) that is
    exchanged between system objects.

51
Sequence diagram x Requirements and Use Cases
Get an available parking spot
Pay by Credit Card
52
Sequence diagram x Requirements and Use Cases
  • Step 3
  • Inputs Requirement, Use case, sequence diagram.
  • Outputs Discrepancy reports.
  • General instructions Compare the marked-up
    diagrams to determine whether they represent the
    same domain concepts.
  • Specific instructions
  • For each of identified concepts on the
    requirement and use case, search the sequence
    diagram to see if it is represented.
  • For each object on the sequence diagram search
    the requirement and use cases to see if it is
    represented.

53
Sequence diagram x Requirements and Use Cases
Text from Requirement/Use Case
- A customer, giving his account_number, asks for
an available parking spot to park his car. - To
get an available parking spot, the gas station
owner searches for the next available parking
place. - With this information the customer can
confirm the lease of the parking place. - The
time of payment (time of purchase or a monthly
paper bill) and how the service should be paid
(by cash, personal check or credit card) should
be given. - If the time of payment is the same
as the purchase time and Customer decides to pay
by Credit Card then Credit Card system should be
used. The Customer can only wait for 30 seconds
for the authorization process otherwise this
payment should made by cash or personal check to
avoid other Customers waiting on the lane. - It
allows the Gas Station Owner to mark a new
service purchase for this Customer at this date.
54
Sequence diagram x Requirements and Use Cases
Get an available parking spot
Discrepancy
Pay by Credit Card
55
Sequence diagram x Requirements and Use Cases
  • Step 3 (cont.)
  • Identify the behaviors described by the sequence
    diagram, and compare them with the description
    used on the requirement and use case. Do the
    objects exchange operations in the same specified
    order? Are all transported data in the right
    operations? Is data being sent between the right
    two objects?
  • Are all the constraints and conditions from the
    requirement or use case being observed in this
    sequence diagram? Were the constraints observed?
    Was all of the behavior and data on the sequence
    diagram directly concerned with the requirement
    or use case?

56
Sequence diagram x Requirements and Use Cases
Text from Requirement/Use Case
- A customer, giving his account_number, asks for
an available parking spot to park his car. - To
get an available parking spot, the gas station
owner searches for the next available parking
place. - With this information the customer can
confirm the lease of the parking place. - The
time of payment (time of purchase or a monthly
paper bill) and how the service should be paid
(by cash, personal check or credit card) should
be given. - If the time of payment is the same
as the purchase time and Customer decides to pay
by Credit Card then Credit Card system should be
used. The Customer can only wait for 30 seconds
for the authorization process otherwise this
payment should made by cash or personal check to
avoid other Customers waiting on the lane. - It
allows the Gas Station Owner to mark a new
service purchase for this Customer at this date.
57
Sequence diagram x Requirements and Use Cases
Get an available parking spot
Pay by Credit Card
Discrepancy
58
Sequence diagram x Requirements and Use Cases
  • Step 3 (cont.)
  • Identify the behaviors described by the sequence
    diagram, and compare them with the description
    used on the requirement and use case. Do the
    objects exchange operations in the same specified
    order? Are all transported data in the right
    operations? Is data being sent between the right
    two objects?
  • Are all the constraints and conditions from the
    requirement and use case being observed in this
    sequence diagram? Were the constraints observed?
    Was all of the behavior and data on the sequence
    diagram directly concerned with the requirement
    and use case?

59
Sequence diagram x Requirements and Use Cases
Text from Requirement/Use Case
- A customer, giving his account_number, asks for
an available parking spot to park his car. - To
get an available parking spot, the gas station
owner searches for the next available parking
place. - With this information the customer can
confirm the lease of the parking place. - The
time of payment (time of purchase or a monthly
paper bill) and how the service should be paid
(by cash, personal check or credit card) should
be given. - If the time of payment is the same
as the purchase time and Customer decides to pay
by Credit Card then Credit Card system should be
used. The Customer can only wait for 30 seconds
for the authorization process otherwise this
payment should made by cash or personal check to
avoid other Customers waiting on the lane. - It
allows the Gas Station Owner to mark a new
service purchase for this Customer at this date.
60
Sequence diagram x Requirements and Use Cases
Get an available parking spot
Pay by Credit Card
Write a Comment
User Comments (0)
About PowerShow.com