00001 // Copyright (C) 2009, 2010 Laboratoire de Recherche et Développement 00002 // de l'Epita (LRDE). 00003 // 00004 // This file is part of Spot, a model checking library. 00005 // 00006 // Spot is free software; you can redistribute it and/or modify it 00007 // under the terms of the GNU General Public License as published by 00008 // the Free Software Foundation; either version 2 of the License, or 00009 // (at your option) any later version. 00010 // 00011 // Spot is distributed in the hope that it will be useful, but WITHOUT 00012 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00013 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 00014 // License for more details. 00015 // 00016 // You should have received a copy of the GNU General Public License 00017 // along with Spot; see the file COPYING. If not, write to the Free 00018 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00019 // 02111-1307, USA. 00020 00021 #ifndef SPOT_TGBA_TGBASAFRACOMPLEMENT_HH 00022 # define SPOT_TGBA_TGBASAFRACOMPLEMENT_HH 00023 00024 # include <vector> 00025 # include "tgba/tgba.hh" 00026 00027 #ifndef TRANSFORM_TO_TBA 00028 # define TRANSFORM_TO_TBA 0 00029 #endif 00030 #define TRANSFORM_TO_TGBA (!TRANSFORM_TO_TBA) 00031 00032 namespace spot 00033 { 00034 struct safra_tree_automaton; 00035 00053 class tgba_safra_complement : public tgba 00054 { 00055 public: 00056 tgba_safra_complement(const tgba* a); 00057 virtual ~tgba_safra_complement(); 00058 00059 safra_tree_automaton* get_safra() const 00060 { 00061 return safra_; 00062 } 00063 00064 // tgba interface. 00065 virtual state* get_init_state() const; 00066 virtual tgba_succ_iterator* 00067 succ_iter(const state* local_state, 00068 const state* global_state = 0, 00069 const tgba* global_automaton = 0) const; 00070 00071 virtual bdd_dict* get_dict() const; 00072 virtual std::string format_state(const state* state) const; 00073 virtual bdd all_acceptance_conditions() const; 00074 virtual bdd neg_acceptance_conditions() const; 00075 00076 protected: 00077 virtual bdd compute_support_conditions(const state* state) const; 00078 virtual bdd compute_support_variables(const state* state) const; 00079 private: 00080 const tgba* automaton_; 00081 safra_tree_automaton* safra_; 00082 #if TRANSFORM_TO_TBA 00083 bdd the_acceptance_cond_; 00084 #endif 00085 #if TRANSFORM_TO_TGBA 00086 bdd all_acceptance_cond_; 00087 bdd neg_acceptance_cond_; 00088 // Map to i the i-th acceptance condition of the final automaton. 00089 std::vector<int> acceptance_cond_vec_; 00090 #endif 00091 00092 }; 00093 00100 void display_safra(const tgba_safra_complement* a); 00101 } 00102 00103 #endif // SPOT_TGBA_TGBASAFRACOMPLEMENT_HH