00001 /* --------------------------------------------------------------------------- 00002 00003 00004 This file is part of the ``hrc'' package of NuSMV version 2. 00005 Copyright (C) 2013 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_HRC_HRC_NODE_PRIVATE_H__ 00040 #define __NUSMV_CORE_HRC_HRC_NODE_PRIVATE_H__ 00041 00042 00043 #include "nusmv/core/hrc/HrcNode.h" 00044 #include "nusmv/core/utils/EnvObject.h" 00045 #include "nusmv/core/utils/EnvObject_private.h" 00046 #include "nusmv/core/utils/Olist.h" 00047 #include "nusmv/core/utils/defs.h" 00048 00058 typedef struct HrcNode_TAG 00059 { 00060 /* -------------------------------------------------- */ 00061 /* Private members */ 00062 /* -------------------------------------------------- */ 00063 INHERITS_FROM(EnvObject); 00064 00065 SymbTable_ptr st; /* The symbol table */ 00066 int lineno; /* line number of the module */ 00067 node_ptr name; /* The name of the module */ 00068 node_ptr instance_name; /* The instance name */ 00069 HrcNode_ptr parent; /* The pointer to the parent node */ 00070 Olist_ptr formal_parameters; /* formal parameters */ 00071 Olist_ptr actual_parameters; /* actual parameters */ 00072 Olist_ptr state_variables; /* state variables */ 00073 Olist_ptr input_variables; /* input variables */ 00074 Olist_ptr frozen_variables; /* frozen variables */ 00075 Olist_ptr state_functions; /* state functions */ 00076 Olist_ptr frozen_functions; /* frozen functions */ 00077 Olist_ptr defines; /* DEFINE x := */ 00078 Olist_ptr array_defines; /* ARRAY DEFINE x := */ 00079 Olist_ptr init_expr; /* init expression INIT */ 00080 Olist_ptr init_assign; /* init assignements init(x) :=.. */ 00081 Olist_ptr invar_expr; /* init expression INVAR */ 00082 Olist_ptr invar_assign; /* init assignements x :=.. */ 00083 Olist_ptr next_expr; /* init expression TRANS */ 00084 Olist_ptr next_assign; /* init assignements next(x) :=.. */ 00085 Olist_ptr justice; /* JUSTICE/FAIRNESS */ 00086 Olist_ptr compassion; /* COMPASSION */ 00087 Olist_ptr constants; /* CONSTANTS */ 00088 Olist_ptr invar_props; /* INVARSPEC */ 00089 Olist_ptr ctl_props; /* CTLSPEC */ 00090 Olist_ptr ltl_props; /* LTLSPEC */ 00091 Olist_ptr psl_props; /* PSLSPEC */ 00092 Olist_ptr compute_props; /* COMPUTE */ 00093 Slist_ptr childs; /* List of sub-childs */ 00094 hash_ptr assigns_table; /* Assignments hash (left part -> right part) */ 00095 void * undef; /* For programmers use. Here additional 00096 information can be attached for 00097 several use without having to modify 00098 the structure */ 00099 } HrcNode; 00100 00108 #define FREELIST_AND_SET_TO_NIL(list) \ 00109 Olist_destroy(list); \ 00110 list = OLIST(NULL); 00111 00121 #define FREE_LIST_AND_SET_TO_NIL(self, list) \ 00122 hrc_node_free_elements_in_list_and_list( \ 00123 NODE_MGR(NuSMVEnv_get_value(ENV_OBJECT_GET_ENV(self), ENV_NODE_MGR)), \ 00124 list); \ 00125 Olist_destroy(list); \ 00126 list = OLIST(NULL); 00127 00128 /* ---------------------------------------------------------------------- */ 00129 /* Private methods to be used by derivated and friend classes only */ 00130 /* ---------------------------------------------------------------------- */ 00131 00140 void hrc_node_init(HrcNode_ptr self, const NuSMVEnv_ptr env); 00141 00150 void hrc_node_deinit(HrcNode_ptr self); 00151 00152 #endif /* __NUSMV_CORE_HRC_HRC_NODE_PRIVATE_H__ */