struct model_params {
int maxreads;
int maxfuturedelay;
+ unsigned int fairwindow;
+ unsigned int enabledcount;
};
struct PendingFutureValue {
bool isfeasibleprefix();
void set_assert() {asserted=true;}
+ /** @brief Alert the model-checker that an incorrectly-ordered
+ * synchronization was made */
+ void set_bad_synchronization() { bad_synchronization = true; }
+
+ const model_params params;
+
MEMALLOC
private:
/** The scheduler to use: tracks the running/ready Threads */
int num_executions;
int num_feasible_executions;
bool promises_expired();
- const model_params params;
/**
* Stores the ModelAction for the current thread action. Call this
ModelAction * initialize_curr_action(ModelAction *curr);
bool process_read(ModelAction *curr, bool second_part_of_rmw);
bool process_write(ModelAction *curr);
- void process_mutex(ModelAction *curr);
+ bool process_mutex(ModelAction *curr);
+ bool process_thread_action(ModelAction *curr);
bool check_action_enabled(ModelAction *curr);
bool take_step();
- void check_recency(ModelAction *curr);
+ void check_recency(ModelAction *curr, const ModelAction *rf);
ModelAction * get_last_conflict(ModelAction *act);
void set_backtracking(ModelAction *act);
Thread * get_next_thread(ModelAction *curr);
bool failed_promise;
bool too_many_reads;
bool asserted;
+ /** @brief Incorrectly-ordered synchronization was made */
+ bool bad_synchronization;
};
extern ModelChecker *model;