spot  1.0.2
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | Static Private Attributes | List of all members
spot::ltl::bunop Class Reference

Bounded unary operator. More...

#include <ltlast/bunop.hh>

Inheritance diagram for spot::ltl::bunop:
Inheritance graph
Collaboration diagram for spot::ltl::bunop:
Collaboration graph

Public Types

enum  type { Star }
enum  opkind {
  Constant, AtomicProp, UnOp, BinOp,
  MultOp, BUnOp, AutomatOp
}
 Kind of a sub-formula. More...

Public Member Functions

virtual void accept (visitor &v) const
 Entry point for spot::ltl::visitor instances.
const formulachild () const
 Get the sole operand of this operator.
unsigned min () const
 Minimum number of repetition.
unsigned max () const
 Minimum number of repetition.
std::string format () const
 A string representation of the operator.
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 operation.
const formulaclone () const
 clone this node
void destroy () const
 release this node
opkind kind () const
 Return the kind of the top-level operator.
bool is_boolean () const
 Whether the formula use only boolean operators.
bool is_sugar_free_boolean () const
 Whether the formula use only AND, OR, and NOT operators.
bool is_in_nenoform () const
 Whether the formula is in negative normal form.
bool is_X_free () const
 Whether the formula avoids the X operator.
bool is_sugar_free_ltl () const
 Whether the formula avoids the F and G operators.
bool is_ltl_formula () const
 Whether the formula uses only LTL operators.
bool is_eltl_formula () const
 Whether the formula uses only ELTL operators.
bool is_psl_formula () const
 Whether the formula uses only PSL operators.
bool is_sere_formula () const
 Whether the formula uses only SERE operators.
bool is_finite () const
bool is_eventual () const
 Whether the formula is purely eventual.
bool is_universal () const
 Whether a formula is purely universal.
bool is_syntactic_safety () const
 Whether a PSL/LTL formula is syntactic safety property.
bool is_syntactic_guarantee () const
 Whether a PSL/LTL formula is syntactic guarantee property.
bool is_syntactic_obligation () const
 Whether a PSL/LTL formula is syntactic obligation property.
bool is_syntactic_recurrence () const
 Whether a PSL/LTL formula is syntactic recurrence property.
bool is_syntactic_persistence () const
 Whether a PSL/LTL formula is syntactic persistence property.
bool is_marked () const
 Whether the formula has an occurrence of EConcatMarked.
bool accepts_eword () const
 Whether the formula accepts [*0].
bool has_lbt_atomic_props () const
unsigned get_props () const
 The properties as a field of bits. For internal use.
size_t hash () const
 Return a hash key for the formula.

Static Public Member Functions

static const formulainstance (type op, const formula *child, unsigned min=0, unsigned max=unbounded)
 Build a bunop with bounds min and max.
static const formulasugar_goto (const formula *child, unsigned min=1, unsigned max=unbounded)
 Implement b[->i..j] using the Kleen star.
static const formulasugar_equal (const formula *child, unsigned min=0, unsigned max=unbounded)
 Implement b[=i..j] using the Kleen star.
static unsigned instance_count ()
 Number of instantiated unary operators. For debugging.
static std::ostream & dump_instances (std::ostream &os)
 Dump all instances. For debugging.
static const formulaone_star ()
 Return a formula for 1[*].

Static Public Attributes

static const unsigned unbounded = -1U

Protected Types

typedef std::pair< unsigned,
unsigned > 
pairu
typedef std::pair< type, const
formula * > 
pairo
typedef std::pair< pairo, pairupair
typedef std::map< pair, const
bunop * > 
map

Protected Member Functions

 bunop (type op, const formula *child, unsigned min, unsigned max)
virtual ~bunop ()
void ref_ () const
 increment reference counter if any
bool unref_ () const
 decrement reference counter if any, return true when the instance must be deleted (usually when the counter hits 0).
unsigned ref_count_ () const
 Number of references to this formula.

Protected Attributes

size_t count_
 The hash key of this formula.
union {
   unsigned   props
   ltl_prop   is
}; 

Static Protected Attributes

static map instances

Private Attributes

type op_
const formulachild_
unsigned min_
unsigned max_

Static Private Attributes

static const formulaone_star_

Detailed Description

Bounded unary operator.

Member Typedef Documentation

typedef std::map<pair, const bunop*> spot::ltl::bunop::map
protected
typedef std::pair<pairo, pairu> spot::ltl::bunop::pair
protected
typedef std::pair<type, const formula*> spot::ltl::bunop::pairo
protected
typedef std::pair<unsigned, unsigned> spot::ltl::bunop::pairu
protected

Member Enumeration Documentation

Kind of a sub-formula.

Enumerator:
Constant 
AtomicProp 
UnOp 
BinOp 
MultOp 
BUnOp 
AutomatOp 
Enumerator:
Star 

