Skip to content

Commit

Permalink
add deterministic coffee machine examples
Browse files Browse the repository at this point in the history
  • Loading branch information
emuskardin committed Feb 12, 2024
1 parent 5004146 commit 5fa6628
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions DotModels/coffee_mealy.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
digraph coffee_mealy {
s0 [label="s0"];
s1 [label="s1"];
s0 -> s1 [label="coin/ beep"];
s0 -> s0 [label="button/ init"];
s1 -> s1 [label="coin/ beep"];
s1 -> s0 [label="button/ coffee"];
__start0 [label="", shape=none];
__start0 -> s0 [label=""];
}
13 changes: 13 additions & 0 deletions DotModels/coffee_moore.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
digraph g {
__start0 [label="" shape="none"];
__start0 -> A;
A [shape="record", style="rounded", label="{ A | init }"];
B [shape="record", style="rounded", label="{ B | beep }"];
C [shape="doublecircle", style="rounded", label="{ C | coffee }"];
A -> B [label="coin"];
A -> A [label="button"];
B -> C [label="button"];
B -> B [label="coin"];
C -> B [label="coin"];
C -> A [label="button"];
}

0 comments on commit 5fa6628

Please sign in to comment.