BVUML Behavioral Validation of UML Diagrams - PowerPoint PPT Presentation

About This Presentation
Title:

BVUML Behavioral Validation of UML Diagrams

Description:

Code based visual simulations. Prosasim UML simulator. Formal logics ... Automatic generation of state diagrams to sequence diagrams. PecSee project. Theoretic ... – PowerPoint PPT presentation

Number of Views:91
Avg rating:3.0/5.0
Slides: 26
Provided by: angel115
Category:

less

Transcript and Presenter's Notes

Title: BVUML Behavioral Validation of UML Diagrams


1
BVUMLBehavioral Validation of UMLDiagrams
  • Boris Litvak
  • Shmuel Tyszberowicz
  • Amiram Yehudai

2
Project Goals
  • Checking consistency of dynamic UML diagrams
  • Targeted for software designers
  • Have no knowledge in formal logic
  • Output needs to be easily understood
  • Based on UML standard 1.4
  • Pre-implementation stage solution

3
UML
  • Unified Modeling Language
  • Sequence diagram
  • Object lifelines and inter-object messages
  • Usually describes some scenario
  • State diagram
  • Single object behavior
  • States and state transitions
  • Checking consistency of dynamic UML diagrams

4
Description
  • Algorithmic approach
  • Key concept the current object state is the
    conjunction of the states in which the control
    resides
  • The basic idea
  • The incoming and the outgoing messages from an
    object in the sequence diagram are checked
    against the current object state in the state
    diagram

See UML 1.4 standard
FOR MORE INFO...
5
Description
  • Implementation problems
  • Need to define correspondence between diagrams
    (e.g. terminology)
  • Complex State diagrams
  • Features that originated in activity diagrams are
    the hardest to handle
  • We even use simplified diagrams in this
    presentation, for clarity
  • However, BVUML output was run on the original

See UML 1.4 standard
FOR MORE INFO...
6
Complex state diagrams
  • Composite states
  • Concurrent composite states
  • Guards
  • Choice states
  • Fork states
  • Join states
  • Exiting composite states
  • History states
  • Transient and persistent states
  • Completion transitions

7
  • CC System
  • Target update
  • example

8
Terminology
  • Leg
  • Depicted as an arrow in either sequence or state
    diagram
  • Sequence and state transitions
  • In state diagram usually between two persistent
    states
  • In sequence diagram usually between two incoming
    messages
  • Common transition concept
  • Suitable transitions
  • State transitions that are equal to sequence
    transitions
  • Current object state
  • Conjunction of state diagram states which
    contains all the data about the object

9
Complex trace example
  • Running (1.7.1) TriggerFinishedRequest
    LegsLeg(1.7.2)
  • actionSendConfirmation,
  • guardAnswerConfirmed,
  • Leg(1.7.3)
  • actionWriteLog,
    guardWriteLog
  • Running top with
  • currentStatestop.Stage2.ContactInt
    elligence
  • Running top.Stage2.ContactIntelligence
    (externally)
  • Running TriggerFinishedRequest Leg
  • to top.Stage2.Answered.
  • Trying Leg
  • actionSendConfirmation,
  • guardAnswerConfirmed
  • to top.Stage2.WillingToAnswer ...
    success.
  • Trying Leg guardNoAnswer
  • to top.Stage2.EndIntUpdate ...
    failure.
  • Trying Leg guardNoLogWrite
  • to top.Stage2.EndIntUpdate ...
    failure.
  • Trying Leg actionWriteLog,
    guardWriteLog
  • Single transition
  • Running (1.7.1) TriggerFinishedRequest
    LegsLeg(1.7.2) actionSendConfirmation,
    guardAnswerConfirmed,
  • Leg(1.7.3) actionWriteLog,
  • guardWriteLog
  • Running top with currentStates
    top.Stage2.ContactIntelligence
  • Running top.Stage2.ContactIntelligence
    (externally)
  • Running TriggerFinishedRequest Leg
    to top.Stage2.Answered.

