using functional characteristics to analyze state changes of objects

15
Using Functional Characteristics to Analyze State Changes of Objects Uldis Donins, Janis Osis, Erika Asnina and Asnate Jansone Riga Technical University Baltic DB & IS 2012, July 8-11, 2012 - Vilnius, Lithuania This work has been supported by the European Social Fund within the project «Support for the implementation of doctoral studies at Riga Technical University».

Upload: sirvat

Post on 23-Feb-2016

46 views

Category:

Documents


0 download

DESCRIPTION

This work has been supported by the European Social Fund within the project «Support for the implementation of doctoral studies at Riga Technical University». . Using Functional Characteristics to Analyze State Changes of Objects. Uldis Donins, Janis Osis, Erika Asnina and Asnate Jansone - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Using Functional Characteristics  to  Analyze State Changes of Objects

Using Functional Characteristics to Analyze State Changes of

Objects

Uldis Donins, Janis Osis,Erika Asnina and Asnate Jansone

Riga Technical University

Baltic DB & IS 2012, July 8-11, 2012 - Vilnius, Lithuania

This work has been supported by the European Social Fund within the project «Support for the implementation of doctoral studies at Riga Technical University».

Page 2: Using Functional Characteristics  to  Analyze State Changes of Objects

Introduction• The behaviour of an object over time could be surmised

by analysing system Use case descriptions, Activity diagrams, or other software design artefact– To avoid surmising the state change of objects in system, UML

State diagram is used• Instead of analysing the problem domain, software

developers set the main focus on software design thus leading to a gap between the problem domain and its supporting software – This issue can be overcome by formalizing the very beginning

of the software development lifecycle by using Topological Functioning Model (TFM)

• The purpose of this research is to strengthen the application of TFM with formal development of State diagram by enabling transformation from TFM to it and eliminating the gap between problem domain and solution 2

Page 3: Using Functional Characteristics  to  Analyze State Changes of Objects

Related Works• The current state of the art of UML based software

development approaches shares common viewpoint of the application of State diagrams within software development process:– State diagrams are developed by analysing Use cases,– One state diagram per class or object, and– They should be developed for each most important object

within the system.

3

Page 4: Using Functional Characteristics  to  Analyze State Changes of Objects

Questions Remaining Open• Previously mentioned three statements raise a set of

ambiguousness and questions:– The Use cases cannot be considered as a complete problem

domain representation and a formal connection between problem domain and the solution.

– The application of Use cases to develop other diagrams (such as State) depends much on the designers’ personal experience and knowledge

– This leaves following questions open:• How to formally eliminate and overcome the gap between

problem domain model and the design models?, and• What are “most important objects” and how to formally

identify them?• To overcome these issues the TFM is applied within software

development process as a root model for analyzing and understanding functioning characteristics of problem and solution domains

4

Page 5: Using Functional Characteristics  to  Analyze State Changes of Objects

Analysis of Objects State Changes and Transitions

• Formal state change analysis of objects consists of the following activities:– TFM development,– Domain model analysis and design, and– Object state change and transition analysis.

5

Page 6: Using Functional Characteristics  to  Analyze State Changes of Objects

Topological Functioning Model Development (1)

• During this activity a TFM representing complete functioning of the problem domain is developed

• Afterwards the TFM is used as a source for development of other diagrams thus overcoming the gap between problem and solution domains

• TFM is developed by completing following four steps:– Step 1: Definition of physical or business functional

characteristics,– Step 2: Introduction of topology ,– Step 3: Separation of TFM from topological space, and– Step 4: Identification of logical relations.

6

Page 7: Using Functional Characteristics  to  Analyze State Changes of Objects

Topological Functioning Model Development (2)

7

2 3 45

6

789

10

AND

XOR

OR

Logical relation OR between incoming arcs of functional feature 3

Logical relation XOR between outgoing arcs of functional feature 8

Topological relationship between cause functional feature 5 and effect functional feature 6

Functional feature

Page 8: Using Functional Characteristics  to  Analyze State Changes of Objects

Domain Model Analysis and Design (1)

• Domain model analysis and design is based on the Topological class diagram and consists of two steps.

• Step 1: Analysis of objects and their communication– Based on the TFM transformation into Communication

diagram– When transforming TFM into Communication diagram the

following are used: Functional features – source for lifeline identification and

message sending from object to object, Topological relationships – determines the message sender and

receiver as well as the message sending sequence, and Logical relations – shows the message sending concurrency.

8

Page 9: Using Functional Characteristics  to  Analyze State Changes of Objects

+Read()+IsImportFromDBNeeded()

+InputConnectionInformation+InputUserName+InputPassword+TakeDataFromInput+InputReadTime+TargetConnectionInformation+TargetUserName+TargetPassword+ImportPath+LogPath

Configuration

+ReadImportFile()+MoveImportFile()

+FileName+FilePath

ImportFile

+CheckImportFolder()

+FolderName+FolderPath

ImportFolder

+CheckDBDataStructure()+ConvertDBDataToInternal()+ImportIntoTargetDB()+CheckImportFileStructure()+ConvertImportFileDataToInternal()+SkipImportFile()

+ImportFileStructure+DBDataStructure+InternalTable+InputDataSource : SourceDataSource+TargetDataSource : TargetDataSource+ImportFiles : ImportFile+Configuration : Configuration

