X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=model.h;h=e92137d1c17b6222f867cd27cfdc568625dd9bd2;hb=2daff868a7ef4f6235c2776b746cec9947a87b13;hp=56d86acc98e022bcb65d91cd9a922201b6d5f00f;hpb=8311cfbfaef6d71448cb04de647ef89cba3d3b98;p=model-checker.git diff --git a/model.h b/model.h index 56d86ac..e92137d 100644 --- a/model.h +++ b/model.h @@ -113,6 +113,7 @@ public: void remove_thread(Thread *t); Thread * get_thread(thread_id_t tid) const; Thread * get_thread(const ModelAction *act) const; + int get_promise_number(const Promise *promise) const; bool is_enabled(Thread *t) const; bool is_enabled(thread_id_t tid) const; @@ -126,7 +127,6 @@ public: ClockVector * get_cv(thread_id_t tid) const; ModelAction * get_parent_action(thread_id_t tid) const; void check_promises_thread_disabled(); - void mo_check_promises(const ModelAction *act, bool is_read_check); void check_promises(thread_id_t tid, ClockVector *old_cv, ClockVector *merge_cv); bool isfeasibleprefix() const; @@ -149,13 +149,14 @@ private: void set_bad_synchronization(); bool promises_expired() const; void execute_sleep_set(); + bool should_wake_up(const ModelAction *curr, const Thread *thread) const; void wake_up_sleeping_actions(ModelAction *curr); modelclock_t get_next_seq_num(); bool next_execution(); ModelAction * check_current_action(ModelAction *curr); bool initialize_curr_action(ModelAction **curr); - bool process_read(ModelAction *curr, bool second_part_of_rmw); + bool process_read(ModelAction *curr); bool process_write(ModelAction *curr); bool process_fence(ModelAction *curr); bool process_mutex(ModelAction *curr); @@ -167,6 +168,7 @@ private: Thread * take_step(ModelAction *curr); void check_recency(ModelAction *curr, const ModelAction *rf); + ModelAction * get_last_fence_conflict(ModelAction *act) const; ModelAction * get_last_conflict(ModelAction *act) const; void set_backtracking(ModelAction *act); Thread * get_next_thread(ModelAction *curr); @@ -177,6 +179,9 @@ private: void compute_promises(ModelAction *curr); void compute_relseq_breakwrites(ModelAction *curr); + void mo_check_promises(const ModelAction *act, bool is_read_check); + void thread_blocking_check_promises(Thread *blocker, Thread *waiting); + void check_curr_backtracking(ModelAction *curr); void add_action_to_lists(ModelAction *act); ModelAction * get_last_action(thread_id_t tid) const; @@ -184,7 +189,7 @@ private: ModelAction * get_last_seq_cst_write(ModelAction *curr) const; ModelAction * get_last_seq_cst_fence(thread_id_t tid, const ModelAction *before_fence) const; ModelAction * get_last_unlock(ModelAction *curr) const; - void build_reads_from_past(ModelAction *curr); + void build_may_read_from(ModelAction *curr); ModelAction * process_rmw(ModelAction *curr); template