#include <tgbaalgos/gtec/gtec.hh>
Inheritance diagram for spot::couvreur99_check:
Public Member Functions | |
couvreur99_check (const tgba *a, bool poprem=true, const numbered_state_heap_factory *nshf=numbered_state_heap_hash_map_factory::instance()) | |
virtual | ~couvreur99_check () |
virtual emptiness_check_result * | check () |
Check whether the automaton's language is empty. | |
virtual std::ostream & | print_stats (std::ostream &os) const |
Print statistics, if any. | |
const couvreur99_check_status * | result () const |
Return the status of the emptiness-check. | |
const tgba * | automaton () const |
The automaton that this emptiness-check inspects. | |
void | set_states (unsigned n) |
void | inc_states () |
void | inc_transitions () |
void | inc_depth (unsigned n=1) |
void | dec_depth (unsigned n=1) |
int | states () const |
int | transitions () const |
int | max_depth () const |
int | depth () const |
Protected Member Functions | |
void | remove_component (const state *start_delete) |
Remove a strongly component from the hash. | |
Protected Attributes | |
couvreur99_check_status * | ecs_ |
bool | poprem_ |
Whether to store the state to be removed. | |
const tgba * | a_ |
The automaton. |
This is based on the following paper.
@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} }
check() returns true if the automaton's language is empty. When it return false, a stack of SCC has been built is available using result() (spot::counter_example needs it).
There are two variants of this algorithm: spot::couvreur99_check and spot::couvreur99_check_shy. They differ in their memory usage, the number for successors computed before they are used and the way the depth first search is directed.
spot::couvreur99_check performs a straightforward depth first search. The DFS stacks store tgba_succ_iterators, so that only the iterators which really are explored are computed.
spot::couvreur99_check_shy tries to explore successors which are visited states first. this helps to merge SCCs and generally helps to produce shorter counter-examples. However this algorithm cannot stores unprocessed successors as tgba_succ_iterators: it must compute all successors of a state at once in order to decide which to explore first, and must keep a list of all unexplored successors in its DFS stack.
The poprem
parameter specifies how the algorithm should handle the destruction of non-accepting maximal strongly connected components. If poprem
is true, the algorithm will keep a list of all states of a SCC that are fully processed and should be removed once the MSCC is popped. If poprem
is false, the MSCC will be traversed again (i.e. generating the successors of the root recursively) for deletion. This is a choice between memory and speed.
|
|
|
|
|
The automaton that this emptiness-check inspects.
|
|
Check whether the automaton's language is empty.
Implements spot::emptiness_check. Reimplemented in spot::couvreur99_check_shy. |
|
|
|
|
|
|
|
|
|
|
|
|
|
Print statistics, if any.
Reimplemented from spot::emptiness_check. |
|
Remove a strongly component from the hash. This function remove all accessible state from a given state. In other words, it removes the strongly connected component that contains this state. |
|
Return the status of the emptiness-check. When check() succeed, the status should be passed along to spot::counter_example. This status should not be deleted, it is a pointer to a member of this class that will be deleted when the couvreur99 object is deleted. |
|
|
|
|
|
|
|
The automaton.
|
|
|
|
Whether to store the state to be removed.
|