X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=model.h;h=d5dc42266769004d542d72f472f6e1029c1a7e5c;hb=2c830a91c32a55de67c21e03f36529f994d9139d;hp=dfc8e36c2be5e775ec82dab1e81a8adcfdaa2697;hpb=c832cb55af09e735821ae3463bc37c29d3fa27c8;p=model-checker.git diff --git a/model.h b/model.h index dfc8e36..d5dc422 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: @@ -150,7 +163,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 +187,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;