Constructor & Destructor Documentation

spot::ltl::bunop::bunop ( type  op,
const formula child,
unsigned  min,
unsigned  max 
)
protected
virtual spot::ltl::bunop::~bunop ( )
protectedvirtual

Member Function Documentation

virtual void spot::ltl::bunop::accept ( visitor v) const
virtual

Entry point for spot::ltl::visitor instances.

Implements spot::ltl::formula.

bool spot::ltl::formula::accepts_eword ( ) const
inlineinherited

Whether the formula accepts [*0].

References spot::ltl::formula::ltl_prop::accepting_eword, and spot::ltl::formula::is.

const formula* spot::ltl::bunop::child ( ) const

Get the sole operand of this operator.

const 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
virtual std::string spot::ltl::bunop::dump ( ) const
virtual

Return a canonic representation of operation.

Implements spot::ltl::formula.

static std::ostream& spot::ltl::bunop::dump_instances ( std::ostream &  os)
static

Dump all instances. For debugging.

std::string spot::ltl::bunop::format ( ) const

A string representation of the operator.

For instance "[*2..]".

unsigned spot::ltl::formula::get_props ( ) const
inlineinherited

The properties as a field of bits. For internal use.

References spot::ltl::formula::props.

bool spot::ltl::formula::has_lbt_atomic_props ( ) const
inlineinherited
size_t spot::ltl::formula::hash ( ) const
inlineinherited
static const formula* spot::ltl::bunop::instance ( type  op,
const formula child,
unsigned  min = 0,
unsigned  max = unbounded 
)
static

Build a bunop with bounds min and max.

The following trivial simplifications are performed automatically (the left expression is rewritten as the right expression):

  • 0[0..max] = [*0]
  • 0[*min..max] = 0 if min > 0
  • [*0][*min..max] = [*0]
  • Exp[*0] = [*0]
  • Exp[*i..j][*k..l] = Exp[*ik..jl] if i(k+1)<=jk+1.
  • Exp[*1] = Exp

These rewriting rules imply that it is not possible to build an LTL formula object that is SYNTACTICALLY equal to one of these left expressions.

Referenced by one_star().

static unsigned spot::ltl::bunop::instance_count ( )
static

Number of instantiated unary operators. For debugging.

bool spot::ltl::formula::is_boolean ( ) const
inlineinherited

Whether the formula use only boolean operators.

References spot::ltl::formula::ltl_prop::boolean, and spot::ltl::formula::is.

bool spot::ltl::formula::is_eltl_formula ( ) const
inlineinherited

Whether the formula uses only ELTL operators.

References spot::ltl::formula::ltl_prop::eltl_formula, and spot::ltl::formula::is.

bool spot::ltl::formula::is_eventual ( ) const
inlineinherited

Whether the formula is purely eventual.

Pure eventuality formulae are defined in
@verbatim 

/// { etessami.00.concur, /// author = {Kousha Etessami and Gerard J. Holzmann}, /// title = {Optimizing {B"u}chi Automata}, /// booktitle = {Proceedings of the 11th International Conference on /// Concurrency Theory (Concur'2000)}, /// pages = {153–167}, /// year = {2000}, /// editor = {C. Palamidessi}, /// volume = {1877}, /// series = {Lecture Notes in Computer Science}, /// publisher = {Springer-Verlag} /// } ///

A word that satisfies a pure eventuality can be prefixed by
anything and still satisfies the formula.  

References spot::ltl::formula::ltl_prop::eventual, and spot::ltl::formula::is.

bool spot::ltl::formula::is_finite ( ) const
inlineinherited

Whether a SERE describes a finite language, or an LTL formula uses no temporal operator but X.

References spot::ltl::formula::ltl_prop::finite, and spot::ltl::formula::is.

bool spot::ltl::formula::is_in_nenoform ( ) const
inlineinherited

Whether the formula is in negative normal form.

A formula is in negative normal form if the not operators occur only in front of atomic propositions.

References spot::ltl::formula::ltl_prop::in_nenoform, and spot::ltl::formula::is.

bool spot::ltl::formula::is_ltl_formula ( ) const
inlineinherited

Whether the formula uses only LTL operators.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::ltl_formula.

bool spot::ltl::formula::is_marked ( ) const
inlineinherited

Whether the formula has an occurrence of EConcatMarked.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::not_marked.

bool spot::ltl::formula::is_psl_formula ( ) const
inlineinherited

Whether the formula uses only PSL operators.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::psl_formula.

bool spot::ltl::formula::is_sere_formula ( ) const
inlineinherited

Whether the formula uses only SERE operators.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::sere_formula.

bool spot::ltl::formula::is_sugar_free_boolean ( ) const
inlineinherited

Whether the formula use only AND, OR, and NOT operators.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::sugar_free_boolean.

