* src/tgbaalgos/emptinesscheck.hh (emptiness_check::emptiness_check):
New, take the automaton to work on, and store it ... (emptiness_check::aut_): ... in this new attribute. (emptiness_check::tgba_emptiness_check): Rename as ... (emptiness_check::check): ... this, and remove the automata argument. (emptiness_check::counter_example, emptiness_check::print_result, emptiness_check::remove_component, emptiness_check::accepting_path, emptiness_check::complete_cycle): Remove the automata argument. * src/tgbaalgos/emptinesscheck.cc, src/tgbatest/ltl2tgba.cc, iface/gspn/ltlgspn.cc: Adjust.
This commit is contained in:
parent
b60722bc58
commit
90099e47a6
6 changed files with 101 additions and 104 deletions
|
|
@ -35,44 +35,47 @@ namespace spot
|
|||
set_of_state state_set;
|
||||
};
|
||||
|
||||
/// \brief Check whether the language of an automate is empty.
|
||||
///
|
||||
/// This is based on the following paper.
|
||||
/// \verbatim
|
||||
/// @InProceedings{couvreur.99.fm,
|
||||
/// author = {Jean-Michel Couvreur},
|
||||
/// title = {On-the-fly Verification of Temporal Logic},
|
||||
/// pages = {253--271},
|
||||
/// editor = {Jeannette M. Wing and Jim Woodcock and Jim Davies},
|
||||
/// booktitle = {Proceedings of the World Congress on Formal Methods in
|
||||
/// the Development of Computing Systems (FM'99)},
|
||||
/// publisher = {Springer-Verlag},
|
||||
/// series = {Lecture Notes in Computer Science},
|
||||
/// volume = {1708},
|
||||
/// year = {1999},
|
||||
/// address = {Toulouse, France},
|
||||
/// month = {September},
|
||||
/// isbn = {3-540-66587-0}
|
||||
/// }
|
||||
/// \endverbatim
|
||||
class emptiness_check
|
||||
{
|
||||
typedef std::map<const spot::state*, int, spot::state_ptr_less_than> seen;
|
||||
typedef std::list<const state*> state_sequence;
|
||||
typedef std::pair<const spot::state*, bdd> state_proposition;
|
||||
typedef std::list<state_proposition> cycle_path;
|
||||
|
||||
public:
|
||||
emptiness_check(const tgba* a);
|
||||
|
||||
/// This function returns true if the automata's language is empty,
|
||||
/// and builds a stack of SCC.
|
||||
///
|
||||
/// This is based on the following paper.
|
||||
/// \verbatim
|
||||
/// @InProceedings{couvreur.99.fm,
|
||||
/// author = {Jean-Michel Couvreur},
|
||||
/// title = {On-the-fly Verification of Temporal Logic},
|
||||
/// pages = {253--271},
|
||||
/// editor = {Jeannette M. Wing and Jim Woodcock and Jim Davies},
|
||||
/// booktitle = {Proceedings of the World Congress on Formal Methods in
|
||||
/// the Development of Computing Systems (FM'99)},
|
||||
/// publisher = {Springer-Verlag},
|
||||
/// series = {Lecture Notes in Computer Science},
|
||||
/// volume = {1708},
|
||||
/// year = {1999},
|
||||
/// address = {Toulouse, France},
|
||||
/// month = {September},
|
||||
/// isbn = {3-540-66587-0}
|
||||
/// }
|
||||
/// \endverbatim
|
||||
bool tgba_emptiness_check(const spot::tgba* aut_check);
|
||||
bool check();
|
||||
|
||||
/// Compute a counter example if tgba_emptiness_check() returned false.
|
||||
void counter_example(const spot::tgba* aut_counter);
|
||||
void counter_example();
|
||||
|
||||
std::ostream& print_result(std::ostream& os, const spot::tgba* aut,
|
||||
std::ostream& print_result(std::ostream& os,
|
||||
const tgba* restrict = 0) const;
|
||||
|
||||
private:
|
||||
const tgba* aut_;
|
||||
std::stack<connected_component> root_component;
|
||||
seen seen_state_num;
|
||||
state_sequence suffix;
|
||||
|
|
@ -83,19 +86,16 @@ namespace spot
|
|||
/// This function remove all accessible state from a given
|
||||
/// state. In other words, it removes the strongly connected
|
||||
/// component that contains this state.
|
||||
void remove_component(const tgba& aut, seen& state_map,
|
||||
const spot::state* start_delete);
|
||||
void remove_component(seen& state_map, const state* start_delete);
|
||||
|
||||
/// Called by counter_example to find a path which traverses all
|
||||
/// accepting conditions in the accepted SCC.
|
||||
void accepting_path (const spot::tgba* aut_counter,
|
||||
const connected_component& comp_path,
|
||||
const spot::state* start_path, bdd to_accept);
|
||||
void accepting_path (const connected_component& comp_path,
|
||||
const state* start_path, bdd to_accept);
|
||||
|
||||
/// Complete a cycle that caraterise the period of the counter
|
||||
/// example. Append a sequence to the path given by accepting_path.
|
||||
void complete_cycle(const spot::tgba* aut_counter,
|
||||
const connected_component& comp_path,
|
||||
void complete_cycle(const connected_component& comp_path,
|
||||
const state* from_state,const state* to_state);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue