X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker.git;a=blobdiff_plain;f=model.h;h=d2baaf45afee14661a02c620649e4efdfcf107ee;hp=dfc8e36c2be5e775ec82dab1e81a8adcfdaa2697;hb=59eb730e1d19a0825008c40eb521bfc5c29df5f9;hpb=c832cb55af09e735821ae3463bc37c29d3fa27c8 diff --git a/model.h b/model.h index dfc8e36..d2baaf4 100644 --- a/model.h +++ b/model.h @@ -55,6 +55,19 @@ struct model_snapshot_members { ModelAction *next_backtrack; }; +/** @brief Records information regarding a single pending release sequence */ +struct release_seq { + /** @brief The acquire operation */ + ModelAction *acquire; + /** @brief The head of the RMW chain from which 'acquire' reads; may be + * equal to 'release' */ + const ModelAction *rf; + /** @brief The head of the potential longest release sequence chain */ + const ModelAction *release; + /** @brief The write(s) that may break the release sequence */ + std::vector writes; +}; + /** @brief The central structure for model-checking */ class ModelChecker { public: @@ -111,7 +124,8 @@ private: int num_executions; int num_feasible_executions; bool promises_expired(); - + void execute_sleep_set(); + void wake_up_sleeping_actions(ModelAction * curr); modelclock_t get_next_seq_num(); /** @@ -150,7 +164,7 @@ private: void post_r_modification_order(ModelAction *curr, const ModelAction *rf); bool r_modification_order(ModelAction *curr, const ModelAction *rf); bool w_modification_order(ModelAction *curr); - bool release_seq_heads(const ModelAction *rf, rel_heads_list_t *release_heads) const; + bool release_seq_heads(const ModelAction *rf, rel_heads_list_t *release_heads, struct release_seq *pending) const; bool resolve_release_sequences(void *location, work_queue_t *work_queue); void do_complete_join(ModelAction *join); @@ -174,12 +188,12 @@ private: std::vector *futurevalues; /** - * List of acquire actions that might synchronize with one or more - * release sequence. Release sequences might be determined lazily as - * promises are fulfilled and modification orders are established. Each - * ModelAction in this list must be an acquire operation. + * List of pending release sequences. Release sequences might be + * determined lazily as promises are fulfilled and modification orders + * are established. Each entry in the list may only be partially + * filled, depending on its pending status. */ - std::vector *pending_acq_rel_seq; + std::vector *pending_rel_seqs; std::vector *thrd_last_action; NodeStack *node_stack;