spot
0.9
|
00001 // Copyright (C) 2011, 2012 Laboratoire de Recherche et Developpement de 00002 // l'Epita (LRDE). 00003 // Copyright (C) 2006 Laboratoire d'Informatique de Paris 6 (LIP6), 00004 // département Systèmes Répartis Coopératifs (SRC), Université Pierre 00005 // et Marie Curie. 00006 // 00007 // This file is part of Spot, a model checking library. 00008 // 00009 // Spot is free software; you can redistribute it and/or modify it 00010 // under the terms of the GNU General Public License as published by 00011 // the Free Software Foundation; either version 2 of the License, or 00012 // (at your option) any later version. 00013 // 00014 // Spot is distributed in the hope that it will be useful, but WITHOUT 00015 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00016 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public 00017 // License for more details. 00018 // 00019 // You should have received a copy of the GNU General Public License 00020 // along with Spot; see the file COPYING. If not, write to the Free 00021 // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00022 // 02111-1307, USA. 00023 00024 #ifndef SPOT_LTLVISIT_CONTAIN_HH 00025 # define SPOT_LTLVISIT_CONTAIN_HH 00026 00027 #include "ltlast/formula.hh" 00028 #include "tgbaalgos/ltl2tgba_fm.hh" 00029 #include "misc/hash.hh" 00030 #include <map> 00031 00032 namespace spot 00033 { 00034 namespace ltl 00035 { 00036 // Check containment of language represented by LTL formulae. 00037 class language_containment_checker 00038 { 00039 struct record_ 00040 { 00041 const tgba* translation; 00042 typedef std::map<const record_*, bool> incomp_map; 00043 incomp_map incompatible; 00044 }; 00045 typedef Sgi::hash_map<const formula*, 00046 record_, formula_ptr_hash> trans_map; 00047 public: 00050 language_containment_checker(bdd_dict* dict, bool exprop, 00051 bool symb_merge, 00052 bool branching_postponement, 00053 bool fair_loop_approx); 00054 00055 ~language_containment_checker(); 00056 00058 bool contained(const formula* l, const formula* g); 00060 bool neg_contained(const formula* l, const formula* g); 00062 bool contained_neg(const formula* l, const formula* g); 00063 00065 bool equal(const formula* l, const formula* g); 00066 00067 protected: 00068 bool incompatible_(record_* l, record_* g); 00069 00070 record_* register_formula_(const formula* f); 00071 00072 /* Translation options */ 00073 bdd_dict* dict_; 00074 bool exprop_; 00075 bool symb_merge_; 00076 bool branching_postponement_; 00077 bool fair_loop_approx_; 00078 /* Translation Maps */ 00079 trans_map translated_; 00080 }; 00081 00108 #if __GNUC__ 00109 const formula* reduce_tau03(const formula* f, 00110 bool stronger = true) 00111 __attribute__ ((deprecated)); 00112 #else 00113 const formula* reduce_tau03(const formula* f, bool stronger = true); 00114 #endif 00115 } 00116 } 00117 00118 #endif // SPOT_LTLVISIT_CONTAIN_HH