00001 /* --------------------------------------------------------------------------- 00002 00003 00004 This file is part of the ``fsm.be'' package of NuSMV version 2. 00005 Copyright (C) 2005 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 00039 #ifndef __NUSMV_CORE_FSM_BE_BE_FSM_H__ 00040 #define __NUSMV_CORE_FSM_BE_BE_FSM_H__ 00041 00042 00043 #include "nusmv/core/fsm/sexp/BoolSexpFsm.h" 00044 #include "nusmv/core/enc/be/BeEnc.h" 00045 00046 #include "nusmv/core/node/node.h" 00047 #include "nusmv/core/be/be.h" 00048 00049 #include "nusmv/core/utils/utils.h" 00050 00051 /*---------------------------------------------------------------------------*/ 00052 /* Constant declarations */ 00053 /*---------------------------------------------------------------------------*/ 00054 00055 /*---------------------------------------------------------------------------*/ 00056 /* Type declarations */ 00057 /*---------------------------------------------------------------------------*/ 00058 00065 typedef struct BeFsm_TAG* BeFsm_ptr; 00066 00067 00068 /*---------------------------------------------------------------------------*/ 00069 /* Structure declarations */ 00070 /*---------------------------------------------------------------------------*/ 00071 00072 /*---------------------------------------------------------------------------*/ 00073 /* Variable declarations */ 00074 /*---------------------------------------------------------------------------*/ 00075 00076 /*---------------------------------------------------------------------------*/ 00077 /* Macro declarations */ 00078 /*---------------------------------------------------------------------------*/ 00079 00086 #define BE_FSM(self) \ 00087 ((BeFsm_ptr) self) 00088 00094 #define BE_FSM_CHECK_INSTANCE(self) \ 00095 (nusmv_assert(BE_FSM(self) != BE_FSM(NULL))) 00096 00097 00098 00101 /*---------------------------------------------------------------------------*/ 00102 /* Function prototypes */ 00103 /*---------------------------------------------------------------------------*/ 00104 00114 BeFsm_ptr 00115 BeFsm_create(BeEnc_ptr be_enc, 00116 const be_ptr init, 00117 const be_ptr invar, 00118 const be_ptr trans, 00119 const node_ptr list_of_be_fairness); 00120 00121 /* should not be in FsmBuilder? */ 00122 00132 BeFsm_ptr 00133 BeFsm_create_from_sexp_fsm(BeEnc_ptr be_enc, 00134 const BoolSexpFsm_ptr bfsm); 00135 00146 void BeFsm_destroy(BeFsm_ptr self); 00147 00158 BeFsm_ptr BeFsm_copy(BeFsm_ptr self); 00159 00167 BeEnc_ptr BeFsm_get_be_encoding(const BeFsm_ptr self); 00168 00176 be_ptr BeFsm_get_init(const BeFsm_ptr self); 00177 00185 be_ptr BeFsm_get_invar(const BeFsm_ptr self); 00186 00194 be_ptr BeFsm_get_trans(const BeFsm_ptr self); 00195 00203 node_ptr BeFsm_get_fairness_list(const BeFsm_ptr self); 00204 00212 void 00213 BeFsm_apply_synchronous_product(BeFsm_ptr self, const BeFsm_ptr other); 00214 00215 00218 #endif /* __NUSMV_CORE_FSM_BE_BE_FSM_H__ */