Strip useless acceptance conditions in scc_filter().
A useless acceptance conditions is one that is always implied by another. * src/misc/bddop.hh, src/misc/bddop.cc (compute_neg_acceptance_conditions): New function. * src/tgba/tgbaexplicit.hh, src/tgba/tgbaexplicit.cc (set_acceptance_conditions): New function. * src/tgbaalgos/scc.cc (build_map, build_scc_stats, dump_scc_dot): Keep track of useful acceptance conditions. (useful_acc_of): New function. * src/tgbaalgos/scc.hh (scc_stats, scc_map::scc::useful_scc): New attributes. * src/tgbaalgos/sccfilter.cc (filter_iter): Adjust to filter useless acceptance conditions. (scc_filter): Compute useful acceptance conditions and pass them to filter_iter.
This commit is contained in:
parent
5d427f6d15
commit
dfb9c6622b
8 changed files with 130 additions and 11 deletions
|
|
@ -59,6 +59,11 @@ namespace spot
|
|||
/// A map of the useless SCCs.
|
||||
std::vector<bool> useless_scc_map;
|
||||
|
||||
/// The set of useful acceptance conditions (i.e. acceptance
|
||||
/// conditions that are not always implied by other acceptance
|
||||
/// conditions).
|
||||
bdd useful_acc;
|
||||
|
||||
std::ostream& dump(std::ostream& out) const;
|
||||
};
|
||||
|
||||
|
|
@ -129,6 +134,12 @@ namespace spot
|
|||
/// \pre This should only be called once build_map() has run.
|
||||
bdd acc_set_of(unsigned n) const;
|
||||
|
||||
/// \brief Return the set of useful acceptance conditions if SCC \a n.
|
||||
///
|
||||
/// Useless acceptances conditions are always implied by other acceptances
|
||||
/// conditions. This returns all the other acceptance conditions.
|
||||
bdd useful_acc_of(unsigned n) const;
|
||||
|
||||
/// \brief Return the set of states of an SCC.
|
||||
///
|
||||
/// The states in the returned list are still owned by the scc_map
|
||||
|
|
@ -154,7 +165,7 @@ namespace spot
|
|||
public:
|
||||
scc(int index) : index(index), acc(bddfalse),
|
||||
supp(bddtrue), supp_rec(bddfalse),
|
||||
trivial(true) {};
|
||||
trivial(true), useful_acc(bddfalse) {};
|
||||
/// Index of the SCC.
|
||||
int index;
|
||||
/// The union of all acceptance conditions of transitions which
|
||||
|
|
@ -172,6 +183,8 @@ namespace spot
|
|||
succ_type succ;
|
||||
/// Trivial SCC have one state and no self-loops.
|
||||
bool trivial;
|
||||
/// Useful acceptance conditions.
|
||||
bdd useful_acc;
|
||||
};
|
||||
|
||||
const tgba* aut_; // Automata to decompose.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue