Preliminirary support for generic acceptance.

* src/tgba/acc.hh: Add creation and printing of generic acceptance
code.
* src/tgba/acc.cc: New file.
* src/tgba/Makefile.am: Add it.
* src/tgbatest/acc.cc: More tests.
* src/tgbatest/acc.test: Update.
* src/tgba/tgba.hh (set_acceptance, get_acceptance): New methods.
* src/tgba/tgbagraph.hh: Store acceptance code.
* src/hoaparse/hoaparse.yy: Read any acceptance.
* src/dstarparse/nsa2tgba.cc, src/ta/taexplicit.cc,
src/tgba/tgbaproduct.cc, src/tgba/tgbasafracomplement.cc,
src/tgbaalgos/degen.cc, src/tgbaalgos/hoa.cc,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/product.cc, src/tgbaalgos/stutter.cc,
src/tgbatest/hoaparse.test: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2015-02-18 11:28:03 +01:00
parent c61f053e2d
commit fd1f6c4d61
19 changed files with 778 additions and 176 deletions

View file

@ -334,6 +334,7 @@ namespace spot
return g_.trans_data(t);
}
// FIXME: Should be renamed as set_generalized_buchi()
void set_acceptance_conditions(unsigned num)
{
if (num < acc_.num_sets())
@ -342,9 +343,10 @@ namespace spot
new (&acc_) acc_cond;
}
acc_.add_sets(num - acc_.num_sets());
prop_single_acc_set(num == 1);
prop_single_acc_set(!acc_.uses_fin_acceptance() && num == 1);
if (num == 0)
prop_state_based_acc();
acc_.set_generalized_buchi();
}
acc_cond::mark_t set_single_acceptance_set()
@ -429,7 +431,12 @@ namespace spot
/// \brief Copy the acceptance conditions of another tgba.
void copy_acceptance_conditions_of(const const_tgba_ptr& a)
{
set_acceptance_conditions(a->acc().num_sets());
// FIXME: Should rename as copy_acceptance_condition*_of
acc_ = a->acc();
unsigned num = acc_.num_sets();
prop_single_acc_set(!acc_.uses_fin_acceptance() && num == 1);
if (num == 0)
prop_state_based_acc();
}
void copy_ap_of(const const_tgba_ptr& a)