00001
00004 #ifndef DIVINE_BYMOC_SYSTEM_HH
00005 #define DIVINE_BYMOC_SYSTEM_HH
00006
00007 #ifndef DOXYGEN_PROCESSING
00008 #include <fstream>
00009 #include "system/system.hh"
00010 #include "system/explicit_system.hh"
00011 #include "system/bymoc/bymoc_expression.hh"
00012 #include "common/array.hh"
00013 #include "common/error.hh"
00014 #include "system/bymoc/vm/nipsvm.h"
00015 #ifdef count
00016 #undef count
00017 #endif
00018 #ifdef max
00019 #undef max
00020 #endif
00021 #ifdef min
00022 #undef min
00023 #endif
00024 #ifdef PACKED
00025 #undef PACKED
00026 #endif
00027
00028 #define NIPSVM_STATE(s) reinterpret_cast<nipsvm_state_t *>(s)
00029
00030
00031 namespace divine {
00032 #endif //DOXYGEN_PROCESSING
00033
00035
00044 class bymoc_system_t: virtual public system_t
00045 {
00046 friend class bymoc_process_decomposition_t;
00047 protected:
00048
00049 nipsvm_t nipsvm;
00050
00051 public:
00053
00056 bymoc_system_t(error_vector_t & evect = gerr);
00058 virtual ~bymoc_system_t();
00059
00062
00063 virtual slong_int_t read(std::istream & ins = std::cin);
00065 virtual slong_int_t read(const char * const filename);
00067 virtual slong_int_t from_string(const std::string str);
00069 virtual bool write(const char * const filename);
00071 virtual void write(std::ostream & outs = std::cout);
00073 virtual std::string to_string();
00077
00078
00081
00082 virtual process_t * get_property_process();
00084 virtual const process_t * get_property_process() const;
00086 virtual size_int_t get_property_gid() const;
00088 virtual void set_property_gid(const size_int_t gid);
00092
00093
00096
00097 virtual size_int_t get_process_count() const;
00099 virtual process_t * get_process(const size_int_t gid);
00101 virtual const process_t * get_process(const size_int_t id) const;
00103 virtual property_type_t get_property_type();
00107
00108
00111
00112 virtual size_int_t get_trans_count() const;
00114 virtual transition_t * get_transition(size_int_t gid);
00116 virtual const transition_t * get_transition(size_int_t gid) const;
00119
00120
00123
00124 virtual void add_process(process_t * const process);
00126 virtual void remove_process(const size_int_t process_id);
00129 };
00130
00131 struct successor_state_ctx
00132 {
00133 successor_state_ctx (succ_container_t& succs) : succs (succs), succ_generation_type ( SUCC_NORMAL ) {};
00134 succ_container_t& succs;
00135 int succ_generation_type;
00136 };
00137
00138 #ifndef DOXYGEN_PROCESSING
00139 }
00140 #endif //DOXYGEN_PROCESSING
00141
00142 #endif