00001
00004 #ifndef DIVINE_MCRL_SYSTEM_HH
00005 #define DIVINE_MCRL_SYSTEM_HH
00006
00007 #ifdef HAVE_MCRL2
00008
00009 #ifndef DOXYGEN_PROCESSING
00010 #include <fstream>
00011 #include <string>
00012 #include <math.h>
00013 #include <list>
00014 #include "system/system.hh"
00015 #include "system/explicit_system.hh"
00016
00017 #include <mcrl2/lps/specification.h>
00018 #include <mcrl2/lps/nextstate.h>
00019 #include <mcrl2/core/aterm_ext.h>
00020 #include <aterm2.h>
00021
00022 #include "common/array.hh"
00023 #include "common/error.hh"
00024 #ifdef count
00025 #undef count
00026 #endif
00027 #ifdef max
00028 #undef max
00029 #endif
00030 #ifdef min
00031 #undef min
00032 #endif
00033 #ifdef PACKED
00034 #undef PACKED
00035 #endif
00036
00037
00038 namespace divine {
00039 #endif //DOXYGEN_PROCESSING
00040
00042
00049 class mcrl2_system_t: virtual public system_t
00050 {
00051 public:
00052
00053 mcrl2::lps::specification* mcrl2_system;
00054 NextState* nstate;
00055
00057
00060 mcrl2_system_t(error_vector_t & evect = gerr);
00062 virtual ~mcrl2_system_t();
00063
00067
00068 virtual slong_int_t read(std::istream & ins = std::cin) { UNIMPLEMENTED(slong_int_t); }
00070 virtual slong_int_t read(const char * const filename);
00072 virtual slong_int_t from_string(const std::string str) { UNIMPLEMENTED(slong_int_t); }
00074 virtual bool write(const char * const filename) { UNIMPLEMENTED(bool); }
00076 virtual void write(std::ostream & outs = std::cout) { UNIMPLEMENTED(void); }
00078 virtual std::string to_string() { UNIMPLEMENTED(std::string); }
00084
00085 virtual process_t * get_property_process() { UNIMPLEMENTED(process_t *); }
00087 virtual const process_t * get_property_process() const { UNIMPLEMENTED(process_t *); }
00089 virtual size_int_t get_property_gid() const { UNIMPLEMENTED(size_int_t); }
00091 virtual void set_property_gid(const size_int_t gid) { UNIMPLEMENTED(void); }
00097
00098 virtual size_int_t get_process_count() const { return 0; }
00100 virtual process_t * get_process(const size_int_t gid) { UNIMPLEMENTED(process_t *); }
00102 virtual const process_t * get_process(const size_int_t id) const { UNIMPLEMENTED(process_t *); }
00104 virtual property_type_t get_property_type() { UNIMPLEMENTED(property_type_t); }
00111
00112 virtual size_int_t get_trans_count() const { UNIMPLEMENTED(size_int_t); }
00114 virtual transition_t * get_transition(size_int_t gid) { UNIMPLEMENTED(transition_t *); }
00116 virtual const transition_t * get_transition(size_int_t gid) const { UNIMPLEMENTED(transition_t *); }
00122
00123 virtual void add_process(process_t * const process) { UNIMPLEMENTED(void); }
00125 virtual void remove_process(const size_int_t process_id) { UNIMPLEMENTED(void); }
00136 static bool binstates;
00137
00144 static char *ATwriteToSAFString(ATerm t, int *len) {
00145 static ATerm t_ = NULL;
00146 static char *res = NULL;
00147 static int len_ = 0;
00148
00149 if (t == t_) {
00150 *len = len_;
00151 return res;
00152 }
00153
00154 t_ = t;
00155 if (res) free(res);
00156 res = ::ATwriteToSAFString(t, &len_);
00157 *len = len_;
00158 return res;
00159 }
00161 };
00162
00163 #ifndef DOXYGEN_PROCESSING
00164 }
00165 #endif //DOXYGEN_PROCESSING
00166
00167 #else
00168 #define MCRL2_ATERM_INIT(x,y) do{}while(0)
00169 #endif
00170 #endif