X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=execution.h;h=7f63e6d99812c98f5732d35c52a1e04f8691ac17;hb=b756884bdc8b22457243b76982cf10dc4598f927;hp=b152ae2a8386ae54ca235d9f20fd57271b10c4a8;hpb=aeb054abf1a84d816e655c14efb62adf20874080;p=model-checker.git diff --git a/execution.h b/execution.h index b152ae2..7f63e6d 100644 --- a/execution.h +++ b/execution.h @@ -61,11 +61,13 @@ struct release_seq { class ModelExecution { public: ModelExecution(ModelChecker *m, - struct model_params *params, + const struct model_params *params, Scheduler *scheduler, NodeStack *node_stack); ~ModelExecution(); + const struct model_params * get_params() const { return params; } + Thread * take_step(ModelAction *curr); void fixup_release_sequences(); @@ -107,11 +109,12 @@ public: bool is_feasible_prefix_ignore_relseq() const; bool is_infeasible() const; bool is_deadlocked() const; + bool is_yieldblocked() const; bool too_many_steps() const; ModelAction * get_next_backtrack(); - action_list_t * get_action_trace() const { return action_trace; } + action_list_t * get_action_trace() { return &action_trace; } SNAPSHOTALLOC private: @@ -185,20 +188,20 @@ private: ModelAction * get_uninitialized_action(const ModelAction *curr) const; - action_list_t * const action_trace; - HashTable * const thread_map; + action_list_t action_trace; + SnapVector thread_map; /** Per-object list of actions. Maps an object (i.e., memory location) * to a trace of all actions performed on the object. */ - HashTable * const obj_map; + HashTable obj_map; /** Per-object list of actions. Maps an object (i.e., memory location) * to a trace of all actions performed on the object. */ - HashTable * const condvar_waiters_map; + HashTable condvar_waiters_map; - HashTable *, uintptr_t, 4 > * const obj_thrd_map; - SnapVector * const promises; - SnapVector * const futurevalues; + HashTable *, uintptr_t, 4> obj_thrd_map; + SnapVector promises; + SnapVector futurevalues; /** * List of pending release sequences. Release sequences might be @@ -206,10 +209,10 @@ private: * are established. Each entry in the list may only be partially * filled, depending on its pending status. */ - SnapVector * const pending_rel_seqs; + SnapVector pending_rel_seqs; - SnapVector * const thrd_last_action; - SnapVector * const thrd_last_fence_release; + SnapVector thrd_last_action; + SnapVector thrd_last_fence_release; NodeStack * const node_stack; /** A special model-checker Thread; used for associating with