Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Scenario-based Analysis of UML Design Class Models Lijun Yu October 4th, 2010 Oslo, Norway.

Similar presentations


Presentation on theme: "1 Scenario-based Analysis of UML Design Class Models Lijun Yu October 4th, 2010 Oslo, Norway."— Presentation transcript:

1 1 Scenario-based Analysis of UML Design Class Models Lijun Yu October 4th, 2010 Oslo, Norway

2 My background Bachelor in Computer Science, Nanjing University, China, 1997 Master in Computer Science, Colorado State University, USA, 2006 After 2006: Ph.D. research in software engineering Full-time software engineer 2

3 3 Outline Problem Statement Solution Overview Evaluation Method Related Work Research Plan

4 4 Background The Unified Modeling Language is a de-facto standard OO modeling language UML class models are often used to describe software designs Software design is creative process and human beings introduce errors in the design model Design errors should be uncovered and resolved as early as possible

5 5 State-of-the-art in UML class model analysis UML design class model describes Structure in terms of classes and relationships Functionality in terms of operation specifications (OCL) UML static analysis tools USE/OCLE can check whether a snapshot is consistent with structural constraints in UML design class models A snapshot is a UML instance model describing a system state They do not provide good support for analyzing functionality

6 6 Research questions How to analyze functional scenarios against UML design class models? How can we leverage USE/OCLE to support scenario-based analysis? What type of design errors can be uncovered in scenario-based analysis of UML design class models? How to systematically generate scenarios?

7 7 Outline Problem Statement Solution Overview A scenario-based analysis approach Scenario generation techniques Evaluation Method Related Work Research Plan

8 Scenario-based Analysis: A lightweight approach Step 1 Step 2 Step 3 8

9 Step 1: generate snapshot model Create a structured class Snapshot that contains a part structure representing snapshots of the system Create a Transition class that links to before and after snapshots For each operation in the UML design Create a subclass of Transition Add operation parameters as attributes “And” OCL pre and post conditions and transform to invariants of the Transition subclass Add frame constraints: make sure other objects and relationships remain unchanged 9

10 Snapshot model: an example 10

11 Step 2: generate snapshot transitions 1. Use UMLAnT to generate snapshot transitions Verifier describes operation definitions using JAL (Java-like Action Language) Snapshot transitions are generated by executing JAL using UMLAnT 2. Use Alloy to generate snapshot transitions To be discussed in scenario generation part 11

12 Step 3: consistency checking Snapshot transitions are instance model of the Snapshot model Consistency is checked using USE/OCLE Inconsistencies imply errors in either the UML design or the operation definitions 12

13 Scenario generation 13 Scenario generation technique automates the creation of scenarios Option 1: Generate scenarios from formal UML requirements model Option 2: Generate scenarios from UML design Compare two options

14 Scenario generation option 1 Generate scenarios from formal UML requirements model UML Requirements model UML activity diagram describing use case sequences Use case formally described as system operation with parameters and pre/post conditions All allowed operation sequences are extracted from the UML activity diagram Alloy is used to solve parameters of scenarios 14

15 Scenario generation option 2 Generates scenarios from UML designs using Alloy Verifier describes operation definitions in terms of OCL constraints Transform snapshot class model and operation definitions to Alloy Generate interesting scenarios and their snapshot sequences using Alloy trace 15

16 16 Outline Problem Statement Solution Overview Evaluation Method Related Work Research Plan

17 17 Evaluate scenario-based analysis technique Questions Can the technique find inconsistencies between UML class model and scenarios? What types of inconsistencies can the technique uncover? Method Different types of inconsistencies are seeded into UML design class models and scenario models Two groups of students: one uses scenario-based analysis tool, another does manual inspection Record and compare number of errors and type of errors found

18 18 Evaluate scenario generation method Question: Can the scenario generation method generate scenarios that uncover design errors? Method: Seed design errors in the UML design class model Generate scenarios using the scenario generation method and a random scenario generator Compare design errors uncovered by the scenario generation method and a random generator

19 19 Outline Problem Statement Solution Overview Evaluation Method Related Work Research Plan

20 20 Related Work Transforming UML to formal specification languages Developers need to be familiar with these notations and techniques Correctness of transformation can be difficult to prove Testing & Animating UML designs (UMLAnT) Testing one operation call vs Analyzing scenarios Executing the UML model vs Static analysis

21 21 Outline Problem Statement Solution Overview Evaluation Method Related Work Research Plan

22 22 Research Plan Research tasksSchedule Background and related work investigation Finished First version of scenario-based UML design analysis technique Finished Research Proposal2010.3 - 2010.8 Implementing scenario-based analysis tool and integrating with UMLAnT Scenario generation 2010.9 – 2010.12 Case study 1 2011.1 – 2011.3 Case study 2 2011.4 – 2011.5 Drafting dissertation 2011.6 – 2011.12

23 23 Questions and discussions ?

24 24 Feedback and questions Separate scenario-based analysis and scenario generation techniques Not practical to create two-level of abstractions (requirement and design level) Use this approach when good requirements models are available Otherwise, use option 2 The scenario-based analysis technique does not require a requirements model Why not Alloy Alloy is used to generate scenarios in a lightweight manner

25 Step 2: generate snapshot transitions Operation definitions: created by the verifier in Java-like Action Language (JAL) JAL can be interpreted by UMLAnT (UML Animation and Testing) to generate next system state (snapshot) Each scenario contains a sequence of operations with parameters populated Snapshot transitions are generated by interpreting operations definitions 25

26 26 Limitations Lightweight: Does not automatically explore all possible scenarios Does not analyze asynchronous operations Does not analyze parallel and concurrent UML models


Download ppt "1 Scenario-based Analysis of UML Design Class Models Lijun Yu October 4th, 2010 Oslo, Norway."

Similar presentations


Ads by Google