#include <multop.hh>
Inheritance diagram for spot::ltl::multop:
Public Types | |
typedef std::vector< formula * > | vec |
List of formulae. | |
enum | type { Or, And } |
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. | |
unsigned | size () const |
Get the number of children. | |
const formula * | nth (unsigned n) const |
Get the nth children. | |
formula * | nth (unsigned n) |
Get the nth children. | |
type | op () const |
Get the type of this operator. | |
const char * | op_name () const |
Get the type of this operator, as a string. | |
formula * | ref () |
clone this node | |
Static Public Member Functions | |
formula * | instance (type op, formula *first, formula *second) |
Build a spot::ltl::multop with two children. | |
formula * | instance (type op, vec *v) |
Build a spot::ltl::multop with many children. | |
unsigned | instance_count () |
Number of instantiated multi-operand operators. For debugging. | |
void | unref (formula *f) |
release this node | |
Protected Types | |
typedef std::pair< type, vec * > | pair |
typedef std::map< pair, formula *, paircmp > | map |
Protected Member Functions | |
multop (type op, vec *v) | |
virtual | ~multop () |
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. | |
Static Protected Attributes | |
map | instances |
Private Attributes | |
type | op_ |
vec * | children_ |
These operators are considered commutative and associative.
|
|
|
|
|
List of formulae.
|
|
|
|
|
|
|
|
Entry point for vspot::ltl::const_visitor instances.
Implements spot::ltl::formula. |
|
Entry point for vspot::ltl::visitor instances.
Implements spot::ltl::formula. |
|
Build a spot::ltl::multop with many children.
Same as the other instance() function, but take a vector of formula in argument. This vector is acquired by the spot::ltl::multop class, the caller should allocate it with This functions can perform slight optimizations and may not return an ltl::multop objects. For instance if the vector contain only one unique element, this this formula will be returned as-is. |
|
Build a spot::ltl::multop with two children. If one of the children itself is a spot::ltl::multop with the same type, it will be merged. I.e., children if that child will be added, and that child itself will be destroyed. This allows incremental building of n-ary ltl::multop.
This functions can perform slight optimizations and may not return an ltl::multop objects. For instance if |
|
Number of instantiated multi-operand operators. For debugging.
|
|
Get the nth children. Starting with n = 0. |
|
Get the nth children. Starting with n = 0. |
|
Get the type of this operator.
|
|
Get the type of this operator, as a string.
|
|
clone this node This increments the reference counter of this node (if one is used). You should almost never use this method directly as it doesn't touch the children. If you want to clone a whole formula, use spot::ltl::clone() instead. |
|
increment reference counter if any
Reimplemented from spot::ltl::formula. |
|
Number of references to this formula.
|
|
Get the number of children.
|
|
release this node This decrements the reference counter of this node (if one is used) and can free the object. You should almost never use this method directly as it doesn't touch the children. If you want to release a whole formula, use spot::ltl::destroy() instead. |
|
decrement reference counter if any, return true when the instance must be deleted (usually when the counter hits 0).
Reimplemented from spot::ltl::formula. |
|
|
|
|
|
|