spot  0.9.1
Namespaces | Classes | Typedefs | Enumerations | Functions
spot::ltl Namespace Reference

Namespaces

namespace  formula_tree
 

Trees representing formulae where atomic propositions are unknown.


Classes

class  atomic_prop
 Atomic propositions. More...
class  automatop
 Automaton operators. More...
class  binop
 Binary operator. More...
class  bunop
 Bounded unary operator. More...
class  constant
 A constant (True or False) More...
class  formula
 An LTL formula.The only way you can work with a formula is to build a spot::ltl::visitor or spot::ltl::const_visitor. More...
struct  formula_ptr_less_than
 Strict Weak Ordering for const formula*.This is meant to be used as a comparison functor for STL map whose key are of type const formula*. More...
struct  formula_ptr_hash
 Hash Function for const formula*.This is meant to be used as a hash functor for Sgi's hash_map whose key are of type const formula*. More...
class  multop
 Multi-operand operators. More...
class  nfa
 Nondeterministic Finite Automata used by automata operators. More...
class  succ_iterator
class  ref_formula
 A reference-counted LTL formula. More...
class  unop
 Unary operators. More...
struct  visitor
 Formula visitorImplementing visitors is the prefered way to traverse a formula, since it does not involve any cast. More...
class  declarative_environment
 A declarative environment.This environment recognizes all atomic propositions that have been previously declared. It will reject other. More...
class  default_environment
 A laxist environment.This environment recognizes all atomic propositions. More...
class  environment
 An environment that describes atomic propositions. More...
class  ltl_file
 Read LTL formulae from a file, one by one. More...
class  clone_visitor
 Clone a formula.This visitor is public, because it's convenient to derive from it and override part of its methods. But if you just want the functionality, consider using spot::ltl::formula::clone instead, it is way faster. More...
class  language_containment_checker
class  unabbreviate_logic_visitor
 Clone and rewrite a formula to remove most of the abbreviated logical operators.This will rewrite binary operators such as binop::Implies, binop::Equals, and binop::Xor, using only unop::Not, multop::Or, and multop::And. More...
class  mark_tools
class  postfix_visitor
 Apply an algorithm on each node of an AST, during a postfix traversal.Override one or more of the postifix_visitor::doit methods with the algorithm to apply. More...
class  random_formula
 Base class for random formula generators. More...
class  random_ltl
 Generate random LTL formulae.This class recursively constructs LTL formulae of a given size. The formulae will use the use atomic propositions from the set of propositions passed to the constructor, in addition to the constant and all LTL operators supported by Spot. More...
class  random_boolean
 Generate random Boolean formulae.This class recursively constructs Boolean formulae of a given size. The formulae will use the use atomic propositions from the set of propositions passed to the constructor, in addition to the constant and all Boolean operators supported by Spot. More...
class  random_sere
 Generate random SERE.This class recursively constructs SERE of a given size. The formulae will use the use atomic propositions from the set of propositions passed to the constructor, in addition to the constant and all SERE operators supported by Spot. More...
class  random_psl
 Generate random PSL formulae.This class recursively constructs PSL formulae of a given size. The formulae will use the use atomic propositions from the set of propositions passed to the constructor, in addition to the constant and all PSL operators supported by Spot. More...
class  simplify_f_g_visitor
 Replace true U f and false R g by F f and G g. More...
class  ltl_simplifier_options
class  ltl_simplifier
 Rewrite or simplify f in various ways. More...
class  unabbreviate_ltl_visitor
 Clone and rewrite a formula to remove most of the abbreviated LTL and logical operators.The rewriting performed on logical operator is the same as the one done by spot::ltl::unabbreviate_logic_visitor. More...

Typedefs

typedef std::pair
< ltlyy::location, std::string > 
parse_error
 A parse diagnostic with its location.
typedef std::list< parse_errorparse_error_list
 A list of parser diagnostics, as filled by parse.
typedef std::set< const
atomic_prop
*, formula_ptr_less_than
atomic_prop_set
 Set of atomic propositions.
typedef Sgi::hash_map< const
formula *, const formula
*, ptr_hash< formula > > 
snf_cache

Enumerations

enum  reduce_options {
  Reduce_None = 0, Reduce_Basics = 1, Reduce_Syntactic_Implications = 2, Reduce_Eventuality_And_Universality = 4,
  Reduce_Containment_Checks = 8, Reduce_Containment_Checks_Stronger = 16, Reduce_All = -1U
}
 Options for spot::ltl::reduce. More...

Functions

const atomic_propis_atomic_prop (const formula *f)
const binopis_binop (const formula *f)
 Cast f into a binop.
const binopis_binop (const formula *f, binop::type op)
 Cast f into a binop if it has type op.
const binopis_binop (const formula *f, binop::type op1, binop::type op2)
 Cast f into a binop if it has type op1 or op2.
const binopis_U (const formula *f)
 Cast f into a binop if it is a U.
const binopis_M (const formula *f)
 Cast f into a binop if it is a M.
const binopis_R (const formula *f)
 Cast f into a binop if it is a R.
const binopis_W (const formula *f)
 Cast f into a binop if it is a W.
const bunopis_bunop (const formula *f)
 Cast f into a bunop.
const bunopis_bunop (const formula *f, bunop::type op)
 Cast f into a bunop if it has type op.
const bunopis_Star (const formula *f)
 Cast f into a bunop if it is a Star.
const bunopis_KleenStar (const formula *f)
 Cast f into a bunop if it is a Star[0..].
const constantis_constant (const formula *f)
 Cast f into a constant.
std::ostream & print_formula_props (std::ostream &out, const formula *f, bool abbreviated=false)
 Print the properties of formula f on stream out.
std::list< std::string > list_formula_props (const formula *f)
 List the properties of formula f.
const multopis_multop (const formula *f)
 Cast f into a multop.
const multopis_multop (const formula *f, multop::type op)
 Cast f into a multop if it has type op.
const multopis_multop (const formula *f, multop::type op1, multop::type op2)
 Cast f into a multop if it has type op1 or op2.
const multopis_And (const formula *f)
 Cast f into a multop if it is an And.
const multopis_AndRat (const formula *f)
 Cast f into a multop if it is an AndRat.
const multopis_AndNLM (const formula *f)
 Cast f into a multop if it is an AndNLM.
const multopis_Or (const formula *f)
 Cast f into a multop if it is an Or.
const multopis_OrRat (const formula *f)
 Cast f into a multop if it is an OrRat.
const multopis_Concat (const formula *f)
 Cast f into a multop if it is a Concat.
const multopis_Fusion (const formula *f)
 Cast f into a multop if it is a Fusion.
const unopis_unop (const formula *f)
 Cast f into a unop.
const unopis_unop (const formula *f, unop::type op)
 Cast f into a unop if it has type op.
const unopis_Not (const formula *f)
 Cast f into a unop if it is a Not.
const unopis_X (const formula *f)
 Cast f into a unop if it is a X.
const unopis_F (const formula *f)
 Cast f into a unop if it is a F.
const unopis_G (const formula *f)
 Cast f into a unop if it is a G.
const unopis_GF (const formula *f)
 Cast f into a unop if has the form GF(...).
const unopis_FG (const formula *f)
 Cast f into a unop if has the form FG(...).
const formulaparse (const std::string &ltl_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false)
 Build a formula from an LTL string.
const formulaparse_sere (const std::string &sere_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false)
 Build a formula from a string representing a SERE.
bool format_parse_errors (std::ostream &os, const std::string &input_string, const parse_error_list &error_list)
 Format diagnostics produced by spot::ltl::parse or spot::ltl::ratexp.
void fix_utf8_locations (const std::string &ltl_string, parse_error_list &error_list)
 Fix location of diagnostics assuming the input is utf8.
atomic_prop_setatomic_prop_collect (const formula *f, atomic_prop_set *s=0)
 Return the set of atomic propositions occurring in a formula.
const formulaclone (const formula *f)
 Clone a formula.
const formulareduce_tau03 (const formula *f, bool stronger=true)
 Reduce a formula using language containment relationships.
void destroy (const formula *f)
 Destroys a formula.
std::ostream & dotty (std::ostream &os, const formula *f)
 Write a formula tree using dot's syntax.
