binop.hh
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00029 #ifndef SPOT_LTLAST_BINOP_HH
00030 # define SPOT_LTLAST_BINOP_HH
00031
00032 #include <map>
00033 #include <iosfwd>
00034 #include "refformula.hh"
00035
00036 namespace spot
00037 {
00038 namespace ltl
00039 {
00040
00043 class binop : public ref_formula
00044 {
00045 public:
00050 enum type { Xor,
00051 Implies,
00052 Equiv,
00053 U,
00054 R,
00055 W,
00056 M
00057 };
00058
00061 static binop* instance(type op, formula* first, formula* second);
00062
00063 virtual void accept(visitor& v);
00064 virtual void accept(const_visitor& v) const;
00065
00067 const formula* first() const;
00069 formula* first();
00071 const formula* second() const;
00073 formula* second();
00074
00076 type op() const;
00078 const char* op_name() const;
00079
00081 virtual std::string dump() const;
00082
00084 static unsigned instance_count();
00085
00087 static std::ostream& dump_instances(std::ostream& os);
00088
00089 protected:
00090 typedef std::pair<formula*, formula*> pairf;
00091 typedef std::pair<type, pairf> pair;
00092 typedef std::map<pair, binop*> map;
00093 static map instances;
00094
00095 binop(type op, formula* first, formula* second);
00096 virtual ~binop();
00097
00098 private:
00099 type op_;
00100 formula* first_;
00101 formula* second_;
00102 };
00103
00104 }
00105 }
00106
00107 #endif // SPOT_LTLAST_BINOP_HH