1 / 25

BVUML B ehavioral V alidation of UML Diagrams

BVUML B ehavioral V alidation of UML Diagrams. Boris Litvak Shmuel Tyszberowicz Amiram Yehudai. 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

calix
Télécharger la présentation

BVUML B ehavioral V alidation of UML Diagrams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BVUMLBehavioral Validation of UMLDiagrams Boris Litvak Shmuel Tyszberowicz Amiram Yehudai SEFM 2003

  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. Composite states Concurrent composite states Guards Choice states Fork states Join states Exiting composite states History states Transient and persistent states Completion transitions … Complex state diagrams

  7. C&CSystem: 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. Running (1.7.1) Trigger=FinishedRequest Legs=[Leg(1.7.2): {action=SendConfirmation, guard=AnswerConfirmed}, Leg(1.7.3): {action=WriteLog, guard=WriteLog}] : | Running top with currentStates[top.Stage2.ContactIntelligence] : | Running top.Stage2.ContactIntelligence (externally) : | Running Trigger=FinishedRequest Leg: {} to top.Stage2.Answered. : | Trying Leg: {action=SendConfirmation, guard=AnswerConfirmed} to top.Stage2.WillingToAnswer ... success. | Trying Leg: {guard=NoAnswer} to top.Stage2.EndIntUpdate ... failure. | Trying Leg: {guard=NoLogWrite} to top.Stage2.EndIntUpdate ... failure. | Trying Leg: {action=WriteLog, guard=WriteLog} to top.Stage2.EndIntUpdate ... success. Complex trace example • Single transition: | Running (1.7.1) Trigger=FinishedRequest Legs=[Leg(1.7.2): {action=SendConfirmation, guard=AnswerConfirmed}, Leg(1.7.3): {action=WriteLog, guard=WriteLog}] : | Running top with currentStates[top.Stage2.ContactIntelligence] : | Running top.Stage2.ContactIntelligence (externally) : | Running Trigger=FinishedRequest Leg: {} to top.Stage2.Answered. :

  10. Complex trace example (cont.) | Trying Leg: {action=SendConfirmation, guard=AnswerConfirmed} to top.Stage2.WillingToAnswer ... success. | Trying Leg: {guard=NoAnswer} to top.Stage2.EndIntUpdate ... failure. | Trying Leg: {guard=NoLogWrite} to top.Stage2.EndIntUpdate ... failure. | Trying Leg: {action=WriteLog, guard=WriteLog} 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. Martin’s UML tutorial

  12. Inconsistency: Dialer state diag.

  13. 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

  14. BVUML run trace … | Running (005) Trigger=IncomingCall Legs=[] : | Running top with currentStates[top.Idle] : | Running top.Idle (externally) : | Running Trigger=IncomingCall Leg: {} to top.AnswerWait. ... success | Running Trigger=Send Leg: {action=ConnectAction} to top.OnLineWait. ... failure | Running Trigger=Digit Leg: {} to top.Idle. ... failure

  15. BVUML run trace (continued) | Running (006) Trigger=Send Legs=[Leg(007): {action=ConnectAction}] : | Running top with currentStates[top.AnswerWait] : | Running top.AnswerWait (externally) : | Running Trigger=Send Leg: {action=AnswerAction} to top.OnLineWait. ... failure | Running Trigger=Digit Leg: {} to top.AnswerWait. ... failure

  16. 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

  17. 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

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

  19. 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)

  20. 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)

  21. 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

  22. Design Decisions (cont.) • Forks and joins as states • UML1.3 versus UML1.4 • Holding state information • Single threadedsolution • 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

  23. 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)

  24. BVUML Summary • Strengths • UML input • Pre-implementation stage • Algorithmic approach • Weaknesses • Covers only the cases shown in the sequence diagrams

More Related