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

spot::bdd_dict Class Reference

Map BDD variables to formulae. More...

#include <bdddict.hh>

Inheritance diagram for spot::bdd_dict:

Inheritance graph
[legend]
Collaboration diagram for spot::bdd_dict:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Sgi::hash_map< const
ltl::formula *, int, ptr_hash<
ltl::formula > > 
fv_map
 Formula-to-BDD-variable maps.

typedef Sgi::hash_map< int,
const ltl::formula * > 
vf_map
 BDD-variable-to-formula maps.


Public Member Functions

 bdd_dict ()
 ~bdd_dict ()
int register_proposition (const ltl::formula *f, const void *for_me)
 Register an atomic proposition.

void register_propositions (bdd f, const void *for_me)
 Register BDD variables as atomic propositions.

int register_state (const ltl::formula *f, const void *for_me)
 Register a couple of Now/Next variables.

int register_acceptance_variable (const ltl::formula *f, const void *for_me)
 Register an atomic proposition.

void register_acceptance_variables (bdd f, const void *for_me)
 Register BDD variables as acceptance variables.

void register_all_variables_of (const void *from_other, const void *for_me)
 Duplicate the variable usage of another object.

void unregister_all_my_variables (const void *me)
 Release the variables used by object.

std::ostream & dump (std::ostream &os) const
 Dump all variables for debugging.

void assert_emptiness () const
 Make sure the dictionary is empty.

bool is_registered_proposition (const ltl::formula *f, const void *by_me)
bool is_registered_state (const ltl::formula *f, const void *by_me)
bool is_registered_acceptance_variable (const ltl::formula *f, const void *by_me)

Public Attributes

fv_map now_map
 Maps formulae to "Now" BDD variables.

vf_map now_formula_map
 Maps "Now" BDD variables to formulae.

fv_map var_map
 Maps atomic propositions to BDD variables.

vf_map var_formula_map
 Maps BDD variables to atomic propositions.

fv_map acc_map
 Maps acceptance conditions to BDD variables.

vf_map acc_formula_map
 Maps BDD variables to acceptance conditions.

bddPair * next_to_now
 Map Next variables to Now variables.

bddPair * now_to_next
 Map Now variables to Next variables.


Protected Types

typedef Sgi::hash_set< const
void *, ptr_hash< void > > 
ref_set
 BDD-variable reference counts.

typedef Sgi::hash_map< int,
ref_set
vr_map
typedef std::pair< int, int > pos_lenght_pair
typedef std::list< pos_lenght_pairfree_list_type

Protected Member Functions

int allocate_variables (int n)
 Allocate n BDD variables.

void release_variables (int base, int n)
 Release n BDD variables starting at base.


Static Protected Member Functions

void initialize ()
 Initialize the BDD library.


Protected Attributes

vr_map var_refs
int lvarnum
 number of variables in use in this allocator.

free_list_type free_list
 Tracks unused BDD variables.


Static Protected Attributes

bool initialized
 Whether the BDD library has been initialized.

int varnum
 number of variables in use in the BDD library.


Private Member Functions

 bdd_dict (const bdd_dict &other)
bdd_dictoperator= (const bdd_dict &other)

Detailed Description

Map BDD variables to formulae.


Member Typedef Documentation

typedef std::list<pos_lenght_pair> spot::bdd_allocator::free_list_type [protected, inherited]
 

typedef Sgi::hash_map<const ltl::formula*, int, ptr_hash<ltl::formula> > spot::bdd_dict::fv_map
 

Formula-to-BDD-variable maps.

typedef std::pair<int, int> spot::bdd_allocator::pos_lenght_pair [protected, inherited]
 

typedef Sgi::hash_set<const void*, ptr_hash<void> > spot::bdd_dict::ref_set [protected]
 

BDD-variable reference counts.

typedef Sgi::hash_map<int, const ltl::formula*> spot::bdd_dict::vf_map
 

BDD-variable-to-formula maps.

typedef Sgi::hash_map<int, ref_set> spot::bdd_dict::vr_map [protected]
 


Constructor & Destructor Documentation

spot::bdd_dict::bdd_dict  ) 
 

spot::bdd_dict::~bdd_dict  ) 
 

spot::bdd_dict::bdd_dict const bdd_dict other  )  [private]
 


Member Function Documentation

int spot::bdd_allocator::allocate_variables int  n  )  [protected, inherited]
 

Allocate n BDD variables.

void spot::bdd_dict::assert_emptiness  )  const
 

Make sure the dictionary is empty.

This will print diagnostics and abort if the dictionary is not empty. Use for debugging.

