spot
0.8.1
|
Binary operator. More...
#include <ltlast/binop.hh>
Public Types | |
enum | type { Xor, Implies, Equiv, U, R, W, M } |
Public Member Functions | |
virtual void | accept (visitor &v) |
Entry point for vspot::ltl::visitor instances. | |
virtual void | accept (const_visitor &v) const |
Entry point for vspot::ltl::const_visitor instances. | |
const formula * | first () const |
Get the first operand. | |
formula * | first () |
Get the first operand. | |
const formula * | second () const |
Get the second operand. | |
formula * | second () |
Get the second operand. | |
type | op () const |
Get the type of this operator. | |
const char * | op_name () const |
Get the type of this operator, as a string. | |
virtual std::string | dump () const |
Return a canonic representation of the atomic proposition. | |
formula * | clone () const |
clone this node | |
void | destroy () const |
release this node | |
size_t | hash () const |
Return a hash key for the formula. | |
Static Public Member Functions | |
static binop * | instance (type op, formula *first, formula *second) |
static unsigned | instance_count () |
Number of instantiated binary operators. For debugging. | |
static std::ostream & | dump_instances (std::ostream &os) |
Dump all instances. For debugging. | |
Protected Types | |
typedef std::pair< formula *, formula * > | pairf |
typedef std::pair< type, pairf > | pair |
typedef std::map< pair, binop * > | map |
Protected Member Functions | |
binop (type op, formula *first, formula *second) | |
virtual | ~binop () |
void | ref_ () |
increment reference counter if any | |
bool | unref_ () |
decrement reference counter if any, return true when the instance must be deleted (usually when the counter hits 0). | |
unsigned | ref_count_ () |
Number of references to this formula. | |
Protected Attributes | |
size_t | count_ |
The hash key of this formula. | |
Static Protected Attributes | |
static map | instances |
Private Attributes | |
type | op_ |
formula * | first_ |
formula * | second_ |
Binary operator.
typedef std::map<pair, binop*> spot::ltl::binop::map [protected] |
typedef std::pair<type, pairf> spot::ltl::binop::pair [protected] |
typedef std::pair<formula*, formula*> spot::ltl::binop::pairf [protected] |
spot::ltl::binop::binop | ( | type | op, |
formula * | first, | ||
formula * | second | ||
) | [protected] |
virtual spot::ltl::binop::~binop | ( | ) | [protected, virtual] |
virtual void spot::ltl::binop::accept | ( | visitor & | v | ) | [virtual] |
Entry point for vspot::ltl::visitor instances.
Implements spot::ltl::formula.
virtual void spot::ltl::binop::accept | ( | const_visitor & | v | ) | const [virtual] |
Entry point for vspot::ltl::const_visitor instances.
Implements spot::ltl::formula.
formula* spot::ltl::formula::clone | ( | ) | const [inherited] |
clone this node
This increments the reference counter of this node (if one is used).
void spot::ltl::formula::destroy | ( | ) | const [inherited] |
release this node
This decrements the reference counter of this node (if one is used) and can free the object.
Referenced by spot::taa_tgba_labelled< std::string, string_hash >::add_acceptance_condition(), and spot::tgba_explicit_labelled< std::string, string_hash >::declare_acceptance_condition().
virtual std::string spot::ltl::binop::dump | ( | ) | const [virtual] |
Return a canonic representation of the atomic proposition.
Implements spot::ltl::formula.
static std::ostream& spot::ltl::binop::dump_instances | ( | std::ostream & | os | ) | [static] |
Dump all instances. For debugging.
const formula* spot::ltl::binop::first | ( | ) | const |
Get the first operand.
Get the first operand.
size_t spot::ltl::formula::hash | ( | ) | const [inline, inherited] |
Return a hash key for the formula.
References spot::ltl::formula::count_.
Referenced by spot::ltl::formula_ptr_less_than::operator()(), and spot::ltl::formula_ptr_hash::operator()().
static binop* spot::ltl::binop::instance | ( | type | op, |
formula * | first, | ||
formula * | second | ||
) | [static] |
Build an unary operator with operation op and children first and second.
static unsigned spot::ltl::binop::instance_count | ( | ) | [static] |
Number of instantiated binary operators. For debugging.
type spot::ltl::binop::op | ( | ) | const |
Get the type of this operator.
const char* spot::ltl::binop::op_name | ( | ) | const |
Get the type of this operator, as a string.
void spot::ltl::ref_formula::ref_ | ( | ) | [protected, virtual, inherited] |
increment reference counter if any
Reimplemented from spot::ltl::formula.
unsigned spot::ltl::ref_formula::ref_count_ | ( | ) | [protected, inherited] |
Number of references to this formula.
const formula* spot::ltl::binop::second | ( | ) | const |
Get the second operand.
Get the second operand.
bool spot::ltl::ref_formula::unref_ | ( | ) | [protected, virtual, inherited] |
decrement reference counter if any, return true when the instance must be deleted (usually when the counter hits 0).
Reimplemented from spot::ltl::formula.
size_t spot::ltl::formula::count_ [protected, inherited] |
The hash key of this formula.
Referenced by spot::ltl::formula::hash().
formula* spot::ltl::binop::first_ [private] |
map spot::ltl::binop::instances [static, protected] |
type spot::ltl::binop::op_ [private] |
formula* spot::ltl::binop::second_ [private] |