X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=model.h;h=bd8791964baee4982c058c05c42d3678a7f621da;hb=5485feb8f53f4fe816b08d854fc3e82b00c33b0b;hp=1a2f6a145715fb7b8318eca7522048475ef9b436;hpb=1bc8782b55cab0503f1b64529f993f0b9e3a1846;p=model-checker.git diff --git a/model.h b/model.h index 1a2f6a1..bd87919 100644 --- a/model.h +++ b/model.h @@ -32,6 +32,12 @@ struct model_params { int maxfuturedelay; }; +struct PendingFutureValue { + uint64_t value; + modelclock_t expiration; + ModelAction * act; +}; + /** * Structure for holding small ModelChecker members that should be snapshotted */ @@ -75,11 +81,11 @@ public: ModelAction * get_parent_action(thread_id_t tid); bool next_execution(); bool isfeasible(); + bool isfeasibleotherthanRMW(); bool isfinalfeasible(); void check_promises(ClockVector *old_cv, ClockVector * merge_cv); void get_release_seq_heads(ModelAction *act, - std::vector *release_heads); - + std::vector< const ModelAction *, MyAlloc > *release_heads); void finish_execution(); bool isfeasibleprefix(); void set_assert() {asserted=true;} @@ -89,6 +95,7 @@ private: /** The scheduler to use: tracks the running/ready Threads */ Scheduler *scheduler; + bool thin_air_constraint_may_allow(const ModelAction * writer, const ModelAction *reader); bool has_asserted() {return asserted;} void reset_asserted() {asserted=false;} int num_executions; @@ -116,6 +123,7 @@ private: bool resolve_promises(ModelAction *curr); void compute_promises(ModelAction *curr); + void check_curr_backtracking(ModelAction * curr); void add_action_to_lists(ModelAction *act); ModelAction * get_last_action(thread_id_t tid); ModelAction * get_last_seq_cst(const void *location); @@ -125,7 +133,7 @@ private: bool r_modification_order(ModelAction *curr, const ModelAction *rf); bool w_modification_order(ModelAction *curr); bool release_seq_head(const ModelAction *rf, - std::vector *release_heads) const; + std::vector< const ModelAction *, MyAlloc > *release_heads) const; bool resolve_release_sequences(void *location); ModelAction *diverge; @@ -140,6 +148,7 @@ private: HashTable, uintptr_t, 4 > *obj_thrd_map; std::vector *promises; + std::vector *futurevalues; /** * Collection of lists of objects that might synchronize with one or