std::ostream & dump (std::ostream &os, const formula *f)
 Dump a formula tree.
int length (const formula *f)
 Compute the length of a formula.The length of a formula is the number of atomic propositions, constants, and operators (logical and temporal) occurring in the formula. spot::ltl::multop instances with n arguments count for n-1; for instance a | b | c has length 5, even if there is only as single | node internally.
int length_boolone (const formula *f)
 Compute the length of a formula, squashing Boolean formulaeThis is similar to spot::ltl::length(), except all Boolean formulae are assumed to have length one.
const formulaunabbreviate_logic (const formula *f)
 Clone and rewrite a formula to remove most of the abbreviated logical operators.This will rewrite binary operators such as binop::Implies, binop::Equals, and binop::Xor, using only unop::Not, multop::Or, and multop::And.
const formulanegative_normal_form (const formula *f, bool negated=false)
 Build the negative normal form of f.All negations of the formula are pushed in front of the atomic propositions.
const formulareduce (const formula *f, int opt=Reduce_All)
 Reduce a formula f.
bool is_eventual (const formula *f)
 Check whether a formula is a pure eventuality.Pure eventuality formulae are defined in.
bool is_universal (const formula *f)
 Check whether a formula is purely universal.Purely universal formulae are defined in.
const formulasimplify_f_g (const formula *f)
 Replace true U f and false R g by F f and G g.
const formulastar_normal_form (const formula *sere, snf_cache *cache=0)
std::ostream & to_string (const formula *f, std::ostream &os, bool full_parent=false, bool ratexp=false)
 Output a formula as a string which is parsable unless the formula contains automaton operators (used in ELTL formulae).
std::string to_string (const formula *f, bool full_parent=false, bool ratexp=false)
 Output a formula as a string which is parsable unless the formula contains automaton operators (used in ELTL formulae).
std::ostream & to_utf8_string (const formula *f, std::ostream &os, bool full_parent=false, bool ratexp=false)
 Output a formula as an utf8 string which is parsable unless the formula contains automaton operators (used in ELTL formulae).
std::string to_utf8_string (const formula *f, bool full_parent=false, bool ratexp=false)
 Output a formula as an utf8 string which is parsable unless the formula contains automaton operators (used in ELTL formulae).
std::ostream & to_spin_string (const formula *f, std::ostream &os, bool full_parent=false)
 Output a formula as a (parsable by Spin) string.
std::string to_spin_string (const formula *f, bool full_parent=false)
 Convert a formula into a (parsable by Spin) string.
const formulaunabbreviate_ltl (const formula *f)
 Clone and rewrite a formula to remove most of the abbreviated LTL and logical operators.
const formulaunabbreviate_wm (const formula *f)
 Rewrite a formula to remove the W and M operators.

Typedef Documentation


Function Documentation

const multop* spot::ltl::is_And ( const formula *  f) [inline]

Cast f into a multop if it is an And.

Return 0 otherwise.

References spot::ltl::multop::And, and is_multop().

const multop* spot::ltl::is_AndNLM ( const formula *  f) [inline]

Cast f into a multop if it is an AndNLM.

Return 0 otherwise.

References spot::ltl::multop::AndNLM, and is_multop().

const multop* spot::ltl::is_AndRat ( const formula *  f) [inline]

Cast f into a multop if it is an AndRat.

Return 0 otherwise.

References spot::ltl::multop::AndRat, and is_multop().

const atomic_prop* spot::ltl::is_atomic_prop ( const formula *  f) [inline]
const binop* spot::ltl::is_binop ( const formula *  f) [inline]

Cast f into a binop.

Cast f into a binop iff it is a binop instance. Return 0 otherwise. This is faster than dynamic_cast.

References spot::ltl::formula::BinOp, and spot::ltl::formula::kind().

Referenced by is_binop(), is_M(), is_R(), is_U(), and is_W().

const binop* spot::ltl::is_binop ( const formula *  f,
binop::type  op 
) [inline]

Cast f into a binop if it has type op.

Cast f into a binop iff it is a unop instance with operator op. Returns 0 otherwise.

References is_binop().

const binop* spot::ltl::is_binop ( const formula *  f,
binop::type  op1,
binop::type  op2 
) [inline]

