Template ltlast/ & ltlenv/ classes in internal/ & Add ELTL parser.
This commit is contained in:
parent
21c98c0a01
commit
543190f2bc
74 changed files with 4299 additions and 468 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// Copyright (C) 2008 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
// et Marie Curie.
|
||||
//
|
||||
|
|
@ -24,8 +24,8 @@
|
|||
#ifndef SPOT_LTLAST_UNOP_HH
|
||||
# define SPOT_LTLAST_UNOP_HH
|
||||
|
||||
#include <map>
|
||||
#include "refformula.hh"
|
||||
# include "formula.hh"
|
||||
# include "internal/unop.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
@ -34,43 +34,7 @@ namespace spot
|
|||
|
||||
/// \brief Unary operators.
|
||||
/// \ingroup ltl_ast
|
||||
class unop : public ref_formula
|
||||
{
|
||||
public:
|
||||
enum type { Not, X, F, G };
|
||||
|
||||
/// Build an unary operator with operation \a op and
|
||||
/// child \a child.
|
||||
static unop* instance(type op, formula* child);
|
||||
|
||||
virtual void accept(visitor& v);
|
||||
virtual void accept(const_visitor& v) const;
|
||||
|
||||
/// Get the sole operand of this operator.
|
||||
const formula* child() const;
|
||||
/// Get the sole operand of this operator.
|
||||
formula* child();
|
||||
|
||||
/// Get the type of this operator.
|
||||
type op() const;
|
||||
/// Get the type of this operator, as a string.
|
||||
const char* op_name() const;
|
||||
|
||||
/// Number of instantiated unary operators. For debugging.
|
||||
static unsigned instance_count();
|
||||
|
||||
protected:
|
||||
typedef std::pair<type, formula*> pair;
|
||||
typedef std::map<pair, formula*> map;
|
||||
static map instances;
|
||||
|
||||
unop(type op, formula* child);
|
||||
virtual ~unop();
|
||||
|
||||
private:
|
||||
type op_;
|
||||
formula* child_;
|
||||
};
|
||||
typedef spot::internal::unop<ltl_t> unop;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue