Exforsys.com
 

Sponsored Links

 

UML Tutorials

 
Home Tutorials UML
 

UML Elements : State Diagram

 
Category: UML
Comments (0)

UML Elements : State Diagram

Page 1 of 2

UML Elements: State Diagram

The state diagram is used as a symbol for finite state machines. It may also be used to represent state transition tables. Of the 13 diagrams available in UML 2.0, the state diagram has some of the most variations. In addition to coming in different forms, it may also use various types of semantics. The traditional form that is used for the state diagram is the directed graph.



The directed graph may come with a number of different elements, and some of these are States Q, Input symbols, Output symbols Z, Edges, Start state qo, and Accepting state(s) F. The States Q is a finite coupling of vertices that will normally be symbolized by circles, and it may also be labeled with a special designation symbol. Words may also be written inside it. The Input symbols are a finite group of input symbols that may also be designators. For example, if you're dealing with a Moore machine, or a deterministic finite state machine, the input may be defined on every edge, and this will typically be near the first state.


Output symbols Z is a finite group of symbols or designators that are used for output. If you are working with a Mealy machine, both the input and output will be defined by every edge. If you are working with a Moore machine, the state of the output will generally be written within the circle of the state, and it may be split from the designator of the state with a slash symbol "/". The Edges will be used to symbolize the transitions that occur between two states caused by the input. They will be identified by their symbols which are drawn on the edges. An edge will generally be drawn as an arrow that points from the present state in the direction of another state.


Start State qo and Accepting state(s) F

The start state qo will generally be represented by the arrow which will "point to it from nowhere." It must be noted that the start state will not be shown, and it will need to be defined from the text. The Accepting state(s) F is a group of double circles which will be used to define accept states. In some cases, the accept state(s) will function as the "Final" states. Below are some examples which further explain this diagram and the elements which comprise it. If you're working with a Moore machine, every edge will be labeled along with the input. When you work with a Moore machine, you may be presented with both accept states and states.


If you're working with a Mealy machine, the edge may be labeled in various ways, and you will have both input and output. The labels for each edge may vary depending on the situation. Another concept that you will want to become familiar with is the Harel statechart. These charts were created by David Harel in the 1980s, and they have become quite popular since they were added to the Unified Modeling Language.


This diagram allows for the existence of model superstates, and it also supports concurrent state diagrams. The goal is to model activities in a way that makes them connected to the state. When you work with classic state diagrams, the machine will only be allowed to exist in one state.



When you use Harel statecharts, it will be possible to model the "and" machines, and this will allow the machine to exist in two states simultaneously. One reason this works is due to the modeling of the superstate, as well as the modeling of the concurrent machines. The UML state diagram is another important element that you will need to know. It is one of the many diagrams which make up UML 2.0, and it is closely connected to the Harel statechart in a number of novel ways. Understanding the importance of the state diagram is crucial in the function of the Unified Modeling Language.


Next Page: UML State Diagram Explained


Read Next: UML Elements : Sequence Diagram



 

 

Comments



Post Your Comment:

Members Please Login
Your Name:*
e-mail ID:(required for notification)*
Image Verification: 
 
 Subscribe    

Sponsored Links

 

Subscribe via RSS


Get Daily Updates via Subscribe to Exforsys Free Training via email


Get Latest Free Training Updates delivered directly to your Inbox...

Enter your email address:


 

Subscribe to Exforsys Free Training via RSS
 

 
Partners -  Privacy and Legal Policy -  Site News -  Contact   Sitemap  

Copyright © 2000 - 2010 exforsys.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape