00001 /* --------------------------------------------------------------------------- 00002 00003 00004 This file is part of the ``compile'' package of NuSMV version 2. 00005 Copyright (C) 2010 by FBK-irst. 00006 00007 NuSMV version 2 is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Lesser General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 NuSMV version 2 is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Lesser General Public License for more details. 00016 00017 You should have received a copy of the GNU Lesser General Public 00018 License along with this library; if not, write to the Free Software 00019 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. 00020 00021 For more information on NuSMV see <http://nusmv.fbk.eu> 00022 or email to <nusmv-users@fbk.eu>. 00023 Please report bugs to <nusmv-users@fbk.eu>. 00024 00025 To contact the NuSMV development board, email to <nusmv@fbk.eu>. 00026 00027 -----------------------------------------------------------------------------*/ 00028 00083 #ifndef __NUSMV_CORE_COMPILE_PREDICATE_EXTRACTOR_H__ 00084 #define __NUSMV_CORE_COMPILE_PREDICATE_EXTRACTOR_H__ 00085 00086 #include "nusmv/core/compile/symb_table/SymbTable.h" 00087 #include "nusmv/core/compile/FlatHierarchy.h" /* for FlatHierarchy_ptr */ 00088 #include "nusmv/core/set/set.h" 00089 #include "nusmv/core/utils/utils.h" 00090 00091 00092 /*---------------------------------------------------------------------------*/ 00093 /* Type declarations */ 00094 /*---------------------------------------------------------------------------*/ 00095 00102 typedef struct PredicateExtractor_TAG* PredicateExtractor_ptr; 00103 00109 #define PREDICATE_EXTRACTOR(x) \ 00110 ((PredicateExtractor_ptr) x) 00111 00117 #define PREDICATE_EXTRACTOR_CHECK_INSTANCE(x) \ 00118 ( nusmv_assert(PREDICATE_EXTRACTOR(x) != PREDICATE_EXTRACTOR(NULL)) ) 00119 00120 00121 /* ---------------------------------------------------------------------- */ 00122 /* Public interface */ 00123 /* ---------------------------------------------------------------------- */ 00124 00142 PredicateExtractor_ptr 00143 PredicateExtractor_create(SymbTable_ptr st, boolean use_approx); 00144 00151 void PredicateExtractor_destroy(PredicateExtractor_ptr self); 00152 00181 void 00182 PredicateExtractor_compute_preds(PredicateExtractor_ptr self, 00183 node_ptr expr); 00184 00193 void 00194 PredicateExtractor_compute_preds_from_hierarchy(PredicateExtractor_ptr self, 00195 FlatHierarchy_ptr fh); 00196 00205 Set_t 00206 PredicateExtractor_get_all_preds(const PredicateExtractor_ptr self); 00207 00228 Set_t 00229 PredicateExtractor_get_all_clusters(const PredicateExtractor_ptr self); 00230 00249 Set_t 00250 PredicateExtractor_get_var_cluster(const PredicateExtractor_ptr self, 00251 node_ptr var); 00252 00268 Set_t PredicateExtractor_get_preds_of_a_cluster(const PredicateExtractor_ptr self, 00269 Set_t cluster); 00270 00290 void 00291 PredicateExtractor_print(const PredicateExtractor_ptr self, 00292 FILE* stream, 00293 boolean printPredicates, 00294 boolean printClusters); 00295 00296 #endif /* __NUSMV_CORE_COMPILE_PREDICATE_EXTRACTOR_H__ */