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