* src/ltlvisit/Makefile.am (libltlvisit_a_SOURCES): Add them. * src/ltlast/multop.cc (multop::multop(type)): New constructor. * src/ltlast/multop.hh (multop::multop(type)): New constructor. * src/ltltest/lunabbrev.test: New file. * src/ltltest/Makefile.am (TESTS): Add lunabbrev.test. (check_PROGRAMS): Add lunabbrev. (lunabbrev_SOURCES, lunabbrev_CPPFLAGS): New variables. * src/ltltest/equals.cc (main) [LUNABBREV]: Call unabbreviate_logic.
43 lines
838 B
C++
43 lines
838 B
C++
#ifndef SPOT_LTLAST_MULTOP_HH
|
|
# define SPOT_LTLAST_MULTOP_HH
|
|
|
|
#include <vector>
|
|
#include "formula.hh"
|
|
|
|
namespace spot
|
|
{
|
|
namespace ltl
|
|
{
|
|
|
|
class multop : public formula
|
|
{
|
|
public:
|
|
enum type { Or, And };
|
|
|
|
multop::multop(type op);
|
|
// A multop usually has at least two arguments.
|
|
multop(type op, formula* first, formula* second);
|
|
// More arguments can be added.
|
|
void add(formula* f);
|
|
|
|
virtual ~multop();
|
|
|
|
virtual void accept(visitor& v);
|
|
virtual void accept(const_visitor& v) const;
|
|
|
|
unsigned size() const;
|
|
const formula* nth(unsigned n) const;
|
|
formula* nth(unsigned n);
|
|
|
|
type op() const;
|
|
const char* op_name() const;
|
|
|
|
private:
|
|
type op_;
|
|
std::vector<formula*> children_;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif // SPOT_LTLAST_MULTOP_HH
|