UML-B: Formal Modeling and Design Aided by UML - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

UML-B: Formal Modeling and Design Aided by UML

Description:

Operation Specification - Initialization - Appearance and Disappearance of class instances ... BEHAVIOURAL SPECIFICATION BY STATE MACHINE. State Dependant Invariants ... – PowerPoint PPT presentation

Number of Views:87
Avg rating:3.0/5.0
Slides: 13
Provided by: hack9
Category:

less

Transcript and Presenter's Notes

Title: UML-B: Formal Modeling and Design Aided by UML


1
UML-B Formal Modeling and Design Aided by
UML
2
B-Specification
  • -state model based, formal specification
  • -3steps(specification,implementation and
    implementation)
  • -for refinement it requires refinement relation

3
0.. 1
UML-B model
NAME

ltltcreategtgtadd(numbNUMB) ltltdestroygtgt remove() Lookup() numb
NUMB


pbook
1
Operation Guard action
add Numberan(pbook) Pbooknumb
Remove - -
lookup - numbpbook
4
Difficulties Translating from UML to B
  • B is not object-oriented
  • Restrictions on B component and variable access
  • Simultaneous calls to several operations of
    another machine are not allowed
  • UML-B profile
  • -uses stereotypes
  • -defines tagged values(invariants,guards etc)

5
UML-B Model Architecture
  • Class Diagrams
  • -attributes
  • -associations

CELL
powerlevel INT
PHONE
ltltconstantgtgt threshold HOLD
current
0..
0..1
1
0..
cellChannels
dspChannels
0..
0..
CHANNEL
broadcasting BOOL
6
  • TRANSLATION OF uB
  • -OCLdefmyExpressionintegera ?
    select(ocllsTypeOf(S)).x ? sum()
  • -uBSi.(i e C ? i e S ? i e a?i.x)
  • BEHAVIOUR
  • - Invariants
  • instance invariants
  • class invariants
  • - Operation Specification
  • - Initialization
  • - Appearance and Disappearance of class
    instances
  • - subroutines

PHONE
startCall(ttCHANNEL) success
CHANNEL
inUseBOOLFALSE
channels

7
SPECIALIZATION OF CLASSES
CBCH


TRAFFIC
Callkind CALLKIND

ACCESS


CHANNEL
broadcasting BOOL FALSE

8
BEHAVIOURAL SPECIFICATION BY STATE MACHINE
  • State Dependant Invariants
  • Example of state Machine Behaviour specification

Inc / bx bx1
Inc / bx bx10
new BB
Non_Zero
Zero
Dec bx1
Dec bxgt1
  • State machine decision point

s2
G2 /A2
E1 G1 /A1
s1
s3
G4 /A4
G3 /A3
s4
G5 /A5
9
G8/A8
s8
E10G10/A10
s10
s9
G9/A9
E5G5/A5
s5
G7/A7
s7
s6
E6G6/A6
10
Alternative Semantics for UML-B State Machines
s1
s2
REFINEMENT
refines
ltltrefinementgtgt cellphone1
ltltmachinegtgt cellphone
11
Refinement in UML-B
current
PHONE
CELL
PowerlevelINT
TRChannel
cellTRChannels
CBChannel
cellCBChannel
cellASChannles
ASChannels
CBCH
TRAFFIC
ACCESS
callkindCALLKIND
CHANNEL
broadcastingBOOLFALSE
12
Refinement Relation
CLASS REFINEMENT_ RELATION
PHONE ChannelsCBChannel U ASChannels
CELL cellChannelscellChannel U cellTRChannels U cellASChannels
Write a Comment
User Comments (0)
About PowerShow.com