X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=model.h;h=04e191bed53340819ee1fa87c326bf9bcfbc89a6;hb=199026a7c70a7274d2dcf5b8eb25dbe13e4f8875;hp=447c77d74e56c01781d415ee95bd0a1a7b76b74a;hpb=14653dd20b5fee25e5077ce6a154022fc9f85ce7;p=model-checker.git diff --git a/model.h b/model.h index 447c77d..04e191b 100644 --- a/model.h +++ b/model.h @@ -50,6 +50,12 @@ struct model_params { /** @brief Verbosity (0 = quiet; 1 = noisy) */ int verbose; + + /** @brief Command-line argument count to pass to user program */ + int argc; + + /** @brief Command-line arguments to pass to user program */ + char **argv; }; /** @brief Model checker execution stats */ @@ -58,6 +64,7 @@ struct execution_stats { int num_infeasible; /**< @brief Number of infeasible executions */ int num_buggy_executions; /** @brief Number of buggy executions */ int num_complete; /**< @brief Number of feasible, non-buggy, complete executions */ + int num_redundant; /**< @brief Number of redundant, aborted executions */ }; struct PendingFutureValue { @@ -121,14 +128,11 @@ public: bool assert_bug(const char *msg); void assert_user_bug(const char *msg); - void set_assert() {asserted=true;} bool is_deadlocked() const; bool is_complete_execution() const; void print_stats() const; - /** @brief Alert the model-checker that an incorrectly-ordered - * synchronization was made */ - void set_bad_synchronization() { bad_synchronization = true; } + void set_bad_synchronization(); const model_params params; Node * get_curr_node(); @@ -141,8 +145,8 @@ private: bool sleep_can_read_from(ModelAction * curr, const ModelAction *write); bool thin_air_constraint_may_allow(const ModelAction * writer, const ModelAction *reader); bool mo_may_allow(const ModelAction * writer, const ModelAction *reader); - bool has_asserted() {return asserted;} - void reset_asserted() {asserted=false;} + bool has_asserted() const; + void set_assert(); bool promises_expired() const; void execute_sleep_set(); void wake_up_sleeping_actions(ModelAction * curr); @@ -240,11 +244,6 @@ private: * b. */ CycleGraph *mo_graph; - bool failed_promise; - bool too_many_reads; - bool asserted; - /** @brief Incorrectly-ordered synchronization was made */ - bool bad_synchronization; /** @brief The cumulative execution stats */ struct execution_stats stats; @@ -252,6 +251,7 @@ private: bool have_bug_reports() const; void print_bugs() const; + void print_execution(bool printbugs) const; }; extern ModelChecker *model;