spot
0.8.2
|
Atomic propositions. More...
#include <ltlast/atomic_prop.hh>
Public Member Functions | |
virtual void | accept (visitor &visitor) |
Entry point for vspot::ltl::visitor instances. | |
virtual void | accept (const_visitor &visitor) const |
Entry point for vspot::ltl::const_visitor instances. | |
const std::string & | name () const |
Get the name of the atomic proposition. | |
environment & | env () const |
Get the environment of the atomic proposition. | |
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 atomic_prop * | instance (const std::string &name, environment &env) |
static unsigned | instance_count () |
Number of instantiated atomic propositions. For debugging. | |
static std::ostream & | dump_instances (std::ostream &os) |
List all instances of atomic propositions. For debugging. | |
Protected Types | |
typedef std::pair< std::string, environment * > | pair |
typedef std::map< pair, atomic_prop * > | map |
Protected Member Functions | |
atomic_prop (const std::string &name, environment &env) | |
virtual | ~atomic_prop () |
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 | |
std::string | name_ |
environment * | env_ |
Atomic propositions.
typedef std::map<pair, atomic_prop*> spot::ltl::atomic_prop::map [protected] |
typedef std::pair<std::string, environment*> spot::ltl::atomic_prop::pair [protected] |
spot::ltl::atomic_prop::atomic_prop | ( | const std::string & | name, |
environment & | env | ||
) | [protected] |
virtual spot::ltl::atomic_prop::~atomic_prop | ( | ) | [protected, virtual] |
virtual void spot::ltl::atomic_prop::accept | ( | visitor & | v | ) | [virtual] |
Entry point for vspot::ltl::visitor instances.
Implements spot::ltl::formula.
virtual void spot::ltl::atomic_prop::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::atomic_prop::dump | ( | ) | const [virtual] |
Return a canonic representation of the atomic proposition.
Implements spot::ltl::formula.
static std::ostream& spot::ltl::atomic_prop::dump_instances | ( | std::ostream & | os | ) | [static] |
List all instances of atomic propositions. For debugging.
environment& spot::ltl::atomic_prop::env | ( | ) | const |
Get the environment of the atomic proposition.
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 atomic_prop* spot::ltl::atomic_prop::instance | ( | const std::string & | name, |
environment & | env | ||
) | [static] |
Build an atomic proposition with name name in environment env.
static unsigned spot::ltl::atomic_prop::instance_count | ( | ) | [static] |
Number of instantiated atomic propositions. For debugging.
const std::string& spot::ltl::atomic_prop::name | ( | ) | const |
Get the name of the atomic proposition.
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.
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().
environment* spot::ltl::atomic_prop::env_ [private] |
map spot::ltl::atomic_prop::instances [static, protected] |
std::string spot::ltl::atomic_prop::name_ [private] |