00001 /* --------------------------------------------------------------------------- 00002 00003 00004 This file is part of the ``prop'' 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_PROP_PROP_DB_PRIVATE_H__ 00040 #define __NUSMV_CORE_PROP_PROP_DB_PRIVATE_H__ 00041 00042 #if HAVE_CONFIG_H 00043 #include "nusmv-config.h" 00044 #endif 00045 00046 #include "nusmv/core/prop/PropDb.h" 00047 #include "nusmv/core/prop/Prop.h" 00048 00049 #include "nusmv/core/utils/object.h" 00050 #include "nusmv/core/utils/object_private.h" 00051 00052 #include "nusmv/core/utils/utils.h" 00053 #include "nusmv/core/utils/array.h" 00054 00055 #include "nusmv/core/utils/EnvObject.h" 00056 #include "nusmv/core/utils/EnvObject_private.h" 00057 00068 /* Those are the types of the virtual methods. They can be used for 00069 type casts in subclasses. */ 00070 00076 typedef int (*PropDb_prop_create_and_add_method)(PropDb_ptr, \ 00077 SymbTable_ptr, \ 00078 node_ptr, \ 00079 Prop_Type); 00080 00086 typedef void (*PropDb_verify_all_method)(const PropDb_ptr); 00087 00088 /* The class itself. */ 00089 typedef struct PropDb_TAG 00090 { 00091 /* this MUST stay on the top */ 00092 INHERITS_FROM(EnvObject); 00093 00094 /* -------------------------------------------------- */ 00095 /* Private members */ 00096 /* -------------------------------------------------- */ 00097 array_t* prop_database; /* contained properties */ 00098 00099 PropDb_PrintFmt print_fmt; /* print format */ 00100 00101 /* -------------------------------------------------- */ 00102 /* Virtual methods */ 00103 /* -------------------------------------------------- */ 00104 /* int (*)(PropDb_ptr, SymbTable_ptr, node_ptr, Prop_Type) */ 00105 PropDb_prop_create_and_add_method prop_create_and_add; 00106 /* void (*)(const PropDb_ptr) */ 00107 PropDb_verify_all_method verify_all; 00108 } PropDb; 00109 00110 00111 00112 /* ---------------------------------------------------------------------- */ 00113 /* Private methods to be used by derivated and friend classes only */ 00114 /* ---------------------------------------------------------------------- */ 00115 00124 void prop_db_init(PropDb_ptr self, NuSMVEnv_ptr environment); 00125 00134 void prop_db_deinit(PropDb_ptr self); 00135 00145 int prop_db_prop_create_and_add(PropDb_ptr self, 00146 SymbTable_ptr symb_table, 00147 node_ptr spec, 00148 Prop_Type type); 00149 00158 void prop_db_verify_all(const PropDb_ptr self); 00159 00160 00161 #endif /* __NUSMV_CORE_PROP_PROP_DB_PRIVATE_H__ */