00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00042 #ifndef __NUSMV_CORE_ENC_BOOL_BIT_VALUES_H__
00043 #define __NUSMV_CORE_ENC_BOOL_BIT_VALUES_H__
00044
00045 #include "nusmv/core/node/node.h"
00046 #include "nusmv/core/utils/utils.h"
00047 #include "nusmv/core/utils/NodeList.h"
00048
00055 typedef struct BitValues_TAG* BitValues_ptr;
00056
00057
00064 typedef enum BitValue_TAG {
00065 BIT_VALUE_FALSE,
00066 BIT_VALUE_TRUE,
00067 BIT_VALUE_DONTCARE,
00068 } BitValue;
00069
00076 #define BIT_VALUES(self) \
00077 ((BitValues_ptr) self)
00078
00084 #define BIT_VALUES_CHECK_INSTANCE(self) \
00085 (nusmv_assert(BIT_VALUES(self) != BIT_VALUES(NULL)))
00086
00087
00088
00091 struct BoolEnc_TAG;
00092
00093
00094
00095
00096
00105 BitValues_ptr
00106 BitValues_create(struct BoolEnc_TAG* enc, node_ptr var);
00107
00116 void BitValues_destroy(BitValues_ptr self);
00117
00124 node_ptr BitValues_get_scalar_var(const BitValues_ptr self);
00125
00132 size_t BitValues_get_size(const BitValues_ptr self);
00133
00141 NodeList_ptr BitValues_get_bits(const BitValues_ptr self);
00142
00149 void BitValues_reset(BitValues_ptr self);
00150
00157 BitValue BitValues_get(const BitValues_ptr self, size_t index);
00158
00166 BitValue
00167 BitValues_get_value_from_expr(const BitValues_ptr self, node_ptr expr);
00168
00175 void BitValues_set(BitValues_ptr self,
00176 size_t index, BitValue val);
00177
00185 void BitValues_set_from_expr(BitValues_ptr self,
00186 size_t index, node_ptr expr);
00187
00196 void BitValues_set_from_values_list(BitValues_ptr self,
00197 struct BoolEnc_TAG* enc,
00198 node_ptr vals);
00199
00204 #endif