diff --git a/spot/twaalgos/dot.cc b/spot/twaalgos/dot.cc index 32e581e11..b7e357f6f 100644 --- a/spot/twaalgos/dot.cc +++ b/spot/twaalgos/dot.cc @@ -466,10 +466,25 @@ namespace spot bool max = false; bool odd = false; if (aut_->acc().is_parity(max, odd)) - os_ << nl << "[parity " - << (max ? "max " : "min ") - << (odd ? "odd " : "even ") - << aut_->num_sets() << ']'; + { + os_ << nl << "[parity " + << (max ? "max " : "min ") + << (odd ? "odd " : "even ") + << aut_->num_sets() << ']'; + } + else + { + std::vector r_pairs; + bool r_like = aut_->acc().is_rabin_like(r_pairs); + unsigned rsz = r_pairs.size(); + std::vector s_pairs; + bool s_like = aut_->acc().is_streett_like(s_pairs); + unsigned ssz = s_pairs.size(); + if (r_like && (!s_like || (rsz <= ssz))) + os_ << nl << "[Rabin-like " << rsz << ']'; + else if (s_like && (!r_like || (ssz < rsz))) + os_ << nl << "[Streett-like " << ssz << ']'; + } } } } diff --git a/tests/core/alternating.test b/tests/core/alternating.test index ab2a97a8b..bc74cacdc 100755 --- a/tests/core/alternating.test +++ b/tests/core/alternating.test @@ -559,10 +559,11 @@ EOF run 0 autfilt --dot='sbarf(Lato)' ex7 > ex7.dot color='' +color1='' cat >expect7.dot<❶) & Fin($color)> + label=[Streett-like 2]> labelloc="t" fontname="Lato" node [fontname="Lato"] @@ -658,7 +659,7 @@ run 0 autfilt --dot='sbarf(Lato)' ex8 > ex8.dot cat >expect8.dot<❶) & Fin($color)> + label=[Streett-like 2]> labelloc="t" fontname="Lato" node [fontname="Lato"] diff --git a/tests/core/sccdot.test b/tests/core/sccdot.test index 38c7124bc..ff423059d 100755 --- a/tests/core/sccdot.test +++ b/tests/core/sccdot.test @@ -74,7 +74,7 @@ run 0 autfilt --dot=as in.hoa > out.dot cat <expected digraph G { rankdir=LR - label="(Inf(0)&Inf(1)) & Fin(2)" + label="(Inf(0)&Inf(1)) & Fin(2)\n[Streett-like 3]" labelloc="t" node [shape="circle"] I [label="", style=invis, width=0] diff --git a/tests/python/decompose.ipynb b/tests/python/decompose.ipynb index baba7e9bc..80ccdd004 100644 --- a/tests/python/decompose.ipynb +++ b/tests/python/decompose.ipynb @@ -212,7 +212,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f8a0> >" + " *' at 0x7f71e062e720> >" ] } ], @@ -330,7 +330,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f780> >" + " *' at 0x7f71e062e6f0> >" ] } ], @@ -472,7 +472,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f600> >" + " *' at 0x7f71e062e5d0> >" ] } ], @@ -563,7 +563,7 @@ "\n" ], "text": [ - " *' at 0x7f132c623810> >" + " *' at 0x7f71e062e600> >" ] } ], @@ -641,7 +641,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f810> >" + " *' at 0x7f71e062ef60> >" ] } ], @@ -758,7 +758,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f8d0> >" + " *' at 0x7f71e062e540> >" ] }, { @@ -883,7 +883,7 @@ "\n" ], "text": [ - " *' at 0x7f132c623900> >" + " *' at 0x7f71e062e5a0> >" ] }, { @@ -1027,7 +1027,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f6f0> >" + " *' at 0x7f71e062e450> >" ] } ], @@ -1433,7 +1433,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bd630> >" + " *' at 0x7f71e064d4b0> >" ] } ], @@ -1759,7 +1759,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f8d0> >" + " *' at 0x7f71e064d480> >" ] }, { @@ -1957,7 +1957,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f6f0> >" + " *' at 0x7f71e062eed0> >" ] }, { @@ -2138,7 +2138,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f7b0> >" + " *' at 0x7f71e062e450> >" ] } ], @@ -2474,7 +2474,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bd0f0> >" + " *' at 0x7f71e376f660> >" ] } ], @@ -2619,7 +2619,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f7e0> >" + " *' at 0x7f71e064d540> >" ] }, { @@ -2739,7 +2739,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bd690> >" + " *' at 0x7f71e062ef00> >" ] }, { @@ -2920,7 +2920,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f6f0> >" + " *' at 0x7f71e062e480> >" ] } ], @@ -3278,7 +3278,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bd6c0> >" + " *' at 0x7f71e064d480> >" ] } ], @@ -3569,7 +3569,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f7e0> >" + " *' at 0x7f71e064d540> >" ] }, { @@ -3722,7 +3722,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f5a0> >" + " *' at 0x7f71e062e3f0> >" ] }, { @@ -3860,7 +3860,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f6f0> >" + " *' at 0x7f71e062ef00> >" ] } ], @@ -4164,7 +4164,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bd5d0> >" + " *' at 0x7f71e064d5d0> >" ] } ], @@ -4276,7 +4276,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bdab0> >" + " *' at 0x7f71e064d810> >" ] } ], @@ -4369,7 +4369,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f750> >" + " *' at 0x7f71e064da20> >" ] }, { @@ -4436,7 +4436,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f750> >" + " *' at 0x7f71e062e3f0> >" ] } ], @@ -4523,7 +4523,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bd750> >" + " *' at 0x7f71e064da80> >" ] } ], @@ -4585,16 +4585,17 @@ "\n", "\n", - "\n", - "\n", + "\n", + "\n", "G\n", - "\n", - "Inf(\n", - "\u24ff\n", - ") | Fin(\n", - "\u24ff\n", - ")\n", + "\n", + "Inf(\n", + "\u24ff\n", + ") | Fin(\n", + "\u24ff\n", + ")\n", + "[Streett-like 1]\n", "cluster_0\n", "\n", "\n", @@ -4678,7 +4679,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bd600> >" + " *' at 0x7f71e064db40> >" ] } ], @@ -4808,7 +4809,7 @@ "\n" ], "text": [ - " *' at 0x7f132c59f5a0> >" + " *' at 0x7f71e064dc00> >" ] }, { @@ -4897,7 +4898,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bd120> >" + " *' at 0x7f71e062e3f0> >" ] }, { @@ -5015,7 +5016,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bddb0> >" + " *' at 0x7f71e064dcc0> >" ] } ], @@ -5199,7 +5200,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5570f0> >" + " *' at 0x7f71e05e74b0> >" ] }, { @@ -5310,7 +5311,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bd9c0> >" + " *' at 0x7f71e064d780> >" ] } ], @@ -5401,7 +5402,7 @@ "\n" ], "text": [ - " *' at 0x7f132c5bdbd0> >" + " *' at 0x7f71e064d420> >" ] } ], diff --git a/tests/python/randaut.ipynb b/tests/python/randaut.ipynb index 5ad351bdf..9e1ac5953 100644 --- a/tests/python/randaut.ipynb +++ b/tests/python/randaut.ipynb @@ -35,7 +35,7 @@ "language": "python", "metadata": {}, "outputs": [], - "prompt_number": 1 + "prompt_number": 2 }, { "cell_type": "markdown", @@ -1201,19 +1201,20 @@ "p0 & p1\n", "\n", "\n", - "\n", - "\n", + "\n", + "\n", "G\n", - "\n", - "(Fin(\n", - "\u2777\n", - ") | Inf(\n", - "\u2776\n", - ")) & (Inf(\n", - "\u24ff\n", - ")&Inf(\n", - "\u2778\n", - "))\n", + "\n", + "(Fin(\n", + "\u2777\n", + ") | Inf(\n", + "\u2776\n", + ")) & (Inf(\n", + "\u24ff\n", + ")&Inf(\n", + "\u2778\n", + "))\n", + "[Streett-like 3]\n", "\n", "\n", "0\n", @@ -1305,19 +1306,20 @@ "!p0 & p1\n", "\n", "\n", - "\n", - "\n", + "\n", + "\n", "G\n", - "\n", - "(Fin(\n", - "\u2777\n", - ") | Inf(\n", - "\u2776\n", - ")) & (Inf(\n", - "\u24ff\n", - ")&Inf(\n", - "\u2778\n", - "))\n", + "\n", + "(Fin(\n", + "\u2777\n", + ") | Inf(\n", + "\u2776\n", + ")) & (Inf(\n", + "\u24ff\n", + ")&Inf(\n", + "\u2778\n", + "))\n", + "[Streett-like 3]\n", "\n", "\n", "0\n", @@ -2085,19 +2087,20 @@ "\u2777\n", "\n", "\n", - "\n", - "\n", + "\n", + "\n", "G\n", - "\n", - "(Fin(\n", - "\u2777\n", - ")|Fin(\n", - "\u2778\n", - ")) | (Inf(\n", - "\u24ff\n", - ") & Fin(\n", - "\u2776\n", - "))\n", + "\n", + "(Fin(\n", + "\u2777\n", + ")|Fin(\n", + "\u2778\n", + ")) | (Inf(\n", + "\u24ff\n", + ") & Fin(\n", + "\u2776\n", + "))\n", + "[Rabin-like 3]\n", "\n", "\n", "0\n", @@ -2177,19 +2180,20 @@ "p0 & !p1\n", "\n", "\n", - "\n", - "\n", + "\n", + "\n", "G\n", - "\n", - "(Fin(\n", - "\u2777\n", - ")|Fin(\n", - "\u2778\n", - ")) | (Inf(\n", - "\u24ff\n", - ") & Fin(\n", - "\u2776\n", - "))\n", + "\n", + "(Fin(\n", + "\u2777\n", + ")|Fin(\n", + "\u2778\n", + ")) | (Inf(\n", + "\u24ff\n", + ") & Fin(\n", + "\u2776\n", + "))\n", + "[Rabin-like 3]\n", "\n", "\n", "0\n", @@ -2273,22 +2277,13 @@ ], "metadata": {}, "output_type": "pyout", - "prompt_number": 2, + "prompt_number": 3, "text": [ "" ] } ], - "prompt_number": 2 - }, - { - "cell_type": "code", - "collapsed": false, - "input": [], - "language": "python", - "metadata": {}, - "outputs": [], - "prompt_number": null + "prompt_number": 3 } ], "metadata": {}