dot: fix 'g' with a Mealy machine

* spot/twaalgos/dot.cc: here
* tests/python/mealy.py: add test
This commit is contained in:
Florian Renkin 2022-09-03 14:13:23 +02:00
parent 27816ea438
commit 4d2c096ec0
2 changed files with 21 additions and 3 deletions

View file

@ -1084,9 +1084,12 @@ namespace spot
{
if (aut->acc().is_t())
opt_show_acc_ = false;
bdd out = *p;
opt_mealy_output_ = out;
opt_mealy_ = true;
if (opt_showlabel_)
{
bdd out = *p;
opt_mealy_output_ = out;
opt_mealy_ = true;
}
}
incomplete_ =
aut->get_named_prop<std::set<unsigned>>("incomplete-states");

View file

@ -611,3 +611,18 @@ State: 1
res = spot.reduce_mealy(aut, True)
tc.assertEqual(res.to_str(), exp)
exp = """digraph "" {
rankdir=LR
node [shape="circle"]
I [label="", style=invis, width=0]
I -> 0
0 [label="0"]
0 -> 1 [label=""]
0 -> 1 [label=""]
0 -> 1 [label=""]
1 [label="1"]
1 -> 1 [label=""]
}
"""
tc.assertEqual(res.to_str("dot", "g"), exp)