Skip to content

Finite-state machine

Engine
dot
Command, both sides
dot -Kdot -Tsvg input.gv
Features
rankdir=LRedge labelsdoublecircle
Result
identical on macOSidentical under portable math
Comparing…
C Graphviz 16.1.0 output, cyan plategraphviz-pure, native macOS build output, magenta plate

C onlyport onlyboth: in register

Input

fsm.gv
digraph finite_state_machine {
node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;
node [shape = circle];
rankdir=LR;
LR_0 -> LR_2 [ label = "SS(B)" ];
LR_0 -> LR_1 [ label = "SS(S)" ];
LR_1 -> LR_3 [ label = "S($end)" ];
LR_2 -> LR_6 [ label = "SS(b)" ];
LR_2 -> LR_5 [ label = "SS(a)" ];
LR_2 -> LR_4 [ label = "S(A)" ];
LR_5 -> LR_7 [ label = "S(b)" ];
LR_5 -> LR_5 [ label = "S(a)" ];
LR_6 -> LR_6 [ label = "S(b)" ];
LR_6 -> LR_5 [ label = "S(a)" ];
LR_7 -> LR_8 [ label = "S(b)" ];
LR_7 -> LR_5 [ label = "S(a)" ];
LR_8 -> LR_6 [ label = "S(b)" ];
LR_8 -> LR_5 [ label = "S(a)" ];
}

Files

FileBytesSHA-256
input.gv605
c.svg C9,758c5f9528b6b9eea9a1338ae59b3e4334a104a7afd5d0966fa35966d021e684153
rust.svg Rust9,76976704f31d571a447462eca0e38c38eef9f3b66f558dc43c4619ccc51a44a103f

The two hashes differ even when the outputs are identical, because each file keeps its own generator comment. Made by scripts/site-samples.sh.