Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

spot::ltl Namespace Reference


Classes

class  atomic_prop
 Atomic propositions. More...

class  binop
 Binary operator. More...

class  clone_visitor
 Clone a formula. More...

struct  const_visitor
 Formula visitor that cannot modify the formula. More...

class  constant
 A constant (True or False). More...

class  default_environment
 A laxist environment. More...

class  environment
 An environment that describes atomic propositions. More...

class  formula
 An LTL formula. More...

class  multop
 Multi-operand operators. More...

struct  multop::paircmp
 Comparison functor used internally by ltl::multop. More...

class  postfix_visitor
 Apply an algorithm on each node of an AST, during a postfix traversal. More...

class  ref_formula
 A reference-counted LTL formula. More...

class  unabbreviate_logic_visitor
 Clone and rewrite a formula to remove most of the abbreviated logical operators. More...

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

class  unop
 Unary operator. More...

struct  visitor
 Formula visitor that can modify the formula. More...


Typedefs

typedef std::pair< yy::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.


Functions

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.

bool format_parse_errors (std::ostream &os, const std::string &ltl_string, parse_error_list &error_list)
 Format diagnostics produced by spot::ltl::parse.

formulaclone (const formula *f)
 Clone a formula.

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.

formulaunabbreviate_logic (const formula *f)
 Clone and rewrite a formula to remove most of the abbreviated logical operators.

formulanegative_normal_form (const formula *f, bool negated=false)
 Build the negative normal form of f.

std::ostream & to_string (const formula *f, std::ostream &os)
 Output a formula as a (parsable) string.

std::string to_string (const formula *f)
 Convert a formula into a (parsable) string.

formulaunabbreviate_ltl (const formula *f)
 Clone and rewrite a formula to remove most of the abbreviated LTL and logical operators.


Typedef Documentation

typedef std::pair<yy::Location, std::string> spot::ltl::parse_error
 

A parse diagnostic with its location.

typedef std::list<parse_error> spot::ltl::parse_error_list
 

A list of parser diagnostics, as filled by parse.


Function Documentation

formula* clone const formula *  f  ) 
 

Clone a formula.

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.

Parameters:
os The stream where it should be output.
f The formula to translate.
dot is part of the GraphViz package http://www.research.att.com/sw/tools/graphviz/

std::ostream& dump std::ostream &  os,
const formula *  f
 

Dump a formula tree.

Parameters:
os The stream where it should be output.
f The formula to dump.
This is useful to display a formula when debugging.

bool format_parse_errors std::ostream &  os,
const std::string &  ltl_string,
parse_error_list &  error_list
 

Format diagnostics produced by spot::ltl::parse.

Parameters:
os Where diagnostics should be output.
ltl_string The string that were parsed.
error_list The error list filled by spot::ltl::parse while parsing ltl_string.
Returns:
true iff any diagnostic was output.

formula* negative_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.

Parameters:
f The formula to normalize.
negated If true, return the negative normal form of !f
Note that this will not remove abbreviated operators. If you want to remove abbreviations, call spot::ltl::unabbreviate_logic or spot::ltl::unabbreviate_ltl first. (Calling these functions after spot::ltl::negative_normal_form would likely produce a formula which is not in negative normal form.)

formula* parse 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.

Parameters:
ltl_string The string to parse.
error_list A list that will be filled with parse errors that occured during parsing.
env The environment into which parsing should take place.
debug When true, causes the parser to trace its execution.
Returns:
A pointer to the formula built from ltl_string, or 0 if the input was unparsable.
Note that the parser usually tries to recover from errors. It can return an non zero value even if it encountered error during the parsing of ltl_string. If you want to make sure ltl_string was parsed succesfully, check error_list for emptiness.

Warning:
This function is not reentrant.

std::string to_string const formula *  f  ) 
 

Convert a formula into a (parsable) string.

Parameters:
f The formula to translate.

std::ostream& to_string const formula *  f,
std::ostream &  os
 

Output a formula as a (parsable) string.

Parameters:
f The formula to translate.
os The stream where it should be output.

formula* unabbreviate_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.

formula* 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.


Generated on Mon Mar 8 23:32:16 2004 for spot by doxygen 1.3.5