00001
00004 #ifndef DIVINE_BYMOC_EXPLICIT_SYSTEM_HH
00005 #define DIVINE_BYMOC_EXPLICIT_SYSTEM_HH
00006
00007 #ifndef DOXYGEN_PROCESSING
00008 #include "system/explicit_system.hh"
00009 #include "system/bymoc/bymoc_system.hh"
00010 #include "system/state.hh"
00011 #include "system/bymoc/bymoc_system_trans.hh"
00012 #include "common/types.hh"
00013 #include "common/deb.hh"
00014 #ifdef count
00015 #undef count
00016 #endif
00017 #ifdef max
00018 #undef max
00019 #endif
00020 #ifdef min
00021 #undef min
00022 #endif
00023 #ifdef PACKED
00024 #undef PACKED
00025 #endif
00026
00027 namespace divine {
00028 using std::cerr; using std::endl;
00029 #endif //DOXYGEN_PROCESSING
00030
00031 class succ_container_t;
00032 class enabled_trans_container_t;
00033
00034
00035
00036
00040
00050 class bymoc_explicit_system_t : public explicit_system_t, public bymoc_system_t
00051 {
00052
00053 private:
00054
00055 process_decomposition_t *property_decomposition;
00056
00057
00058 public:
00059
00061
00063
00064 bymoc_explicit_system_t(error_vector_t & evect);
00066 virtual ~bymoc_explicit_system_t();
00067
00071
00072
00073
00076 virtual bool is_erroneous(state_t state);
00078 virtual bool is_accepting(state_t state, size_int_t acc_group=0, size_int_t pair_member=1);
00079
00081
00083 virtual bool violates_assertion(const state_t state) const
00084 { if (state.ptr) return false;
00085 else return false;
00086 }
00087
00089
00091 virtual size_int_t violated_assertion_count(const state_t state) const
00092 { if (state.ptr) return 0;
00093 else return 0;
00094 }
00095
00097
00099 virtual std::string violated_assertion_string(const state_t state,
00100 const size_int_t index) const
00101 { if ((state.ptr) || index) return std::string("");
00102 else return std::string("");
00103 }
00104
00105
00107 virtual property_type_t get_property_type();
00108
00109
00112
00113 virtual size_int_t get_preallocation_count() const;
00116 virtual void print_state(state_t state, std::ostream & outs = std::cout);
00118 virtual state_t get_initial_state();
00120 virtual int get_succs(state_t state, succ_container_t & succs);
00122 virtual int get_ith_succ(state_t state, const int i, state_t & succ);
00125 process_decomposition_t * get_property_decomposition();
00126
00128
00132
00133 virtual int get_succs(state_t state, succ_container_t & succs,
00134 enabled_trans_container_t & etc);
00136 virtual int get_enabled_trans(const state_t state,
00137 enabled_trans_container_t & enb_trans);
00139 virtual int get_enabled_trans_count(const state_t state, size_int_t & count);
00141 virtual int get_enabled_ith_trans(const state_t state,
00142 const size_int_t i,
00143 enabled_trans_t & enb_trans);
00145 virtual bool get_enabled_trans_succ
00146 (const state_t state, const enabled_trans_t & enabled,
00147 state_t & new_state);
00149 virtual bool get_enabled_trans_succs
00150 (const state_t state, succ_container_t & succs,
00151 const enabled_trans_container_t & enabled_trans);
00153 virtual enabled_trans_t * new_enabled_trans() const;
00156
00157
00161
00162 virtual bool eval_expr(const expression_t * const expr,
00163 const state_t state,
00164 data_t & data) const;
00167 };
00168
00169
00170
00171 #ifndef DOXYGEN_PROCESSING
00172 }
00173 #include "common/undeb.hh"
00174
00175 #endif //DOXYGEN_PROCESSING
00176
00177 #endif