Improve ltl_to_taa.

* src/tgba/taa.cc, src/tgba/taa.hh: taa_succ_iterator is not
on-the-fly anymore allowing some redundant transitions to be
removed. Also a new function to output a TAA.
* src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2taa.hh: Add the
refined rules from Tauriainen.
* src/tgbatest/ltl2tgba.cc: Use -c to activate refined rules in
ltl_to_taa.
* src/tgbatest/spotlbtt.test: More tests.
This commit is contained in:
Damien Lefortier 2009-10-22 14:37:30 +02:00
parent 9f47dde5a7
commit 7ce27ef994
7 changed files with 289 additions and 124 deletions

View file

@ -23,6 +23,7 @@
# define SPOT_TGBA_TAA_HH
#include <set>
#include <iosfwd>
#include <vector>
#include "misc/hash.hh"
#include "ltlast/formula.hh"
@ -60,6 +61,9 @@ namespace spot
void add_condition(transition* t, const ltl::formula* f);
void add_acceptance_condition(transition* t, const ltl::formula* f);
/// \brief Output a TAA.
void output(std::ostream& os) const;
/// TGBA interface.
virtual ~taa();
virtual spot::state* get_init_state() const;
@ -117,6 +121,9 @@ namespace spot
/// \brief Return the taa::state_set for \a names.
taa::state_set* add_state_set(const std::vector<std::string>& names);
/// \brief Format a taa::state_set as a string for printing.
std::string format_state_set(const taa::state_set* ss) const;
};
/// Set of states deriving from spot::state.
@ -149,10 +156,7 @@ namespace spot
{
public:
taa_succ_iterator(const taa::state_set* s, bdd all_acc);
virtual ~taa_succ_iterator()
{
}
virtual ~taa_succ_iterator();
virtual void first();
virtual void next();
@ -164,11 +168,12 @@ namespace spot
private:
typedef taa::state::const_iterator iterator;
typedef std::multimap<taa::state_set, taa::transition*> seen_map;
std::vector<std::pair<iterator, iterator> > bounds_;
std::vector<iterator> its_;
std::vector<taa::transition*>::const_iterator i_;
std::vector<taa::transition*> succ_;
bdd all_acceptance_conditions_;
mutable bool empty_;
seen_map seen_;
};
}