20
An Automatic Approach to Translate Use Cases to Sequence Diagrams Mohammed Misbhauddin PhD Candidate ICS Department, KFUPM [email protected]

An Automatic Approach to Translate Use Cases to Sequence Diagrams

Embed Size (px)

DESCRIPTION

Presented at the 4th Graduates' Seminar Day at King Fahd University, Dhahran, Saudi Arabia.

Citation preview

Page 1: An Automatic Approach to Translate Use Cases to Sequence Diagrams

An Automatic Approach to Translate Use Cases to Sequence Diagrams

Mohammed MisbhauddinPhD CandidateICS Department, [email protected] 

Page 2: An Automatic Approach to Translate Use Cases to Sequence Diagrams

AGENDA

1. Introduction2. Unified Modeling Language

Use Case Diagram Sequence Diagram

3. Related Work4. Translation Methodology5. Comparison6. Conclusion and Future work

Page 3: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Software engineering is an engineering discipline that is concerned with all aspects of software production.

The software process consists of activities that are involved in developing software products. Basic activities are software specification, design, development and validation.

Agenda

1 of 3IntroductionIntroduction

UMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Page 4: An Automatic Approach to Translate Use Cases to Sequence Diagrams

IntroductionAgenda

2 of 3

Requirement Analysis

IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Design

ImplementationValidation

Sequence DiagramCommunication Diagram State Machine Diagram

Class Diagram

Object Diagram

Component Diagram

Package Diagram

Deployment DiagramActivity Diagram

Use Case Diagram

PlanGUI Layout

SRSSpec

CodeTest cases

Acceptance Summary

Test scenarios

Page 5: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Introduction - Motivation

Agenda

Effect ofMiscommunication

Need: Automated approach to translate an artifact from one domain to another.

3 of 3IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Page 6: An Automatic Approach to Translate Use Cases to Sequence Diagrams

6

UML is a graphical language which provides notations and action semantics to describe and design Object Oriented Software Systems.

UML 2.0 Models Suite - 13 Different Diagrams

Sequence Diagram

Communication Diagram

Activity Diagram

State Machine DiagramTiming Diagram

Use Case Diagram

Interaction Overview Diagram

Class Diagram

Object Diagram

Component Diagram

Package Diagram

Deployment Diagram

Composite Structure Diagram

Agenda Unified Modeling Language (UML)Introduction

UMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Page 7: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Use Case Diagrams

Use case diagram is a powerful artifact used for the elicitation of functional software requirements in the requirements specification phase.

Use Case ID UC-05Use Case Name

Withdraw

Actors CustomerMain Flow

1 INC Login2 The ATM requests amount

from customer.3 Customer enters amount.4 ATM retrieves balance from

accountA1 Amount is greater than

BalanceAlternate

FlowA1 1. Display Error Message

Agenda

ATM System

Customer

Withdraw

Login

Display Balance

<<extend>>

<<include>>

IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Page 8: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Sequence Diagrams

Sequence diagrams are used to model the dynamic behavior of the software system depicting how objects interact by passing messages constructed in the design phase.

Agenda

Objects

Messages

Fragments

IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Page 9: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Related WorkAgenda

A Semi-Automatic

Approach to Translating Use

Cases to Sequence DiagramsTechnology

of OO Languages & Systems

1999

Translating Use Cases

to Sequence Diagrams

IEEEAutomated Software Engineering

2000

Specifying Use Case Behavior

With Interaction

Models

Journal of Object Technology

2003

•Incomplete utilization of available constructs•Enforcing guidelines while composing descriptions•Either work at sentence level or construct level but not both.

ISSUES

IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

UML Sequence Diagram

Generator System from

Use Case Description

Using Natural Language

4th

Congress of Electronics, Robotics and Automotive Mechanics 2007(a)

Describing Use-Case 

Relationships 

with Sequence Diagrams

2007(b)

TheComputerJournal

Modeling User-System

Interaction in Use Cases with Dynamic Views

2008

IEEEComputational Intelligence and Industrial Application

Page 10: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Proposed ApproachAgenda

1 of 7

The proposed approach can be summarized as follows: Develop a metamodel for use case

descriptions and sequence diagrams.

Parse use case steps. Identify mapping rules between

these meta-models.

IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Page 11: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Use Case Translation

Use case Descripti

on

Parts-of-Speech Tagger

Dictionary

Translation Process

Sequence Diagram

Use case parser

Agenda

2 of 7IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work Phase 1: Syntactic

Structure Identification

Page 12: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Use Case Translation

Agenda

3 of 7IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Customer inserts card into ATMPOS

Taggersubject verb object1 preposition object2

sender action argument Receiver

Dictionary

Customer

ATMInserts(card)

Example

Page 13: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Proposed ApproachAgenda

4 of 7

Use Case Description Sequence Diagram

Translation Meta model

Translation Process

Use Case Metamodel Sequence Diagram Metamodel

Translation Architecture

conforms conforms

receivesuses

producesMisbhauddin, M. and M. Alshayeb, “Extending the UML Metamodel for Sequence Diagram to Enhance Model Traceability”, the Fifth International Conference on Software Engineering Advances, Nice, France, August 22-27, 2010

IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work Phase 2: Construct Based

Translation

Page 14: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Proposed ApproachAgenda

5 of 7IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Metamodel Mapping

Algorithm (excerpt)

Start

Anchor

Include

ALT

Parse and Identify

components

Insert a “ref”

fragment

T F

………..

alt opt break….

Page 15: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Proposed ApproachAgenda

6 of 7IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Example Use Case ID

UC-05

Use Case Name

Withdraw

Actors CustomerMain Flow

1 INC Login2 The ATM requests

amount from customer.

3 Customer enters amount in the ATM.

4 ATM retrieves balance from account

A1 Amount is greater than Balance

Alternate Flow

A1 1. Display Error Message

CustomerATM account

ref Login

Request(amount)enters(amount)

retrieve(balance)

Page 16: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Tool SupportAgenda

7 of 7IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

• The tool will allow the user to enter descriptions of all the use cases.•These cases can then be converted into a sequence diagram.• The output is in the form of an XMI file.•This XMI file can be imported in any UML CASE tool

Page 17: An Automatic Approach to Translate Use Cases to Sequence Diagrams

ComparisionAgenda

Case-study: A sample of five student projects with an average of 15 use cases was used.

IntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Research

UC Constructs (5)

SEQ Constructs (20)

Sentence Classification

(%age)Composition Restrictions

Sentence Syntax

1999 1 3 43.53% 82000 3 5 49% 42007(a)

1 3 45% 7

Construct Based

2003 4+1 13 N/A N/A2007(b)

4 13 N/A N/A

2008 4 14 N/A N/AProposedApproach

2010 5 17 74.08% 2

Page 18: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Conclusions

Communication gap between the specification domain and the design domain leads to an incorrect and inconsistent system.

An automatic approach to translating use case descriptions to sequence diagrams is presented.

UML metamodel for use case specification and sequence diagram is used to guide the translation process.

This work is supported by KACST Research Grant (No. a-i: 18-20).

AgendaIntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Page 19: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Future work

Tagging is done over simple sentences. Compound sentences should also be handled in the future.

Increasing the classification rate by enriching the dictionary using AI techniques rather than English Language Dictionaries.

Work is going on to convert the XML output representation of the sequence diagram to a graphical form.

AgendaIntroductionUMLRelated WorkTranslation MethodologyComparisonConclusion & Future work

Page 20: An Automatic Approach to Translate Use Cases to Sequence Diagrams

Questions & Discussion

I would like to acknowledge the support of my dissertation advisor Dr. Mohammad Alshayeb.