From: Brian Norris Date: Thu, 4 Apr 2013 17:10:32 +0000 (-0700) Subject: action: include reads-from-promise in HASH calculations X-Git-Tag: oopsla2013~105 X-Git-Url: http://demsky.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=28067adf4ed506b7e38ddf38e522d5a9621bef92 action: include reads-from-promise in HASH calculations And include the *value*, since the same promise index can yield different future values. --- diff --git a/action.cc b/action.cc index d425b60..34bc09f 100644 --- a/action.cc +++ b/action.cc @@ -630,8 +630,13 @@ unsigned int ModelAction::hash() const hash ^= seq_number << 5; hash ^= id_to_int(tid) << 6; - if (is_read() && reads_from) - hash ^= reads_from->get_seq_number(); + if (is_read()) { + if (reads_from) + hash ^= reads_from->get_seq_number(); + else if (reads_from_promise) + hash ^= model->get_promise_number(reads_from_promise); + hash ^= get_reads_from_value(); + } return hash; }