Cast f into a binop if it has type op1 or op2.

Cast f into a binop iff it is a unop instance with operator op1 or op2. Returns 0 otherwise.

References is_binop().

const bunop* spot::ltl::is_bunop ( const formula *  f) [inline]

Cast f into a bunop.

Cast f into a bunop iff it is a bunop instance. Return 0 otherwise. This is faster than dynamic_cast.

References spot::ltl::formula::BUnOp, and spot::ltl::formula::kind().

Referenced by is_bunop(), and is_Star().

const bunop* spot::ltl::is_bunop ( const formula *  f,
bunop::type  op 
) [inline]

Cast f into a bunop if it has type op.

Cast f into a bunop iff it is a bunop instance with operator op. Returns 0 otherwise.

References is_bunop().

const multop* spot::ltl::is_Concat ( const formula *  f) [inline]

Cast f into a multop if it is a Concat.

Return 0 otherwise.

References spot::ltl::multop::Concat, and is_multop().

const constant* spot::ltl::is_constant ( const formula *  f) [inline]

Cast f into a constant.

Cast f into a constant iff it is a constant instance. Return 0 otherwise. This is faster than dynamic_cast.

References spot::ltl::formula::Constant, and spot::ltl::formula::kind().

const unop* spot::ltl::is_F ( const formula *  f) [inline]

Cast f into a unop if it is a F.

Return 0 otherwise.

References spot::ltl::unop::F, and is_unop().

Referenced by is_FG(), and is_GF().

const unop* spot::ltl::is_FG ( const formula *  f) [inline]

Cast f into a unop if has the form FG(...).

Return 0 otherwise.

References is_F(), and is_G().

const multop* spot::ltl::is_Fusion ( const formula *  f) [inline]

Cast f into a multop if it is a Fusion.

Return 0 otherwise.

References spot::ltl::multop::Fusion, and is_multop().

const unop* spot::ltl::is_G ( const formula *  f) [inline]

Cast f into a unop if it is a G.

Return 0 otherwise.

References spot::ltl::unop::G, and is_unop().

Referenced by is_FG(), and is_GF().

const unop* spot::ltl::is_GF ( const formula *  f) [inline]

Cast f into a unop if has the form GF(...).

Return 0 otherwise.

References is_F(), and is_G().

const bunop* spot::ltl::is_KleenStar ( const formula *  f) [inline]

Cast f into a bunop if it is a Star[0..].

Return 0 otherwise.

References is_Star(), and spot::ltl::bunop::unbounded.

const binop* spot::ltl::is_M ( const formula *  f) [inline]

Cast f into a binop if it is a M.

Return 0 otherwise.

References is_binop(), and spot::ltl::binop::M.

const multop* spot::ltl::is_multop ( const formula *  f) [inline]

Cast f into a multop.

Cast f into a multop iff it is a multop instance. Return 0 otherwise. This is faster than dynamic_cast.

References spot::ltl::formula::kind(), and spot::ltl::formula::MultOp.

Referenced by is_And(), is_AndNLM(), is_AndRat(), is_Concat(), is_Fusion(), is_multop(), is_Or(), and is_OrRat().

const multop* spot::ltl::is_multop ( const formula *  f,
multop::type  op 
) [inline]

Cast f into a multop if it has type op.

Cast f into a multop iff it is a multop instance with operator op. Returns 0 otherwise.

References is_multop().

const multop* spot::ltl::is_multop ( const formula *  f,
multop::type  op1,
multop::type  op2 
) [inline]

Cast f into a multop if it has type op1 or op2.

Cast f into a multop iff it is a multop instance with operator op1 or op2. Returns 0 otherwise.

References is_multop().

const unop* spot::ltl::is_Not ( const formula *  f) [inline]

Cast f into a unop if it is a Not.

Return 0 otherwise.

References is_unop(), and spot::ltl::unop::Not.

const multop* spot::ltl::is_Or ( const formula *  f) [inline]

Cast f into a multop if it is an Or.

Return 0 otherwise.

References is_multop(), and spot::ltl::multop::Or.

const multop* spot::ltl::is_OrRat ( const formula *  f) [inline]