10
Complex trace example (cont.)
  • Trying Leg actionSendConfirmation,
    guardAnswerConfirmed
  • to top.Stage2.WillingToAnswer
    ... success.
  • Trying Leg guardNoAnswer
  • to top.Stage2.EndIntUpdate ...
    failure.
  • Trying Leg guardNoLogWrite
  • to top.Stage2.EndIntUpdate ...
    failure.
  • Trying Leg actionWriteLog,
    guardWriteLog
  • to top.Stage2.EndIntUpdate ...
    success.

11
Inconsistency An example
  • Using a cellular phone scenario
  • Dial some digits
  • There is an incoming call
  • Pressing Send must answer the call

FOR MORE INFO...
Example taken from Robert C. Martins UML tutorial
12
Inconsistency Dialer state diag.
13
(No Transcript)
14
Inconsistency An example (cont.)
  • In leg 6 (send button pressed), the sequence
    diagram designer intended to make a call
    (ConnectAction is invoked)
  • In the state diagram, when a call is answered at
    the AnswerWait state, AnswerAction is expected

15
BVUML run trace
  • Running (005) TriggerIncomingCall Legs
  • Running top with currentStatestop.Idle
  • Running top.Idle (externally)
  • Running TriggerIncomingCall Leg
  • to top.AnswerWait. ...
    success
  • Running TriggerSend Leg
    actionConnectAction
  • to top.OnLineWait. ...
    failure
  • Running TriggerDigit Leg
  • to top.Idle. ... failure

16
BVUML run trace (continued)
  • Running (006) TriggerSend LegsLeg(007)
  • actionConnectAction
  • Running top with currentStatestop.AnswerWait
  • Running top.AnswerWait (externally)
  • Running TriggerSend Leg
    actionAnswerAction
  • to top.OnLineWait. ...
    failure
  • Running TriggerDigit Leg to
    top.AnswerWait. ... failure

17
Algorithm (top) view
  • For each object in the sequence diagram iterate
    over its sequence transitions
  • For each such a sequence transition SeqT, find a
    suitable transition StateT in the state diagram
    of the object
  • StateT must emanate from the current object state

18
Algorithm (top) view - remarks
  • Hierarchical structure
  • Composite states include other states and
    redirect algorithm control flow to them
  • Transient and persistent states
  • Exception completion transition
  • BFS traversal while searching for suitable
    transitions from a persistent state

19
Algorithm Composite State
  • Run step(SequenceTransition) for each child state
    in the current object state
  • Possible results
  • Ambiguity (non-deterministic)
  • None found
  • Success

20
Algorithm Persistent State
  • gatherResults(SequenceTransition)
  • Tries to find a suitable transition from (almost)
    each emanating leg
  • Completion transition is taken in account
  • step(SequenceTransition)
  • gatherResults(Transition)

21
Algorithm Persistent State Leg
  • searchDown(fromState, Legs)
  • Tries to find a suitable transition that emanates
    from fromState
  • Logic for final, finish, join, and fork states,
    completion transition
  • step(SeqTransition, fromState)
  • Tries to match the object to the sequence
    transition
  • If ok, returns searchDown(targetOfThisLeg,
    remaining sequence diagram legs)

22
Design Decisions
  • XMI Parser mediator layer
  • Parser vendor independence
  • Saturateable states
  • Composite states, join state
  • Fork implementation
  • Current object (sub)state is held in the
    composite state that is the parent of the fork
    state
  • It is not held in the target composite state

23
Design Decisions (cont.)
  • Forks and joins as states
  • UML1.3 versus UML1.4
  • Holding state information
  • Single threaded solution
  • Concurrent composite states, forks
  • Coarse granularity step
  • Persistent state receives SequenceTransition as
    an argument, and not a sequence Leg
  • Composite states
  • Simple composite state is a concurrent composite
    state with one region

24
Other approaches
  • Code based visual simulations
  • Prosasim UML simulator
  • Formal logics methods
  • HUGO project
  • Automatic generation of state diagrams to
    sequence diagrams
  • PecSee project
  • Theoretic
  • Live Sequence Charts (LSC)

25
BVUML Summary
  • Strengths
  • UML input
  • Pre-implementation stage
  • Algorithmic approach
  • Weaknesses
  • Covers only the cases shown in the sequence
    diagrams
Write a Comment
User Comments (0)
About PowerShow.com