Questions tagged [state-diagram]

71 questions
20
votes
2 answers

How to draw the classic state diagram using Mathematica?

Is it possible and practical for Mathematica to draw something like this (being created by Graphviz): This is the best that I can get (but the shape and style are not satisfying): Code: GraphPlot[{{A -> C, "go"}, {C -> B, "gone"}, {C -> D, …
Ning
  • 2,850
  • 2
  • 16
  • 23
13
votes
3 answers

State pattern and guard

Update: State pattern might a wrong way to solve this. Hence, any other pattern is welcome. Basically I'm looking for a way to have guard conditions for each state yet having a clean and maintainable code. How would front-end side routing systems…
Sam R.
  • 16,027
  • 12
  • 69
  • 122
8
votes
2 answers

difference between state chart,state machine diagrams and state transition diagrams

what are the differences between state chart diagrams, state machine diagrams and state transition diagrams? while at several places i got to learn that state chart diagrams and state machine diagrams mean the same thing but at some places it is…
0decimal0
  • 3,884
  • 2
  • 24
  • 39
7
votes
4 answers

Drawing UML state diagrams

When drawing state diagrams, how do you know which states get put in boxes and which states are for the transition arrows? I noticed that transitions are states too. I'm looking at figure 1 on this page:
neuromancer
  • 53,769
  • 78
  • 166
  • 223
5
votes
1 answer

How to rearrange blocks in a UML state diagram

I just created a state diagram and right now I am struggling with the positions of the blocks. My goal is to have States 1,2,4,5 in a "down"-row and state 3 at the right from state 1. See my UML code and the attached screenshot for the current…
HKC72
  • 502
  • 1
  • 8
  • 22
5
votes
2 answers

One transition with multiple events in UML State diagram

We are learning in school that behavioral State diagram's transition has syntax: list of events [guard condition] / list of actions But I couldn't find any example on Internet where is used transition with multiple events. Is it really possible?…
MacakM
  • 1,804
  • 3
  • 23
  • 46
4
votes
2 answers

State Machine Diagram VS Flowchart

What are the differences and similarities between the state machine diagram and flowchart? So far I found that the state diagram shows us the actual change in the state, not the process or commands like in the flowchart.
4
votes
2 answers

Custom sdl node shape

Graphviz supports SDL shapes, an external image library: How do I use an SDL node shape? I've tried: digraph foo { rankdir=LR; a [shape=sdl_stop, label=""]; b; a -> b; } With: dot -Tpng sdl.dot -o sdl.png Which gave the following…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
3
votes
2 answers

State/transition diagram of lexical analysis - What significance is * (asterisk) to retract the forward pointer?

I'm reading Compilers: Principles, Techniques, and Tools and don't understand this: In addition, if it is necessary to retract the forward pointer one position (i.e., the lexeme does not include the symbol that got us to the accepting …
Pubby
  • 51,882
  • 13
  • 139
  • 180
3
votes
2 answers

Plantuml. How to create finite state machine diagrams?

I want to create a FSM diagram and wanted to use plantuml for that. I stuck with backward arrows There is a way to create backward arrows but it looks overcomplicated and too limited for such a simple task @startuml :start; repeat :Ask to enter…
IC_
  • 1,624
  • 1
  • 23
  • 57
3
votes
3 answers

Do forked nodes have to be joined? UML State Diagram

Do forked nodes have to be be joined in the end? And can outgoing fork nodes have guards? Basically what I'm trying to do is return the change to the customer and continue with the car wash at the same time. But, maybe there's a better way to do…
3
votes
1 answer

UML state diagram for N number of approvals

I am writing my first state diagram for an approvals matrix and I am stuck. An Order in our system will go through a number of states and transitions for approval: States Start (state) (submit() transition) Awaiting Approval (state) (approve()…
Sico
  • 1,183
  • 1
  • 10
  • 16
3
votes
2 answers

How State machine diagram can be represented as a Behavior for an operation in UML?

Behaviors (Method Body)can be state machines or activities - activities are easy to understand, as they are the equivalent of procedural code. I don't understand how a state machine can be used as the behavior for an operation? Could you Please…
user2019510
  • 1,460
  • 5
  • 16
  • 29
2
votes
1 answer

State diagram relationships

Can you tell me please,what types of relationship are there present in state diagrams and how they are represented? There is a lot described about class diagrams, but relationships in state diagrams I can't find anywhere. Thank you.
serhiyiv
  • 183
  • 1
  • 2
  • 10
2
votes
1 answer

Positioning blocks of PlantUML diagram

I'm trying to repeat a diagram using PlantUML. The diagram is like this: I got stuck at trying to add more connections and make them look decent. I started with object digram and came to something like this link to online diagram. As soon as I…
1
2 3 4 5