Cast f into a multop if it is an OrRat.

Return 0 otherwise.

References is_multop(), and spot::ltl::multop::OrRat.

const binop* spot::ltl::is_R ( const formula *  f) [inline]

Cast f into a binop if it is a R.

Return 0 otherwise.

References is_binop(), and spot::ltl::binop::R.

const bunop* spot::ltl::is_Star ( const formula *  f) [inline]

Cast f into a bunop if it is a Star.

Return 0 otherwise.

References is_bunop(), and spot::ltl::bunop::Star.

Referenced by is_KleenStar().

const binop* spot::ltl::is_U ( const formula *  f) [inline]

Cast f into a binop if it is a U.

Return 0 otherwise.

References is_binop(), and spot::ltl::binop::U.

const unop* spot::ltl::is_unop ( const formula *  f) [inline]

Cast f into a unop.

Cast f into a unop iff it is a unop instance. Return 0 otherwise. This is faster than dynamic_cast.

References spot::ltl::formula::kind(), and spot::ltl::formula::UnOp.

Referenced by is_F(), is_G(), is_Not(), is_unop(), and is_X().

const unop* spot::ltl::is_unop ( const formula *  f,
unop::type  op 
) [inline]

Cast f into a unop if it has type op.

Cast f into a unop iff it is a unop instance with operator op. Returns 0 otherwise.

References is_unop().

const binop* spot::ltl::is_W ( const formula *  f) [inline]

Cast f into a binop if it is a W.

Return 0 otherwise.

References is_binop(), and spot::ltl::binop::W.

const unop* spot::ltl::is_X ( const formula *  f) [inline]

Cast f into a unop if it is a X.

Return 0 otherwise.

References is_unop(), and spot::ltl::unop::X.

std::list<std::string> spot::ltl::list_formula_props ( const formula *  f)

List the properties of formula f.

std::ostream& spot::ltl::print_formula_props ( std::ostream &  out,
const formula *  f,
bool  abbreviated = false 
)

Print the properties of formula f on stream out.

const formula* spot::ltl::reduce_tau03 ( const formula *  f,
bool  stronger = true 
)

Reduce a formula using language containment relationships.

The method is taken from table 4.1 in

    ///@TechReport{	  tauriainen.03.a83,
    ///  author	= {Heikki Tauriainen},
    ///  title = {On Translating Linear Temporal Logic into Alternating and
    ///		  Nondeterministic Automata},
    ///  institution	= {Helsinki University of Technology, Laboratory for
    ///			   Theoretical Computer Science},
    ///  address	= {Espoo, Finland},
    ///  month		= dec,
    ///  number		= {A83},
    ///  pages		= {132},
    ///  type		= {Research Report},
    ///  year		= {2003},
    ///  note		= {Reprint of Licentiate's thesis}
    ///}
    /// 

(The "dagged" cells in the tables are not handled here.)

If stronger is set, additional rules are used to further reduce some U, R, and X usages.

Deprecated:
Use spot::ltl::ltl_simplifier instead.
const formula* spot::ltl::star_normal_form ( const formula *  sere,
snf_cache *  cache = 0 
)

Helper to rewrite a sere in Star Normal Form.

This should only be called on children of a Star operator. It corresponds to the E° operation defined in the following paper.

    /// @Article{	  bruggeman.96.tcs,
    ///   author	= {Anne Br{\"u}ggemann-Klein},
    ///   title		= {Regular Expressions into Finite Automata},
    ///   journal	= {Theoretical Computer Science},
    ///   year		= {1996},
    ///   volume	= {120},
    ///   pages		= {87--98}
    /// }
    /// 
Parameters:
serethe SERE to rewrite
cachean optional cache
const formula* spot::ltl::unabbreviate_ltl ( const formula *  f)

Clone and rewrite a formula to remove most of the abbreviated LTL and logical operators.

The rewriting performed on logical operator is the same as the one done by spot::ltl::unabbreviate_logic.

This will also rewrite unary operators such as unop::F, and unop::G, using only binop::U, and binop::R.


Please comment this page and report errors about it on the RefDocComments page.
Generated on Wed May 23 2012 12:06:47 for spot by doxygen 1.7.6.1