00001 /* --------------------------------------------------------------------------- 00002 00003 00004 This file is part of the ``utils'' 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 00039 #ifndef __NUSMV_CORE_COMPILE_SYMB_TABLE_NFUNCTION_H__ 00040 #define __NUSMV_CORE_COMPILE_SYMB_TABLE_NFUNCTION_H__ 00041 00042 00043 #include "nusmv/core/utils/utils.h" 00044 #include "nusmv/core/compile/symb_table/SymbType.h" 00045 #include "nusmv/core/utils/NodeList.h" 00046 00053 #ifdef DEFINED_NFunction_ptr 00054 #else 00055 typedef struct NFunction_TAG* NFunction_ptr; 00056 #define DEFINED_NFunction_ptr 1 00057 #endif 00058 00065 #define N_FUNCTION(self) \ 00066 ((NFunction_ptr) self) 00067 00073 #define N_FUNCTION_CHECK_INSTANCE(self) \ 00074 (nusmv_assert(N_FUNCTION(self) != N_FUNCTION(NULL))) 00075 00076 00077 00080 /*---------------------------------------------------------------------------*/ 00081 /* Function prototypes */ 00082 /*---------------------------------------------------------------------------*/ 00083 00092 NFunction_ptr NFunction_create_uninterpreted(int num_args, 00093 SymbType_ptr* args, 00094 SymbType_ptr ret); 00095 00104 NFunction_ptr NFunction_create_interpreted(int num_args, 00105 SymbType_ptr* args, 00106 SymbType_ptr ret, 00107 void* body); 00108 00117 NFunction_ptr NFunction_copy(NFunction_ptr self); 00118 00127 void NFunction_destroy(NFunction_ptr self); 00128 00137 int NFunction_get_args_number(NFunction_ptr self); 00138 00147 NodeList_ptr NFunction_get_args(NFunction_ptr self); 00148 00157 SymbType_ptr NFunction_get_return_type(NFunction_ptr self); 00158 00165 SymbType_ptr NFunction_get_main_type(NFunction_ptr self); 00166 00173 boolean NFunction_is_uninterpreted(NFunction_ptr self); 00174 00181 void* NFunction_get_body(NFunction_ptr self); 00182 00186 boolean NFunction_equals(NFunction_ptr self, 00187 NFunction_ptr other); 00188 00193 #endif /* __NUSMV_CORE_COMPILE_SYMB_TABLE_NFUNCTION_H__ */