| 41 | class Filter; |
| 42 | |
| 43 | class DFSRndNumGenerator : public AbsRndNumGenerator |
| 44 | { |
| 45 | public: |
| 46 | virtual ~DFSRndNumGenerator(); |
| 47 | |
| 48 | static DFSRndNumGenerator *make_rndnum_generator(); |
| 49 | |
| 50 | virtual std::string get_prefixed_name(const std::string &name); |
| 51 | |
| 52 | virtual std::string& trace_depth(); |
| 53 | |
| 54 | virtual void get_sequence(std::string &sequence); |
| 55 | |
| 56 | virtual unsigned int rnd_upto(const unsigned int n, const Filter *f = NULL, const std::string *where = NULL); |
| 57 | |
| 58 | virtual bool rnd_flipcoin(const unsigned int p, const Filter *f = NULL, const std::string *where = NULL); |
| 59 | |
| 60 | virtual std::string RandomHexDigits( int num ); |
| 61 | |
| 62 | virtual std::string RandomDigits( int num ); |
| 63 | |
| 64 | virtual enum RNDNUM_GENERATOR kind() { return rDFSRndNumGenerator; } |
| 65 | |
| 66 | bool eager_backtracking(int depth_needed); |
| 67 | |
| 68 | int get_decision_depth() { return decision_depth_; } |
| 69 | |
| 70 | void reset_state(void); |
| 71 | |
| 72 | int get_current_pos(void) { return current_pos_; } |
| 73 | |
| 74 | void set_current_pos(int pos) { current_pos_ = pos; } |
| 75 | |
| 76 | bool get_all_done(void) { return all_done_; } |
| 77 | |
| 78 | private: |
| 79 | // Forward declaration of nested class SearchState; |
| 80 | class SearchState; |
| 81 | |
| 82 | // ------------------------------------------------------------------------------------------ |
| 83 | DFSRndNumGenerator(Sequence *concrete_seq); |
| 84 | |
| 85 | int revisit_node(SearchState *state, int local_current_pos, |
| 86 | int bound, const Filter *f, const string *where); |
| 87 | |
| 88 | void initialize_sequence(const std::vector<int> &v); |
| 89 | |
| 90 | void dumpCurrentState(int bound, const std::string &where); |
| 91 | |
| 92 | virtual unsigned long genrand(void); |
| 93 | |
| 94 | bool filter_invalid_nums(vector<int> *invalid_nums, int v); |
| 95 | |
| 96 | int random_choice(int bound, const Filter *f = NULL, const std::string *where = NULL, std::vector<int> *invalid_nums = NULL); |
| 97 | |
| 98 | void init_states(int size); |
| 99 | |
| 100 | void log_depth(int d, const std::string *where = NULL, const char *log = NULL); |
nothing calls this directly
no outgoing calls
no test coverage detected