00001 /* --------------------------------------------------------------------------- 00002 00003 00004 This file is part of the ``fsm.sexp'' package of NuSMV version 2. 00005 Copyright (C) 2003 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 00038 #ifndef __NUSMV_CORE_FSM_SEXP_SEXP_FSM_H__ 00039 #define __NUSMV_CORE_FSM_SEXP_SEXP_FSM_H__ 00040 00041 #include "nusmv/core/fsm/sexp/sexp.h" 00042 #include "nusmv/core/wff/ExprMgr.h" 00043 00044 #include "nusmv/core/set/set.h" 00045 #include "nusmv/core/compile/FlatHierarchy.h" 00046 #include "nusmv/core/compile/symb_table/SymbLayer.h" 00047 #include "nusmv/core/compile/PredicateNormaliser.h" 00048 #include "nusmv/core/enc/bdd/BddEnc.h" 00049 00056 typedef struct SexpFsm_TAG* SexpFsm_ptr; 00057 00063 #define SEXP_FSM(x) \ 00064 ((SexpFsm_ptr) x) 00065 00071 #define SEXP_FSM_CHECK_INSTANCE(x) \ 00072 (nusmv_assert(SEXP_FSM(x) != SEXP_FSM(NULL))) 00073 00074 /*---------------------------------------------------------------------------*/ 00075 /* Public Function Interface */ 00076 /*---------------------------------------------------------------------------*/ 00077 00078 /* constructors */ 00079 00088 SexpFsm_ptr 00089 SexpFsm_create(const FlatHierarchy_ptr hierarchy, 00090 const Set_t vars_set); 00091 00098 SexpFsm_ptr SexpFsm_copy(const SexpFsm_ptr self); 00099 00100 /* convertion to predicate-normalised FSM */ 00101 00122 SexpFsm_ptr SexpFsm_create_predicate_normalised_copy(const SexpFsm_ptr self, 00123 PredicateNormaliser_ptr normaliser); 00124 00125 /* deconstructors */ 00126 00133 void SexpFsm_destroy(SexpFsm_ptr self); 00134 00144 SymbTable_ptr SexpFsm_get_symb_table(const SexpFsm_ptr self); 00145 00155 boolean SexpFsm_is_boolean(const SexpFsm_ptr self); 00156 00157 /* access functions */ 00158 00169 FlatHierarchy_ptr 00170 SexpFsm_get_hierarchy(const SexpFsm_ptr self); 00171 00179 Expr_ptr SexpFsm_get_init(const SexpFsm_ptr self); 00180 00188 Expr_ptr SexpFsm_get_invar(const SexpFsm_ptr self); 00189 00197 Expr_ptr SexpFsm_get_trans(const SexpFsm_ptr self); 00198 00206 Expr_ptr SexpFsm_get_input(const SexpFsm_ptr self); 00207 00216 node_ptr SexpFsm_get_justice(const SexpFsm_ptr self); 00217 00226 node_ptr SexpFsm_get_compassion(const SexpFsm_ptr self); 00227 00234 NodeList_ptr SexpFsm_get_vars_list(const SexpFsm_ptr self); 00235 00242 NodeList_ptr SexpFsm_get_symbols_list(const SexpFsm_ptr self); 00243 00250 Set_t SexpFsm_get_vars(const SexpFsm_ptr self); 00251 00260 void 00261 SexpFsm_apply_synchronous_product(SexpFsm_ptr self, 00262 SexpFsm_ptr other); 00263 00273 boolean 00274 SexpFsm_is_syntactically_universal(SexpFsm_ptr self); 00275 00284 Expr_ptr 00285 SexpFsm_get_var_init(const SexpFsm_ptr self, node_ptr v); 00286 00295 Expr_ptr 00296 SexpFsm_get_var_invar(const SexpFsm_ptr self, node_ptr v); 00297 00306 Expr_ptr 00307 SexpFsm_get_var_trans(const SexpFsm_ptr self, node_ptr v); 00308 00316 Expr_ptr 00317 SexpFsm_get_var_input(const SexpFsm_ptr self, node_ptr v); 00318 00325 void SexpFsm_self_check(const SexpFsm_ptr self); 00326 00327 00328 #endif /* __NUSMV_CORE_FSM_SEXP_SEXP_FSM_H__ */