Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

spot::emptiness_check Class Reference

Check whether the language of an automate is empty. More...

#include <emptinesscheck.hh>

Collaboration diagram for spot::emptiness_check:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 emptiness_check (const tgba *a)
 ~emptiness_check ()
void counter_example ()
 Compute a counter example if tgba_emptiness_check() returned false.

std::ostream & print_result (std::ostream &os, const tgba *restrict=0) const
 Display the example computed by counter_example().

void print_stats (std::ostream &os) const
 Output statistics about this object.

bool check ()
 check whether an automaton's language is empty

bool check2 ()

Private Types

typedef std::list< const state * > state_sequence
typedef std::pair< const state *,
bdd > 
state_proposition
typedef std::list< state_propositioncycle_path
typedef Sgi::hash_map< const
state *, int, state_ptr_hash,
state_ptr_equal
hash_type

Private Member Functions

const stateh_filt (const state *s) const
 Return a state which is equal to s, but is in h, and free s if it is different. Doing so simplify memory management, because we don't have to track which state need to be kept or deallocated: all key in h should last for the whole life of the emptiness_check.

void remove_component (const state *start_delete)
 Remove a strongly component from the hash.

void accepting_path (const connected_component_set &scc, const state *start, bdd acc_to_traverse)
void complete_cycle (const connected_component_set &scc, const state *from, const state *to)

Private Attributes

const tgbaaut_
std::stack< connected_componentroot
state_sequence suffix
cycle_path period
hash_type h
 Map of visited states.


Detailed Description

Check whether the language of an automate is empty.

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}
      }
      


Member Typedef Documentation

typedef std::list<state_proposition> spot::emptiness_check::cycle_path [private]
 

typedef Sgi::hash_map<const state*, int, state_ptr_hash, state_ptr_equal> spot::emptiness_check::hash_type [private]
 

typedef std::pair<const state*, bdd> spot::emptiness_check::state_proposition [private]
 

typedef std::list<const state*> spot::emptiness_check::state_sequence [private]
 


Constructor & Destructor Documentation

spot::emptiness_check::emptiness_check const tgba a  ) 
 

spot::emptiness_check::~emptiness_check  ) 
 


Member Function Documentation

void spot::emptiness_check::accepting_path const connected_component_set scc,
const state start,
bdd  acc_to_traverse
[private]
 

Called by counter_example to find a path which traverses all acceptance conditions in the accepted SCC.

bool spot::emptiness_check::check  ) 
 

check whether an automaton's language is empty

Returns true if the automaton's language is empty. When it return false, a stack of SCC has been built and can later be used by counter_example().

There are two variants of this algorithm: check() and check2(). They differ in their memory usage, the number for successors computed before they are used and the way the depth first search is directed.

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.

check2() try 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.

bool spot::emptiness_check::check2  ) 
 

void spot::emptiness_check::complete_cycle const connected_component_set scc,
const state from,
const state to
[private]
 

Complete a cycle that caraterise the period of the counter example. Append a sequence to the path given by accepting_path.

void spot::emptiness_check::counter_example  ) 
 

Compute a counter example if tgba_emptiness_check() returned false.

const state* spot::emptiness_check::h_filt const state s  )  const [private]
 

Return a state which is equal to s, but is in h, and free s if it is different. Doing so simplify memory management, because we don't have to track which state need to be kept or deallocated: all key in h should last for the whole life of the emptiness_check.

std::ostream& spot::emptiness_check::print_result std::ostream &  os,
const tgba restrict = 0
const
 

Display the example computed by counter_example().

Parameters:
restrict optional automaton to project the example on.

void spot::emptiness_check::print_stats std::ostream &  os  )  const
 

Output statistics about this object.

void spot::emptiness_check::remove_component const state start_delete  )  [private]
 

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.


Member Data Documentation

const tgba* spot::emptiness_check::aut_ [private]
 

hash_type spot::emptiness_check::h [private]
 

Map of visited states.

cycle_path spot::emptiness_check::period [private]
 

std::stack<connected_component> spot::emptiness_check::root [private]
 

state_sequence spot::emptiness_check::suffix [private]
 


The documentation for this class was generated from the following file:
Generated on Tue Jan 13 18:20:32 2004 for spot by doxygen 1.3.5