typedef ModelList<FuncInst *> func_inst_list_mt;
typedef HashTable<void *, uint64_t, uintptr_t, 4, model_malloc, model_calloc, model_free> read_map_t;
+typedef HashSet<uint64_t, uint64_t, 0, model_malloc, model_calloc, model_free> write_set_t;
class FuncNode {
public:
uint64_t query_last_read(void * location, uint32_t tid);
void clear_read_map(uint32_t tid);
+ void add_to_write_history(void * location, uint64_t write_val);
+
/* TODO: generate EQUALITY or NULLITY predicate based on write_history in history.cc */
void generate_predicate(FuncInst * func_inst);
void print_last_read(uint32_t tid);
+ void print_write();
MEMALLOC
private:
/* Store the values read by atomic read actions per memory location for each thread */
ModelVector<read_map_t *> thrd_read_map;
- HashSet<void *, uintptr_t, 4, model_malloc, model_calloc, model_free> read_locations;
+
+ HashTable<void *, write_set_t *, uintptr_t, 4, model_malloc, model_calloc, model_free> write_history;
+ HashSet<void *, uintptr_t, 4, model_malloc, model_calloc, model_free> write_locations;
};
#endif /* __FUNCNODE_H__ */