Scheduler

+ReadDataFromDB()+SelectQuery

SourceDataSource

Domain Model Analysis and Design (3)

11

+Read()+IsImportFromDBNeeded()

+InputConnectionInformation+InputUserName+InputPassword+TakeDataFromInput+InputReadTime+TargetConnectionInformation+TargetUserName+TargetPassword+ImportPath+LogPath

Configuration

+ReadImportFile()+MoveImportFile()

+FileName+FilePath

ImportFile

+CheckImportFolder()

+FolderName+FolderPath

ImportFolder

+CheckDBDataStructure()+ConvertDBDataToInternal()+ImportIntoTargetDB()+CheckImportFileStructure()+ConvertImportFileDataToInternal()+SkipImportFile()

+ImportFileStructure+DBDataStructure+InternalTable+InputDataSource : SourceDataSource+TargetDataSource : TargetDataSource+ImportFiles : ImportFile+Configuration : Configuration

Scheduler

+ReadDataFromDB()+SelectQuery

SourceDataSource

+ConnectionInformation+UserName+Password

DataSource

+InputDataSource 1

+ImportFiles 0..*

+Configuration 1

Topological (cause-and-effect) relationship

Generalization

Association

Dependency

2 3

5

6

7

8

9

11

12

13

14 15

1617

19

20

22

24 25 26

27 28

29

1

4

10

21

23

30

18

TFM

Data importmanager

Sourcedata base

:Configuration

1:GetConfiguration

2:Read

:SourceDataSource

3b:ReadDataFromDB

3a:ReadDataFromDB

:Scheduler

4:CheckDBDataStructure

5:ConvertDBDataToInternal6:ImportIntoTargetDB

:Logger

7:CreateLog

:TargetDataSource

8:CheckIfDataExists

9a.1.1:UpdateData9a.1.2:InsertData

9a:WriteLogEntry10:WriteLogEntry

11:GetConfiguration

Communication diagram

Main functioning cycle

11

Page 10: Using Functional Characteristics  to  Analyze State Changes of Objects

Object State Change and Transition Analysis (2)

• The first action is to scale down TFM which is performed by removing features which does not represent the object under consideration but in the same time retaining cause-and-effect relations. For example, assume that:– TFM consists of three features : A→B→C– The A and C represent the same object while B represents another

object, thus resulting TFM is as follows: A→C.• States for each class are obtained from the functional features of

TFM.– If the execution of functional feature involves the change of the

corresponding object’s state, then the state attribute has value, otherwise the value is not set.

– State transitions are obtained by transforming cause-and-effect relationship between functional features.

– The special states (initial state and final state) are added to the obtained State diagram as inputs and outputs of downscaled TFM.

13

Page 11: Using Functional Characteristics  to  Analyze State Changes of Objects

Exa

mpl

e of

TFM

to S

tate

D

iagr

am T

rans

form

atio

n

A

C

New

Completed

State specification:Name = A.newStateEntry effect = A.operationExit effect = B.operation

State specification:Name = B.newStateEntry effect = B.operation Exit effect = Ø

Transition specification:Source state = A.newStateEvent trigger = B.operationGuard condition = B.preCondTarget state = B.newState

newState = New

object = CardRequest

newState = Completed

object = cardRequest

Fragment ofState diagram

Fragment of TFM

14

Page 12: Using Functional Characteristics  to  Analyze State Changes of Objects

Example of Object State Change & Transition Analysis (1)

• Example is based on a case study in which TFM is developed for enterprise data synchronization system.

• Part of functional features that specify the new state for object named “Scheduler”:

15

ID Object action New state5 Reading all data from source data base Reading data6 Checking if read data structure is according

to specificationChecking data

7 Putting the read data into temporal internal table

Importing

9 Checking import folder Reading data12 Checking if import file data structure is

according to specificationChecking data

13 Converting the read data from import file into temporal internal table

Importing

Page 13: Using Functional Characteristics  to  Analyze State Changes of Objects

Example of Object State Change & Transition Analysis (2)

16

2 3

5

6

7

8

9

11

12

13

14 15

1617

19

20

22

24 25 26

27 28

29

1

4

10

21

23

30

18Reading data

Checking data

Importing

Logging status

Completing import

[else][structure isaccording tospecification]

[all data isimported]

[else]

Page 14: Using Functional Characteristics  to  Analyze State Changes of Objects

Conclusions• The main goal of this research is to do formal development of State

diagram by analysing functional characteristics of a problem domain• The elaborated State diagram development method proposes a way on

how to formally overcome the gap between problem domain and solution domain

– The first one is represented by TFM which shows the complete functioning of a problem domain and

– The latter one is obtained by transforming TFM of a problem domain.• Moreover the proposed approach enables formal identification of the

most important objects and classes within system – they are denoted by TFM:

– functional features that are included into main functional cycle specify these objects and classes

– In contrast, the reviewed UML modelling driven methods relies that the designers’ personal experience and knowledge is sufficient to identify most important objects within system

• In addition the example described in paper shows State diagram development for the case study in which enterprise data synchronization system has been developed by using proposed modelling approach

17

Page 15: Using Functional Characteristics  to  Analyze State Changes of Objects

Thank you for Attention !

18