bool spot::ltl::formula::is_sugar_free_ltl ( ) const
inlineinherited

Whether the formula avoids the F and G operators.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::sugar_free_ltl.

bool spot::ltl::formula::is_syntactic_guarantee ( ) const
inlineinherited

Whether a PSL/LTL formula is syntactic guarantee property.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::syntactic_guarantee.

bool spot::ltl::formula::is_syntactic_obligation ( ) const
inlineinherited

Whether a PSL/LTL formula is syntactic obligation property.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::syntactic_obligation.

bool spot::ltl::formula::is_syntactic_persistence ( ) const
inlineinherited

Whether a PSL/LTL formula is syntactic persistence property.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::syntactic_persistence.

bool spot::ltl::formula::is_syntactic_recurrence ( ) const
inlineinherited

Whether a PSL/LTL formula is syntactic recurrence property.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::syntactic_recurrence.

bool spot::ltl::formula::is_syntactic_safety ( ) const
inlineinherited

Whether a PSL/LTL formula is syntactic safety property.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::syntactic_safety.

bool spot::ltl::formula::is_universal ( ) const
inlineinherited

Whether a formula is purely universal.

Purely universal formulae are defined in
@verbatim 

/// { etessami.00.concur, /// author = {Kousha Etessami and Gerard J. Holzmann}, /// title = {Optimizing {B"u}chi Automata}, /// booktitle = {Proceedings of the 11th International Conference on /// Concurrency Theory (Concur'2000)}, /// pages = {153–167}, /// year = {2000}, /// editor = {C. Palamidessi}, /// volume = {1877}, /// series = {Lecture Notes in Computer Science}, /// publisher = {Springer-Verlag} /// } ///

Any (non-empty) suffix of a word that satisfies a purely
universal formula also satisfies the formula.  

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::universal.

bool spot::ltl::formula::is_X_free ( ) const
inlineinherited

Whether the formula avoids the X operator.

References spot::ltl::formula::is, and spot::ltl::formula::ltl_prop::X_free.

opkind spot::ltl::formula::kind ( ) const
inlineinherited
unsigned spot::ltl::bunop::max ( ) const

Minimum number of repetition.

unsigned spot::ltl::bunop::min ( ) const

Minimum number of repetition.

static const formula* spot::ltl::bunop::one_star ( )
inlinestatic

Return a formula for 1[*].

A global instance is returned, and it should not be destroyed. Remember to clone it if you use it to build a formula.

References instance(), one_star_, Star, and spot::ltl::constant::true_instance().

type spot::ltl::bunop::op ( ) const

Get the type of this operator.

const char* spot::ltl::bunop::op_name ( ) const

Get the type of this operator, as a string.

void spot::ltl::ref_formula::ref_ ( ) const
protectedvirtualinherited

increment reference counter if any

Reimplemented from spot::ltl::formula.

unsigned spot::ltl::ref_formula::ref_count_ ( ) const
protectedinherited

Number of references to this formula.

static const formula* spot::ltl::bunop::sugar_equal ( const formula child,
unsigned  min = 0,
unsigned  max = unbounded 
)
static

Implement b[=i..j] using the Kleen star.

b[=i..j] is implemented as ((!b)[*];b)[*i..j];(!b)[*].

Precondition
child must be a Boolean formula.
static const formula* spot::ltl::bunop::sugar_goto ( const formula child,
unsigned  min = 1,
unsigned  max = unbounded 
)
static

Implement b[->i..j] using the Kleen star.

b[->i..j] is implemented as ((!b)[*];b)[*i..j].

Note that min defaults to 1, not 0, because [->] means [->1..].

Precondition
child must be a Boolean formula.
bool spot::ltl::ref_formula::unref_ ( ) const
protectedvirtualinherited

decrement reference counter if any, return true when the instance must be deleted (usually when the counter hits 0).

Reimplemented from spot::ltl::formula.

Member Data Documentation

union { ... }
const formula* spot::ltl::bunop::child_
private
size_t spot::ltl::formula::count_
protectedinherited

The hash key of this formula.

Referenced by spot::ltl::formula::hash().

map spot::ltl::bunop::instances
staticprotected
ltl_prop spot::ltl::formula::is
inherited
unsigned spot::ltl::bunop::max_
private
unsigned spot::ltl::bunop::min_
private
const formula* spot::ltl::bunop::one_star_
staticprivate

Referenced by one_star().

type spot::ltl::bunop::op_
private
unsigned spot::ltl::formula::props
inherited
const unsigned spot::ltl::bunop::unbounded = -1U
static

Referenced by spot::ltl::is_KleenStar().


The documentation for this class was generated from the following file:

Please comment this page and report errors about it on the RefDocComments page.
Generated on Wed Mar 6 2013 09:25:16 for spot by doxygen 1.8.1.2