parseaut: Add a trust_hoa option.
Fixes #114. * src/parseaut/public.hh: Add support for a trust_hoa option. * src/parseaut/parseaut.yy: If trust_hoa is set, recognize the "inherently-weak" and "stutter-invariant" properties. * src/bin/common_conv.cc, src/bin/common_conv.hh (read_automaton): Move... * src/bin/common_hoaread.cc, src/bin/common_hoaread.hh: ... in this new file, that also handle the --trust-hoa option. * src/bin/Makefile.am: Add them. * src/bin/autfilt.cc, src/bin/dstar2tgba.cc, src/bin/ltlcross.cc, src/bin/ltldo.cc: Use them. * src/tests/parseaut.test, src/tests/ltldo.test: Adjust, and test --trust-hoa=no. * src/tests/complement.test, src/tests/prodor.test, src/tests/sbacc.test: Adjust. * wrap/python/spot.py (automata): Add option trust_hoa. * NEWS: Update.
This commit is contained in:
parent
585e29e7d8
commit
51a75a316d
18 changed files with 221 additions and 38 deletions
|
|
@ -78,6 +78,7 @@ extern "C" int strverscmp(const char *s1, const char *s2);
|
|||
spot::location used_loc;
|
||||
};
|
||||
spot::parsed_aut_ptr h;
|
||||
spot::automaton_parser_options opts;
|
||||
std::string format_version;
|
||||
spot::location format_version_loc;
|
||||
spot::environment* env;
|
||||
|
|
@ -423,6 +424,16 @@ header: format-version header-items
|
|||
res.complete = true;
|
||||
}
|
||||
}
|
||||
if (res.opts.trust_hoa)
|
||||
{
|
||||
auto e = res.props.end();
|
||||
bool si = res.props.find("stutter-invariant") != e;
|
||||
res.h->aut->prop_stutter_invariant(si);
|
||||
bool ss = res.props.find("stutter-sensitive") != e;
|
||||
res.h->aut->prop_stutter_sensitive(ss);
|
||||
bool iw = res.props.find("inherently-weak") != e;
|
||||
res.h->aut->prop_inherently_weak(iw);
|
||||
}
|
||||
}
|
||||
|
||||
version: IDENTIFIER
|
||||
|
|
@ -1927,6 +1938,7 @@ namespace spot
|
|||
{
|
||||
restart:
|
||||
result_ r;
|
||||
r.opts = opts_;
|
||||
r.h = std::make_shared<spot::parsed_aut>();
|
||||
r.h->aut = make_twa_graph(dict);
|
||||
r.env = &env;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue