spot
0.8.1
|
Automaton operators. More...
#include <ltlast/automatop.hh>
Classes | |
struct | tripletcmp |
Comparison functor used internally by ltl::automatop. More... | |
Public Types | |
typedef std::vector< formula * > | vec |
List of formulae. | |
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 argument. | |
const formula * | nth (unsigned n) const |
Get the nth argument. | |
formula * | nth (unsigned n) |
Get the nth argument. | |
const spot::ltl::nfa::ptr | get_nfa () const |
Get the NFA of this operator. | |
bool | is_negated () const |
Whether the automaton is negated. | |
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 automatop * | instance (const nfa::ptr nfa, vec *v, bool negated) |
Build a spot::ltl::automatop with many children. | |
static unsigned | instance_count () |
Number of instantiated multop operators. For debugging. | |
static std::ostream & | dump_instances (std::ostream &os) |
Dump all instances. For debugging. | |
Protected Types | |
typedef std::pair< std::pair < nfa::ptr, bool >, vec * > | triplet |
typedef std::map< triplet, automatop *, tripletcmp > | map |
Protected Member Functions | |
automatop (const nfa::ptr, vec *v, bool negated) | |
virtual | ~automatop () |
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 | |
const nfa::ptr | nfa_ |
vec * | children_ |
bool | negated_ |
Automaton operators.
typedef std::map<triplet, automatop*, tripletcmp> spot::ltl::automatop::map [protected] |
typedef std::pair<std::pair<nfa::ptr, bool>, vec*> spot::ltl::automatop::triplet [protected] |
typedef std::vector<formula*> spot::ltl::automatop::vec |
List of formulae.
spot::ltl::automatop::automatop | ( | const nfa::ptr | , |
vec * | v, | ||
bool | negated | ||
) | [protected] |
virtual spot::ltl::automatop::~automatop | ( | ) | [protected, virtual] |
virtual void spot::ltl::automatop::accept | ( | visitor & | v | ) | [virtual] |
Entry point for vspot::ltl::visitor instances.
Implements spot::ltl::formula.
virtual void spot::ltl::automatop::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().
std::string spot::ltl::automatop::dump | ( | ) | const [virtual] |
Return a canonic representation of the atomic proposition.
Implements spot::ltl::formula.
static std::ostream& spot::ltl::automatop::dump_instances | ( | std::ostream & | os | ) | [static] |
Dump all instances. For debugging.
const spot::ltl::nfa::ptr spot::ltl::automatop::get_nfa | ( | ) | const |
Get the NFA of this operator.
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 automatop* spot::ltl::automatop::instance | ( | const nfa::ptr | nfa, |
vec * | v, | ||
bool | negated | ||
) | [static] |
Build a spot::ltl::automatop with many children.
This vector is acquired by the spot::ltl::automatop class, the caller should allocate it with new
, but not use it (especially not destroy it) after it has been passed to spot::ltl::automatop.
static unsigned spot::ltl::automatop::instance_count | ( | ) | [static] |
Number of instantiated multop operators. For debugging.
bool spot::ltl::automatop::is_negated | ( | ) | const |
Whether the automaton is negated.
const formula* spot::ltl::automatop::nth | ( | unsigned | n | ) | const |
Get the nth argument.
Starting with n = 0.
formula* spot::ltl::automatop::nth | ( | unsigned | n | ) |
Get the nth argument.
Starting with n = 0.
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.
unsigned spot::ltl::automatop::size | ( | ) | const |
Get the number of argument.
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.
vec* spot::ltl::automatop::children_ [private] |
size_t spot::ltl::formula::count_ [protected, inherited] |
The hash key of this formula.
Referenced by spot::ltl::formula::hash().
map spot::ltl::automatop::instances [static, protected] |
bool spot::ltl::automatop::negated_ [private] |
const nfa::ptr spot::ltl::automatop::nfa_ [private] |