tgba: move boolean properties from tgba_digraph to tgba

* src/tgba/tgbagraph.hh: Remove the set_bprop/get_bprop interface.
* src/tgba/tgba.cc, src/tgba/tgba.hh: Add a new interface for
setting/querying/copying the following properties: single_acc_set,
state_based_acc, inherently_weak, deterministic.
* src/dstarparse/dra2ba.cc, src/dstarparse/nra2nba.cc,
src/neverparse/neverclaimparse.yy, src/saba/sabacomplementtgba.cc,
src/tgba/tgbagraph.cc, src/tgbaalgos/degen.cc, src/tgbaalgos/dotty.cc,
src/tgbaalgos/isdet.cc, src/tgbaalgos/lbtt.cc,
src/tgbaalgos/minimize.cc, src/tgbaalgos/neverclaim.cc,
src/tgbaalgos/postproc.cc, src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/simulation.cc, src/tgbatest/degenlskip.test,
src/tgbatest/ltl2tgba.cc: Adjust to the new interface, or use
it to bypass some useless work.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-15 16:10:39 +02:00
parent e3b5119f25
commit b43f75e917
19 changed files with 160 additions and 87 deletions

View file

@ -122,7 +122,7 @@ namespace spot
auto dict = a->get_dict();
auto res = make_tgba_digraph(dict);
res->copy_ap_of(a);
res->set_bprop(tgba_digraph::StateBasedAcc);
res->prop_state_based_acc();
// For each set, create a state in the resulting automaton.
// For a state s, state_num[s] is the number of the state in the minimal
@ -499,8 +499,10 @@ namespace spot
// non_final contain all states.
// final is empty: there is no acceptance condition
build_state_set(det_a, non_final);
return minimize_dfa(det_a, final, non_final);
auto res = minimize_dfa(det_a, final, non_final);
res->prop_deterministic();
res->prop_inherently_weak();
return res;
}
tgba_digraph_ptr minimize_wdba(const const_tgba_ptr& a)
@ -599,7 +601,10 @@ namespace spot
}
}
return minimize_dfa(det_a, final, non_final);
auto res = minimize_dfa(det_a, final, non_final);
res->prop_deterministic();
res->prop_inherently_weak();
return res;
}
tgba_digraph_ptr
@ -618,6 +623,11 @@ namespace spot
return std::const_pointer_cast<tgba_digraph>(aut_f);
}
// If the input automaton was already weak and deterministic, the
// output is necessary correct.
if (aut_f->is_inherently_weak() && aut_f->is_deterministic())
return min_aut_f;
// if f is a syntactic obligation formula, the WDBA minimization
// must be correct.
if (f && f->is_syntactic_obligation())