std::ostream& spot::bdd_dict::dump std::ostream &  os  )  const
 

Dump all variables for debugging.

Parameters:
os The output stream.

void spot::bdd_allocator::initialize  )  [static, protected, inherited]
 

Initialize the BDD library.

bool spot::bdd_dict::is_registered_acceptance_variable const ltl::formula f,
const void *  by_me
 

bool spot::bdd_dict::is_registered_proposition const ltl::formula f,
const void *  by_me
 

Check whether formula f has already been registered by by_me.

bool spot::bdd_dict::is_registered_state const ltl::formula f,
const void *  by_me
 

bdd_dict& spot::bdd_dict::operator= const bdd_dict other  )  [private]
 

int spot::bdd_dict::register_acceptance_variable const ltl::formula f,
const void *  for_me
 

Register an atomic proposition.

Return (and maybe allocate) a BDD variable designating an acceptance set associated to formula f. The for_me argument should point to the object using this BDD variable, this is used for reference counting. It is perfectly safe to call this function several time with the same arguments.

Returns:
The variable number. Use bdd_ithvar() or bdd_nithvar() to convert this to a BDD.

void spot::bdd_dict::register_acceptance_variables bdd  f,
const void *  for_me
 

Register BDD variables as acceptance variables.

Register all variables occurring in f as acceptance variables used by for_me. This assumes that these acceptance variables are already known from the dictionary (i.e., they have already been registered by register_acceptance_variable() for another automaton).

void spot::bdd_dict::register_all_variables_of const void *  from_other,
const void *  for_me
 

Duplicate the variable usage of another object.

This tells this dictionary that the for_me object will be using the same BDD variables as the from_other objects. This ensure that the variables won't be freed when from_other is deleted if from_other is still alive.

int spot::bdd_dict::register_proposition const ltl::formula f,
const void *  for_me
 

Register an atomic proposition.

Return (and maybe allocate) a BDD variable designating formula f. The for_me argument should point to the object using this BDD variable, this is used for reference counting. It is perfectly safe to call this function several time with the same arguments.

Returns:
The variable number. Use bdd_ithvar() or bdd_nithvar() to convert this to a BDD.

void spot::bdd_dict::register_propositions bdd  f,
const void *  for_me
 

Register BDD variables as atomic propositions.

Register all variables occurring in f as atomic propositions used by for_me. This assumes that these atomic propositions are already known from the dictionary (i.e., they have already been registered by register_proposition() for another automaton).

int spot::bdd_dict::register_state const ltl::formula f,
const void *  for_me
 

Register a couple of Now/Next variables.

Return (and maybe allocate) two BDD variables for a state associated to formula f. The for_me argument should point to the object using this BDD variable, this is used for reference counting. It is perfectly safe to call this function several time with the same arguments.

Returns:
The first variable number. Add one to get the second variable. Use bdd_ithvar() or bdd_nithvar() to convert this to a BDD.

void spot::bdd_allocator::release_variables int  base,
int  n
[protected, inherited]
 

Release n BDD variables starting at base.

void spot::bdd_dict::unregister_all_my_variables const void *  me  ) 
 

Release the variables used by object.

Usually called in the destructor if me.


Member Data Documentation

vf_map spot::bdd_dict::acc_formula_map
 

Maps BDD variables to acceptance conditions.

fv_map spot::bdd_dict::acc_map
 

Maps acceptance conditions to BDD variables.

free_list_type spot::bdd_allocator::free_list [protected, inherited]
 

Tracks unused BDD variables.

bool spot::bdd_allocator::initialized [static, protected, inherited]
 

Whether the BDD library has been initialized.

int spot::bdd_allocator::lvarnum [protected, inherited]
 

number of variables in use in this allocator.

bddPair* spot::bdd_dict::next_to_now
 

Map Next variables to Now variables.

Use with BuDDy's bdd_replace() function.

vf_map spot::bdd_dict::now_formula_map
 

Maps "Now" BDD variables to formulae.

fv_map spot::bdd_dict::now_map
 

Maps formulae to "Now" BDD variables.

bddPair* spot::bdd_dict::now_to_next
 

Map Now variables to Next variables.

Use with BuDDy's bdd_replace() function.

vf_map spot::bdd_dict::var_formula_map
 

Maps BDD variables to atomic propositions.

fv_map spot::bdd_dict::var_map
 

Maps atomic propositions to BDD variables.

vr_map spot::bdd_dict::var_refs [protected]
 

int spot::bdd_allocator::varnum [static, protected, inherited]
 

number of variables in use in the BDD library.


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