support for semi-deterministic property
* spot/twa/twa.hh (prop_semi_deterministic): New methods. * spot/parseaut/parseaut.yy, spot/twaalgos/hoa.cc: Add support for the semi-deterministic property. * doc/org/concepts.org, doc/org/hoa.org: Document it. * spot/twaalgos/isdet.cc, spot/twaalgos/isdet.hh (is_semi_deterministic): New function. * bin/autfilt.cc: Add --is-semi-deterministic. * bin/common_aoutput.cc: Add --check=semi-deterministic. * tests/core/semidet.test: New file. * tests/Makefile.am: Add it. * tests/core/parseaut.test, tests/core/readsave.test: Adjust.
This commit is contained in:
parent
db5d9780f1
commit
4b01387817
14 changed files with 265 additions and 50 deletions
|
|
@ -34,6 +34,7 @@
|
|||
#include <spot/twaalgos/neverclaim.hh>
|
||||
#include <spot/twaalgos/strength.hh>
|
||||
#include <spot/twaalgos/stutter.hh>
|
||||
#include <spot/twaalgos/isdet.hh>
|
||||
|
||||
automaton_format_t automaton_format = Hoa;
|
||||
static const char* automaton_format_opt = nullptr;
|
||||
|
|
@ -45,6 +46,7 @@ enum check_type
|
|||
check_unambiguous = (1 << 0),
|
||||
check_stutter = (1 << 1),
|
||||
check_strength = (1 << 2),
|
||||
check_semi_determinism = (1 << 3),
|
||||
check_all = -1U,
|
||||
};
|
||||
static char const *const check_args[] =
|
||||
|
|
@ -54,6 +56,7 @@ static char const *const check_args[] =
|
|||
"stutter-insensitive", "stuttering-insensitive",
|
||||
"stutter-sensitive", "stuttering-sensitive",
|
||||
"strength", "weak", "terminal",
|
||||
"semi-determinism", "semi-deterministic",
|
||||
"all",
|
||||
nullptr
|
||||
};
|
||||
|
|
@ -64,6 +67,7 @@ static check_type const check_types[] =
|
|||
check_stutter, check_stutter,
|
||||
check_stutter, check_stutter,
|
||||
check_strength, check_strength, check_strength,
|
||||
check_semi_determinism, check_semi_determinism,
|
||||
check_all
|
||||
};
|
||||
ARGMATCH_VERIFY(check_args, check_types);
|
||||
|
|
@ -527,6 +531,8 @@ automaton_printer::print(const spot::twa_graph_ptr& aut,
|
|||
spot::check_unambiguous(aut);
|
||||
if (opt_check & check_strength)
|
||||
spot::check_strength(aut);
|
||||
if (opt_check & check_semi_determinism)
|
||||
spot::is_semi_deterministic(aut); // sets the property as a side effect.
|
||||
}
|
||||
|
||||
// Name the output automaton.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue