tgbakvcomplement.hh

Go to the documentation of this file.
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_TGBAKVCOMPLEMENT_HH
00022 #define SPOT_TGBA_TGBAKVCOMPLEMENT_HH
00023 
00024 #include <vector>
00025 #include "bdd.h"
00026 #include "tgba.hh"
00027 #include "tgba/tgbasgba.hh"
00028 
00029 namespace spot
00030 {
00031   class bdd_ordered
00032   {
00033   public:
00034     bdd_ordered()
00035       : order_(0)
00036     {};
00037 
00038     bdd_ordered(int bdd_, unsigned order_)
00039       : bdd_(bdd_), order_(order_)
00040     {
00041     }
00042 
00043     unsigned order() const
00044     {
00045       return order_;
00046     }
00047 
00048     unsigned& order()
00049     {
00050       return order_;
00051     }
00052 
00053     bdd get_bdd() const
00054     {
00055       return bdd_ithvar(bdd_);
00056     }
00057   private:
00058     int bdd_;
00059     unsigned order_;
00060   };
00061 
00062   typedef std::vector<bdd_ordered> acc_list_t;
00063 
00087   class tgba_kv_complement : public tgba
00088   {
00089   public:
00090     tgba_kv_complement(const tgba* a);
00091     virtual ~tgba_kv_complement();
00092 
00093     // tgba interface
00094     virtual state* get_init_state() const;
00095     virtual tgba_succ_iterator*
00096     succ_iter(const state* local_state,
00097               const state* global_state = 0,
00098               const tgba* global_automaton = 0) const;
00099 
00100     virtual bdd_dict* get_dict() const;
00101     virtual std::string format_state(const state* state) const;
00102     virtual bdd all_acceptance_conditions() const;
00103     virtual bdd neg_acceptance_conditions() const;
00104   protected:
00105     virtual bdd compute_support_conditions(const state* state) const;
00106     virtual bdd compute_support_variables(const state* state) const;
00107   private:
00110     void get_acc_list();
00111   private:
00112     const tgba_sgba_proxy* automaton_;
00113     bdd the_acceptance_cond_;
00114     unsigned nb_states_;
00115     acc_list_t acc_list_;
00116   }; // end class tgba_kv_complement.
00117 
00118 } // end namespace spot.
00119 
00120 
00121 #endif  // !SPOT_TGBA_TGBAKVCOMPLEMENT_HH

Please comment this page and report errors about it on the RefDocComments page.
Generated on Mon Feb 7 2011 14:29:29 for spot by doxygen 1.7.1