* src/tgbaalgos/emptiness.hh (emptiness_check, emptiness_check_result):

Add the TGBA considered as a protected attribute, and provide an
automaton() accessor.
* src/tgbaalgos/gv04.cc, src/tgbaalgos/magic.cc, src/tgbaalgos/se05.cc,
src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03opt.cc,
src/tgbaalgos/gtec/ce.cc, src/tgbaalgos/gtec/gtec.cc: Adjust to follow
this new interface.
This commit is contained in:
Alexandre Duret-Lutz 2004-11-25 12:51:04 +00:00
parent 16e54b2fc4
commit f47f955a34
9 changed files with 97 additions and 77 deletions

View file

@ -73,6 +73,11 @@ namespace spot
class emptiness_check_result
{
public:
emptiness_check_result(const tgba* a)
: a_(a)
{
}
/// \brief Return a run accepted by the automata passed to
/// the emptiness check.
///
@ -86,14 +91,34 @@ namespace spot
/// is no counter-example; the mere existence of an instance of
/// this class asserts the existence of a counter-example).
virtual tgba_run* accepting_run();
/// The automaton on which an accepting_run() was found.
const tgba*
automaton() const
{
return a_;
}
protected:
const tgba* a_; ///< The automaton.
};
/// Common interface to emptiness check algorithms.
class emptiness_check
{
public:
emptiness_check(const tgba* a)
: a_(a)
{
}
virtual ~emptiness_check();
/// The automaton that this emptiness-check inspects.
const tgba*
automaton() const
{
return a_;
}
/// \brief Check whether the automaton contain an accepting run.
///
/// Return 0 if the automaton accept no run. Return an instance
@ -108,6 +133,9 @@ namespace spot
/// Print statistics, if any.
virtual std::ostream& print_stats(std::ostream& os) const;
protected:
const tgba* a_; ///< The automaton.
};
/// @}