spot  1.2.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
spot::ltl::binop Class Reference

Binary operator. More...

#include <ltlast/binop.hh>

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

Public Types

enum  type {
  Xor, Implies, Equiv, U,
  R, W, M, EConcat,
  EConcatMarked, UConcat
}
 
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. More...
 
const formulafirst () const
 Get the first operand. More...
 
const formulasecond () const
 Get the second operand. More...
 
type op () const
 Get the type of this operator. More...
 
const char * op_name () const
 Get the type of this operator, as a string. More...
 
virtual std::string dump () const
 Return a canonic representation of the atomic proposition. More...
 
const formulaclone () const
 clone this node More...
 
void destroy () const
 release this node More...
 
opkind kind () const
 Return the kind of the top-level operator. More...
 
bool is_boolean () const
 Whether the formula use only boolean operators. More...
 
bool is_sugar_free_boolean () const
 Whether the formula use only AND, OR, and NOT operators. More...
 
bool is_in_nenoform () const
 Whether the formula is in negative normal form. More...
 
bool is_X_free () const
 Whether the formula avoids the X operator. More...
 
bool is_sugar_free_ltl () const
 Whether the formula avoids the F and G operators. More...
 
bool is_ltl_formula () const
 Whether the formula uses only LTL operators. More...
 
bool is_eltl_formula () const
 Whether the formula uses only ELTL operators. More...
 
bool is_psl_formula () const
 Whether the formula uses only PSL operators. More...
 
bool is_sere_formula () const
 Whether the formula uses only SERE operators. More...
 
bool is_finite () const
 
bool is_eventual () const
 Whether the formula is purely eventual. More...
 
bool is_universal () const
 Whether a formula is purely universal. More...
 
bool is_syntactic_safety () const
 Whether a PSL/LTL formula is syntactic safety property. More...
 
bool is_syntactic_guarantee () const
 Whether a PSL/LTL formula is syntactic guarantee property. More...
 
bool is_syntactic_obligation () const
 Whether a PSL/LTL formula is syntactic obligation property. More...
 
bool is_syntactic_recurrence () const
 Whether a PSL/LTL formula is syntactic recurrence property. More...
 
bool is_syntactic_persistence () const
 Whether a PSL/LTL formula is syntactic persistence property. More...
 
bool is_marked () const
 Whether the formula has an occurrence of EConcatMarked. More...
 
bool accepts_eword () const
 Whether the formula accepts [*0]. More...
 
bool has_lbt_atomic_props () const
 
unsigned get_props () const
 The properties as a field of bits. For internal use. More...
 
size_t hash () const
 Return a hash key for the formula. More...
 

Static Public Member Functions

static const formulainstance (type op, const formula *first, const formula *second)
 Build a unary operator with operation op and children first and second. More...
 
static unsigned instance_count ()
 Number of instantiated binary operators. For debugging. More...
 
static std::ostream & dump_instances (std::ostream &os)
 Dump all instances. For debugging. More...
 

Protected Types

typedef std::pair< const
formula *, const formula * > 
pairf
 
typedef std::pair< type, pairf > pair
 
typedef std::map< pair, const
binop * > 
map
 

Protected Member Functions

 binop (type op, const formula *first, const formula *second)
 
void ref_ () const
 increment reference counter if any More...
 
bool unref_ () const
 decrement reference counter if any, return true when the instance must be deleted (usually when the counter hits 0). More...
 
unsigned ref_count_ () const
 Number of references to this formula. More...
 

Protected Attributes

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

Static Protected Attributes

static map instances
 

Detailed Description

Binary operator.

Member Enumeration Documentation

Kind of a sub-formula.

Different kinds of binary opertaors

And and Or are not here. Because they are often nested we represent them as multops.

Enumerator
U 

until

R 

release (dual of until)

W 

weak until

M 

strong release (dual of weak until)

EConcat 

Existential Concatenation.

EConcatMarked 

Existential Concatenation, Marked.

UConcat 

Universal Concatenation.

Member Function Documentation

virtual void spot::ltl::binop::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].

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

release this node

This decrements the reference counter of this node (if one is used) and can free the object.

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
inline

Get the first operand.

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

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

size_t spot::ltl::formula::hash ( ) const
inlineinherited

Return a hash key for the formula.

static const formula* spot::ltl::binop::instance ( type  op,
const formula first,
const formula second 
)
static

Build a unary operator with operation op and children first and second.

Some reordering will be performed on arguments of commutative operators (Xor and Equiv) to ensure that for instance (a <=> b) is the same formula as (b <=> a).

Furthermore, the following trivial simplifications are performed (the left formula is rewritten as the right formula):

  • (1 => Exp) = Exp
  • (0 => Exp) = 1
  • (Exp => 1) = 1
  • (Exp => 0) = !Exp
  • (Exp => Exp) = 1
  • (1 ^ Exp) = !Exp
  • (0 ^ Exp) = Exp
  • (Exp ^ Exp) = 0
  • (0 <=> Exp) = !Exp
  • (1 <=> Exp) = Exp
  • (Exp <=> Exp) = Exp
  • (Exp U 1) = 1
  • (Exp U 0) = 0
  • (0 U Exp) = Exp
  • (Exp U Exp) = Exp
  • (Exp W 1) = 1
  • (0 W Exp) = Exp
  • (1 W Exp) = 1
  • (Exp W Exp) = Exp
  • (Exp R 1) = 1
  • (Exp R 0) = 0
  • (1 R Exp) = Exp
  • (Exp R Exp) = Exp
  • (Exp M 0) = 0
  • (1 M Exp) = Exp
  • (0 M Exp) = 0
  • (Exp M Exp) = Exp
  • 0 <>-> Exp = 0
  • 1 <>-> Exp = Exp
  • [*0] <>-> Exp = 0
  • Exp <>-> 0 = 0
  • boolExp <>-> Exp = boolExp & Exp
  • 0 []-> Exp = 1
  • 1 []-> Exp = Exp
  • [*0] []-> Exp = 1
  • Exp []-> 1 = 1
  • boolExp <>-> Exp = !boolExp | Exp
static unsigned spot::ltl::binop::instance_count ( )
static

Number of instantiated binary operators. For debugging.

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

Whether the formula use only boolean operators.

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

Whether the formula uses only ELTL operators.

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

Whether the formula is purely eventual.

Pure eventuality formulae are defined in

@InProceedings{   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.

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.

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.

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

Whether the formula uses only LTL operators.

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

Whether the formula has an occurrence of EConcatMarked.

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

Whether the formula uses only PSL operators.

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

Whether the formula uses only SERE operators.

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

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

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

Whether the formula avoids the F and G operators.

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

Whether a PSL/LTL formula is syntactic guarantee property.

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

Whether a PSL/LTL formula is syntactic obligation property.

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

Whether a PSL/LTL formula is syntactic persistence property.

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

Whether a PSL/LTL formula is syntactic recurrence property.

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

Whether a PSL/LTL formula is syntactic safety property.

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

Whether a formula is purely universal.

Purely universal formulae are defined in

@InProceedings{   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.

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

Whether the formula avoids the X operator.

opkind spot::ltl::formula::kind ( ) const
inlineinherited

Return the kind of the top-level operator.

type spot::ltl::binop::op ( ) const
inline

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_ ( ) 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.

const formula* spot::ltl::binop::second ( ) const
inline

Get the second operand.

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

size_t spot::ltl::formula::count_
protectedinherited

The hash key of this formula.


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

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Thu May 15 2014 11:04:12 for spot by doxygen 1.8.4