rename two confusing methods of emptiness_check_instantiator
* spot/twaalgos/emptiness.hh (emptiness_check_instantiator): rename min_acceptance_conditions and max_acceptance_conditions to min_sets and max_sets. * spot/twaalgos/emptiness.cc, python/ajax/spotcgi.in, tests/core/ikwiad.cc, tests/core/emptchk.cc, tests/core/randtgba.cc: Adjust. * doc/org/upgrade2.org, NEWS: Mention the change.
This commit is contained in:
parent
cf79cefd9a
commit
ad08a585af
8 changed files with 76 additions and 70 deletions
4
NEWS
4
NEWS
|
|
@ -3,6 +3,10 @@ New in spot 1.99.8a (not yet released)
|
||||||
Library:
|
Library:
|
||||||
|
|
||||||
* twa::ap_var() renamed to twa::ap_vars().
|
* twa::ap_var() renamed to twa::ap_vars().
|
||||||
|
* emptiness_check_instantiator::min_acceptance_conditions() and
|
||||||
|
emptiness_check_instantiator::max_acceptance_conditions() renamed
|
||||||
|
to emptiness_check_instantiator::min_sets() and
|
||||||
|
emptiness_check_instantiator::max_sets().
|
||||||
|
|
||||||
Documentation:
|
Documentation:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -610,12 +610,15 @@ for (auto i: aut->succ(s))
|
||||||
have been renamed.
|
have been renamed.
|
||||||
|
|
||||||
| old name | new name | comment |
|
| old name | new name | comment |
|
||||||
|-------------------------------------------------------+---------------------------------------------+-----------------------------------------------------------|
|
|-------------------------------------------------------------+---------------------------------------------+-----------------------------------------------------------|
|
||||||
| ~dstar_parse()~ | ~parse_aut()~ | single parser for all automata |
|
| ~dstar_parse()~ | ~parse_aut()~ | single parser for all automata |
|
||||||
| ~dtgba_complement()~ | ~dtwa_complement()~ | |
|
| ~dtgba_complement()~ | ~dtwa_complement()~ | |
|
||||||
| ~dupexp_bfs()~ | | deleted |
|
| ~dupexp_bfs()~ | | deleted |
|
||||||
| ~dupexp_dfs()~ | ~copy()~ | |
|
| ~dupexp_dfs()~ | ~copy()~ | |
|
||||||
| ~format_parse_aut_errors()~ | ~parsed_aut::format_errors()~ | |
|
| ~format_parse_aut_errors()~ | ~parsed_aut::format_errors()~ | |
|
||||||
|
| ~emptiness_check_instantiator::construct()~ | ~make_emptiness_check_instantiator()~ | |
|
||||||
|
| ~emptiness_check_instantiator::max_acceptance_conditions()~ | ~emptiness_check_instantiator::max_sets()~ | |
|
||||||
|
| ~emptiness_check_instantiator::min_acceptance_conditions()~ | ~emptiness_check_instantiator::min_sets()~ | |
|
||||||
| ~hoaf_reachable()~ | ~print_hoa()~ | |
|
| ~hoaf_reachable()~ | ~print_hoa()~ | |
|
||||||
| ~is_guarantee_automaton()~ | ~is_terminal_automaton()~ | |
|
| ~is_guarantee_automaton()~ | ~is_terminal_automaton()~ | |
|
||||||
| ~kripke_parse()~ | ~parse_aut()~ | single parser for all automata |
|
| ~kripke_parse()~ | ~parse_aut()~ | single parser for all automata |
|
||||||
|
|
|
||||||
|
|
@ -803,8 +803,8 @@ if output_type == 'r':
|
||||||
else:
|
else:
|
||||||
ec_a = 0
|
ec_a = 0
|
||||||
n_acc = degen.acc().num_sets()
|
n_acc = degen.acc().num_sets()
|
||||||
n_max = eci.max_acceptance_conditions()
|
n_max = eci.max_sets()
|
||||||
n_min = eci.min_acceptance_conditions()
|
n_min = eci.min_sets()
|
||||||
if (n_acc <= n_max):
|
if (n_acc <= n_max):
|
||||||
if (n_acc >= n_min):
|
if (n_acc >= n_min):
|
||||||
ec_a = degen
|
ec_a = degen
|
||||||
|
|
|
||||||
|
|
@ -143,13 +143,13 @@ namespace spot
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
emptiness_check_instantiator::min_acceptance_conditions() const
|
emptiness_check_instantiator::min_sets() const
|
||||||
{
|
{
|
||||||
return static_cast<ec_algo*>(info_)->min_acc;
|
return static_cast<ec_algo*>(info_)->min_acc;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
emptiness_check_instantiator::max_acceptance_conditions() const
|
emptiness_check_instantiator::max_sets() const
|
||||||
{
|
{
|
||||||
return static_cast<ec_algo*>(info_)->max_acc;
|
return static_cast<ec_algo*>(info_)->max_acc;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -224,15 +224,15 @@ namespace spot
|
||||||
}
|
}
|
||||||
/// @}
|
/// @}
|
||||||
|
|
||||||
/// \brief Minimum number of acceptance conditions supported by
|
/// \brief Minimum number of acceptance sets supported by
|
||||||
/// the emptiness check.
|
/// the emptiness check.
|
||||||
unsigned int min_acceptance_conditions() const;
|
unsigned int min_sets() const;
|
||||||
|
|
||||||
/// \brief Maximum number of acceptance conditions supported by
|
/// \brief Maximum number of acceptance conditions supported by
|
||||||
/// the emptiness check.
|
/// the emptiness check.
|
||||||
///
|
///
|
||||||
/// \return \c -1U if no upper bound exists.
|
/// \return \c -1U if no upper bound exists.
|
||||||
unsigned int max_acceptance_conditions() const;
|
unsigned int max_sets() const;
|
||||||
protected:
|
protected:
|
||||||
emptiness_check_instantiator(option_map o, void* i);
|
emptiness_check_instantiator(option_map o, void* i);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,7 @@ main(int argc, char** argv)
|
||||||
auto a = aut[j];
|
auto a = aut[j];
|
||||||
std::cout << "** Testing aut[" << j << "] using " << algo << '\n';
|
std::cout << "** Testing aut[" << j << "] using " << algo << '\n';
|
||||||
unsigned n_acc = a->acc().num_sets();
|
unsigned n_acc = a->acc().num_sets();
|
||||||
unsigned n_max = i->max_acceptance_conditions();
|
unsigned n_max = i->max_sets();
|
||||||
if (n_max < n_acc)
|
if (n_max < n_acc)
|
||||||
{
|
{
|
||||||
std::cout << "Skipping because automaton has " << n_acc
|
std::cout << "Skipping because automaton has " << n_acc
|
||||||
|
|
@ -140,7 +140,7 @@ main(int argc, char** argv)
|
||||||
<< " accepts at most " << n_max << ".\n";
|
<< " accepts at most " << n_max << ".\n";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
unsigned n_min = i->min_acceptance_conditions();
|
unsigned n_min = i->min_sets();
|
||||||
if (n_min > n_acc)
|
if (n_min > n_acc)
|
||||||
{
|
{
|
||||||
std::cout << "Skipping because automaton has " << n_acc
|
std::cout << "Skipping because automaton has " << n_acc
|
||||||
|
|
|
||||||
|
|
@ -1103,7 +1103,7 @@ checked_main(int argc, char** argv)
|
||||||
if (echeck_inst
|
if (echeck_inst
|
||||||
&& degeneralize_opt == NoDegen
|
&& degeneralize_opt == NoDegen
|
||||||
&& n_acc > 1
|
&& n_acc > 1
|
||||||
&& echeck_inst->max_acceptance_conditions() < n_acc)
|
&& echeck_inst->max_sets() < n_acc)
|
||||||
{
|
{
|
||||||
degeneralize_opt = DegenTBA;
|
degeneralize_opt = DegenTBA;
|
||||||
assume_sba = false;
|
assume_sba = false;
|
||||||
|
|
@ -1334,7 +1334,7 @@ checked_main(int argc, char** argv)
|
||||||
if (echeck_inst
|
if (echeck_inst
|
||||||
&& degeneralize_opt == NoDegen
|
&& degeneralize_opt == NoDegen
|
||||||
&& n_acc > 1
|
&& n_acc > 1
|
||||||
&& echeck_inst->max_acceptance_conditions() < n_acc)
|
&& echeck_inst->max_sets() < n_acc)
|
||||||
degeneralize_opt = DegenTBA;
|
degeneralize_opt = DegenTBA;
|
||||||
if (degeneralize_opt == DegenTBA)
|
if (degeneralize_opt == DegenTBA)
|
||||||
{
|
{
|
||||||
|
|
@ -1359,13 +1359,13 @@ checked_main(int argc, char** argv)
|
||||||
|
|
||||||
|
|
||||||
if (echeck_inst
|
if (echeck_inst
|
||||||
&& (a->acc().num_sets() < echeck_inst->min_acceptance_conditions()))
|
&& (a->acc().num_sets() < echeck_inst->min_sets()))
|
||||||
{
|
{
|
||||||
if (!paper_opt)
|
if (!paper_opt)
|
||||||
{
|
{
|
||||||
std::cerr << echeck_algo << " requires at least "
|
std::cerr << echeck_algo << " requires at least "
|
||||||
<< echeck_inst->min_acceptance_conditions()
|
<< echeck_inst->min_sets()
|
||||||
<< " acceptance conditions." << std::endl;
|
<< " acceptance sets." << std::endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -86,8 +86,7 @@ cons_emptiness_check(int num, spot::const_twa_graph_ptr a,
|
||||||
unsigned int n_acc)
|
unsigned int n_acc)
|
||||||
{
|
{
|
||||||
auto inst = ec_algos[num].inst;
|
auto inst = ec_algos[num].inst;
|
||||||
if (n_acc < inst->min_acceptance_conditions()
|
if (n_acc < inst->min_sets() || n_acc > inst->max_sets())
|
||||||
|| n_acc > inst->max_acceptance_conditions())
|
|
||||||
a = degen;
|
a = degen;
|
||||||
if (a)
|
if (a)
|
||||||
return inst->instantiate(a);
|
return inst->instantiate(a);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue