22 #ifndef SPOT_LTLAST_BUNOP_HH
23 # define SPOT_LTLAST_BUNOP_HH
42 static const unsigned unbounded = -1U;
59 static const formula* instance(type op,
62 unsigned max = unbounded);
75 unsigned max = unbounded);
85 unsigned max = unbounded);
87 virtual void accept(
visitor& v)
const;
110 std::string format()
const;
119 const char* op_name()
const;
122 virtual std::string
dump()
const;
125 static unsigned instance_count();
128 static std::ostream& dump_instances(std::ostream& os);
143 typedef std::pair<unsigned, unsigned> pairu;
144 typedef std::pair<type, const formula*> pairo;
145 typedef std::pair<pairo, pairu> pair;
146 typedef std::map<pair, const bunop*> map;
147 static map instances;
149 bunop(type op,
const formula* child,
unsigned min,
unsigned max);
157 static const formula* one_star_;
168 if (f->
kind() != formula::BUnOp)
170 return static_cast<const bunop*
>(f);
179 is_bunop(
const formula* f, bunop::type op)
181 if (
const bunop* bo = is_bunop(f))
192 is_Star(
const formula* f)
194 return is_bunop(f, bunop::Star);
202 is_KleenStar(
const formula* f)
204 if (
const bunop* b = is_Star(f))
205 if (b->min() == 0 && b->max() == bunop::unbounded)
212 #endif // SPOT_LTLAST_BUNOP_HH