65 typedef std::map<formula, int>
fv_map;
67 typedef std::map<int, formula>
vf_map;
75 enum var_type { anon = 0, var, acc };
82 typedef std::vector<bdd_info> bdd_info_map;
102 return register_proposition(f, for_me.get());
114 template <
typename T>
117 return has_registered_proposition(f, for_me.get());
127 return var_map.at(f);
143 template <
typename T>
146 return register_acceptance_variable(f, for_me.get());
160 template <
typename T>
163 return register_anonymous_variables(n, for_me.get());
176 template <
typename T>
178 std::shared_ptr<T> for_me)
180 register_all_variables_of(from_other, for_me.get());
183 template <
typename T>
187 register_all_variables_of(from_other.get(), for_me);
190 template <
typename T,
typename U>
192 std::shared_ptr<U> for_me)
194 register_all_variables_of(from_other.get(), for_me.get());
208 template <
typename T>
210 std::shared_ptr<T> for_me)
212 register_all_propositions_of(from_other, for_me.get());
215 template <
typename T>
219 register_all_propotitions_of(from_other.get(), for_me);
222 template <
typename T,
typename U>
224 std::shared_ptr<U> for_me)
226 register_all_propositions_of(from_other.get(), for_me.get());
239 template <
typename T>
242 unregister_variable(var, me.get());
248 std::ostream&
dump(std::ostream& os)
const;
269 typedef std::shared_ptr<bdd_dict> bdd_dict_ptr;
271 inline bdd_dict_ptr make_bdd_dict()
273 return std::make_shared<bdd_dict>();
279 operator bdd_dict_ptr()
const
284 bdd_dict_ptr get_dict()
const
289 int register_proposition(
formula f)
291 return dict_->register_proposition(f,
this);
294 int register_proposition(
const std::string& f)
301 dict_->unregister_all_my_variables(
this);
305 bdd_dict_ptr dict_ = make_bdd_dict();
Definition: bdddict.hh:277
Map BDD variables to formulae.
Definition: bdddict.hh:52
std::set< const void * > ref_set
BDD-variable reference counts.
Definition: bdddict.hh:73
void register_all_propositions_of(std::shared_ptr< T > from_other, std::shared_ptr< U > for_me)
Duplicate the proposition usage of another object.
Definition: bdddict.hh:223
void register_all_propositions_of(const void *from_other, std::shared_ptr< T > for_me)
Duplicate the proposition usage of another object.
Definition: bdddict.hh:209
std::ostream & dump(std::ostream &os) const
Dump all variables for debugging.
int register_acceptance_variable(formula f, const void *for_me)
Register an acceptance variable.
void assert_emptiness() const
Make sure the dictionary is empty.
void register_all_propositions_of(std::shared_ptr< T > from_other, const void *for_me)
Duplicate the proposition usage of another object.
Definition: bdddict.hh:216
void register_all_variables_of(std::shared_ptr< T > from_other, const void *for_me)
Duplicate the variable usage of another object.
Definition: bdddict.hh:184
std::map< int, formula > vf_map
BDD-variable-to-formula maps.
Definition: bdddict.hh:67
std::map< formula, int > fv_map
Formula-to-BDD-variable maps.
Definition: bdddict.hh:65
void unregister_variable(int var, std::shared_ptr< T > me)
Release a variable used by me.
Definition: bdddict.hh:240
int register_proposition(formula f, const void *for_me)
Register an atomic proposition.
void unregister_all_my_variables(const void *me)
Release all variables used by an object.
int register_proposition(formula f, std::shared_ptr< T > for_me)
Register an atomic proposition.
Definition: bdddict.hh:100
int register_anonymous_variables(int n, const void *for_me)
Register anonymous BDD variables.
int has_registered_proposition(formula f, std::shared_ptr< T > for_me)
whether a proposition has already been registered
Definition: bdddict.hh:115
void register_all_variables_of(const void *from_other, std::shared_ptr< T > for_me)
Duplicate the variable usage of another object.
Definition: bdddict.hh:177
int has_registered_proposition(formula f, const void *me)
whether a proposition has already been registered
void register_all_propositions_of(const void *from_other, const void *for_me)
Duplicate the proposition usage of another object.
fv_map var_map
Maps atomic propositions to BDD variables.
Definition: bdddict.hh:69
void unregister_variable(int var, const void *me)
Release a variable used by me.
int register_anonymous_variables(int n, std::shared_ptr< T > for_me)
Register anonymous BDD variables.
Definition: bdddict.hh:161
void register_all_variables_of(std::shared_ptr< T > from_other, std::shared_ptr< U > for_me)
Duplicate the variable usage of another object.
Definition: bdddict.hh:191
fv_map acc_map
Maps acceptance conditions to BDD variables.
Definition: bdddict.hh:70
int register_acceptance_variable(formula f, std::shared_ptr< T > for_me)
Register an acceptance variable.
Definition: bdddict.hh:144
~bdd_dict()
Destroy the BDD dict.
void register_all_variables_of(const void *from_other, const void *for_me)
Duplicate the variable usage of another object.
Definition: automata.hh:26
Definition: bdddict.hh:76