Commit 2e15ed95 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

decompose_strength: work with inherently weak SCCs

* wrap/python/tests/decompose.ipynb: Adjust text.
* spot/twaalgos/strength.hh, spot/twaalgos/strength.cc:
Adjust to extract inherently weak SCCs instead of weak SCCs.  This gets
rids of the special handling for the "corner cases".
* spot/tests/strength.test: Adjust.
* NEWS: Mention it.
parent 9bbcf85b
......@@ -29,6 +29,10 @@ New in spot 1.99.6a (not yet released)
check_strength() has been modified to also check inherently weak
automata.
* decompose_strength() is now extracting inherently weak SCCs
instead of just weak SCCs. This gets rid of some corner cases
that used to require ad hoc handling.
Python:
Documentation:
......
......@@ -264,6 +264,21 @@ State: 1 {0}
HOA: v1
States: 2
Start: 0
AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc colored complete
properties: deterministic terminal
--BODY--
State: 0 {0}
[0] 1
[!0] 0
State: 1 {0}
[t] 0
--END--
HOA: v1
States: 2
Start: 0
AP: 0
acc-name: Buchi
Acceptance: 1 Inf(0)
......@@ -334,20 +349,6 @@ State: 2
HOA: v1
States: 2
Start: 0
AP: 1 "a"
Acceptance: 2 Inf(0) | Inf(1)
properties: trans-labels explicit-labels trans-acc colored complete
properties: deterministic
--BODY--
State: 0
[0] 1 {1}
[!0] 0 {0}
State: 1
[t] 0 {0}
--END--
HOA: v1
States: 2
Start: 0
AP: 2 "a" "c"
acc-name: Buchi
Acceptance: 1 Inf(0)
......@@ -393,6 +394,21 @@ State: 1 {0}
HOA: v1
States: 2
Start: 0
AP: 1 "a"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels state-acc colored complete
properties: deterministic weak
--BODY--
State: 0 {0}
[0] 1
[!0] 0
State: 1 {0}
[t] 0
--END--
HOA: v1
States: 2
Start: 0
AP: 0
acc-name: Buchi
Acceptance: 1 Inf(0)
......@@ -444,20 +460,6 @@ State: 4
--END--
/******************************/
HOA: v1
States: 2
Start: 0
AP: 1 "a"
Acceptance: 2 Inf(0) | Inf(1)
properties: trans-labels explicit-labels trans-acc colored complete
properties: deterministic
--BODY--
State: 0
[0] 1 {1}
[!0] 0 {0}
State: 1
[t] 0 {0}
--END--
HOA: v1
States: 1
Start: 0
AP: 1 "a"
......@@ -523,7 +525,7 @@ Start: 0
AP: 1 "a"
Acceptance: 2 Inf(0) | Inf(1)
properties: trans-labels explicit-labels trans-acc colored complete
properties: deterministic
properties: deterministic weak
--BODY--
State: 0
[0] 1 {1}
......
......@@ -199,7 +199,7 @@ namespace spot
{
if (si.is_accepting_scc(i))
{
if (all_accepting | is_weak_scc(si, i))
if (all_accepting | is_inherently_weak_scc(si, i))
{
if (keep & Weak)
{
......
......@@ -87,15 +87,21 @@ namespace spot
///
/// The string \a keep should be a non-empty combination of
/// the following letters:
/// - 'w': keep only weak SCCs (i.e., SCCs in which all transitions belong
/// to the same acceptance sets) that are not terminal.
/// - 't': keep terminal SCCs (i.e., weak SCCs that are complete)
/// - 's': keep strong SCCs (i.e., SCCs that are not weak).
/// - 'w': keep only inherently weak SCCs (i.e., SCCs in which
/// all transitions belong to the same acceptance sets) that
/// are not terminal.
/// - 't': keep terminal SCCs (i.e., inherently weak SCCs that are complete)
/// - 's': keep strong SCCs (i.e., SCCs that are not inherently weak).
///
/// This algorithm returns a subautomaton that contains all SCCs of the
/// requested strength, plus any upstream SCC (but adjusted not to be
/// accepting).
///
/// The definition are basically those used in the following paper,
/// except that we extra the "inherently weak" part instead of the
/// weak part because we can now test for inherent weakness
/// efficiently enough (not enumerating all cycles as suggested in
/// the paper).
/** \verbatim
@inproceedings{renault.13.tacas,
author = {Etienne Renault and Alexandre Duret-Lutz and Fabrice
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment