25 #ifndef SPOT_TGBA_TGBAEXPLICIT_HH
26 # define SPOT_TGBA_TGBAEXPLICIT_HH
62 template<
typename Label,
typename label_hash>
123 reinterpret_cast<const char*
>(
this) - static_cast<const char*>(0);
195 template<
typename State>
226 return const_cast<State*
>(res);
232 return it_->condition;
238 return it_->acceptance_conditions;
241 typename State::transitions_t::const_iterator
249 typename State::transitions_t::const_iterator
it_;
255 template<
typename State,
typename Type>
265 typedef Sgi::hash_map<label_t, State, label_hash_t>
ls_map;
266 typedef Sgi::hash_map<const State*, label_t, ptr_hash<State> >
sl_map;
292 t.condition = bddtrue;
293 t.acceptance_conditions = bddfalse;
295 typename transitions_t::iterator i =
296 source->successors.insert(source->successors.end(), t);
338 return ls_.find(name) !=
ls_.end();
343 typename sl_map::const_iterator i =
sl_.find(s);
344 assert(i !=
sl_.end());
350 const State* se =
down_cast<
const State*>(s);
369 typename ls_map::iterator i;
370 for (i =
ls_.begin(); i !=
ls_.end(); ++i)
372 typename transitions_t::iterator i2;
373 for (i2 = i->second.successors.begin();
374 i2 != i->second.successors.end(); ++i2)
375 i2->acceptance_conditions = all - i2->acceptance_conditions;
382 typename ls_map::iterator i;
383 for (i =
ls_.begin(); i !=
ls_.end(); ++i)
385 typename transitions_t::iterator t1;
386 for (t1 = i->second.successors.begin();
387 t1 != i->second.successors.end(); ++t1)
389 bdd acc = t1->acceptance_conditions;
394 typename transitions_t::iterator t2 = t1;
396 while (t2 != i->second.successors.end())
398 typename transitions_t::iterator t2copy = t2++;
399 if (t2copy->acceptance_conditions == acc && t2copy->dest == dest)
401 t1->condition |= t2copy->condition;
413 typename ls_map::iterator i =
ls_.find(name);
441 typename ls_map::iterator i =
ls_.begin();
443 while (i !=
ls_.end())
448 if (
sl_.erase(&(i->second)))
459 this->last_support_conditions_input_ = 0;
460 this->last_support_variables_input_ = 0;
474 const tgba* global_automaton = 0)
const
480 (void) global_automaton;
485 ->all_acceptance_conditions());
505 typename sl_map::const_iterator i =
sl_.find(se);
506 assert(i !=
sl_.end());
549 t->acceptance_conditions |= c;
556 bdd sup = bdd_support(f);
558 while (sup != bddtrue)
563 t->acceptance_conditions |= f;
592 bdd neg = bdd_nithvar(v);
597 for (i = this->
ls_.begin(); i != this->
ls_.end(); ++i)
599 typename transitions_t::iterator i2;
600 for (i2 = i->second.successors.begin();
601 i2 != i->second.successors.end(); ++i2)
602 i2->acceptance_conditions &= neg;
612 bdd_dict::fv_map::iterator i = this->
dict_->
acc_map.find(f);
615 bdd v = bdd_ithvar(i->second);
622 const State* s =
down_cast<
const State*>(in);
628 typename transitions_t::const_iterator i;
629 for (i = st.begin(); i != st.end(); ++i)
637 const State* s =
down_cast<
const State*>(in);
643 typename transitions_t::const_iterator i;
644 for (i = st.begin(); i != st.end(); ++i)
645 res &= bdd_support(i->condition);
662 template <
typename State>
680 template <
typename State>
694 const State* st =
down_cast<
const State*>(s);
697 if (st->successors.empty())
699 return st->successors.front().acceptance_conditions != bddfalse;
719 template<
class graph,
typename Type>
728 static std::string
to_string(
const typename Type::label_t& l)
730 std::stringstream ss;
736 template<
class graph>
751 template<
class graph>
779 typedef explicit_conf<tgba_explicit<state_explicit_string>,
795 #endif // SPOT_TGBA_TGBAEXPLICIT_HH