Input/Output of LTL formulae
[Algorithms for LTL formulae]

Classes

class  spot::ltl::ltl_file
 Read LTL formulae from a file, one by one. More...
class  spot::ltl::random_ltl
 Generate random LTL formulae.This class recursively construct LTL formulae of a given size. The formulae will use the use atomic propositions from the set of proposition passed to the constructor, in addition to the constant and all LTL operators supported by Spot. More...

Typedefs

typedef std::pair< std::string,
std::string > 
spot::eltl::spair
typedef std::pair
< eltlyy::location, spair > 
spot::eltl::parse_error
 A parse diagnostic <location, <file, message>>.
typedef std::list< parse_error > spot::eltl::parse_error_list
 A list of parser diagnostics, as filled by parse.
typedef std::pair
< ltlyy::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.

Functions

formula * spot::eltl::parse_file (const std::string &filename, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false)
 Build a formula from a text file.
formula * spot::eltl::parse_string (const std::string &eltl_string, parse_error_list &error_list, environment &env=default_environment::instance(), bool debug=false)
 Build a formula from an ELTL string.
bool spot::eltl::format_parse_errors (std::ostream &os, parse_error_list &error_list)
 Format diagnostics produced by spot::eltl::parse.
formula * spot::ltl::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.
bool spot::ltl::format_parse_errors (std::ostream &os, const std::string &ltl_string, parse_error_list &error_list)
 Format diagnostics produced by spot::ltl::parse.
std::ostream & spot::ltl::dotty (std::ostream &os, const formula *f)
 Write a formula tree using dot's syntax.
std::ostream & spot::ltl::dump (std::ostream &os, const formula *f)
 Dump a formula tree.
std::ostream & spot::ltl::to_string (const formula *f, std::ostream &os, bool full_parent=false)
 Output a formula as a string which is parsable unless the formula contains automaton operators (used in ELTL formulae).
std::string spot::ltl::to_string (const formula *f, bool full_parent=false)
 Output a formula as a string which is parsable unless the formula contains automaton operators (used in ELTL formulae).
std::ostream & spot::ltl::to_spin_string (const formula *f, std::ostream &os)
 Output a formula as a (parsable by Spin) string.
std::string spot::ltl::to_spin_string (const formula *f)
 Convert a formula into a (parsable by Spin) string.

Typedef Documentation

typedef std::pair<ltlyy::location, std::string> spot::ltl::parse_error

A parse diagnostic with its location.

typedef std::pair<eltlyy::location, spair> spot::eltl::parse_error

A parse diagnostic <location, <file, message>>.

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

A list of parser diagnostics, as filled by parse.

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

A list of parser diagnostics, as filled by parse.

typedef std::pair<std::string, std::string> spot::eltl::spair

Function Documentation

std::ostream& spot::ltl::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& spot::ltl::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 spot::ltl::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.
bool spot::eltl::format_parse_errors ( std::ostream &  os,
parse_error_list &  error_list 
)

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

Parameters:
os Where diagnostics should be output.
error_list The error list filled by spot::eltl::parse while parsing eltl_string.
Returns:
true iff any diagnostic was output.
formula* spot::ltl::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.
formula* spot::eltl::parse_file ( const std::string &  filename,
parse_error_list &  error_list,
environment &  env = default_environment::instance(),
bool  debug = false 
)

Build a formula from a text file.

Parameters:
filename The name of the file 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 tgba built from filename, or 0 if the file could not be opened.
Warning:
This function is not reentrant.
formula* spot::eltl::parse_string ( const std::string &  eltl_string,
parse_error_list &  error_list,
environment &  env = default_environment::instance(),
bool  debug = false 
)

Build a formula from an ELTL string.

Parameters:
eltl_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 eltl_string, or 0 if the input was unparsable.
Warning:
This function is not reentrant.
std::string spot::ltl::to_spin_string ( const formula *  f  ) 

Convert a formula into a (parsable by Spin) string.

Parameters:
f The formula to translate.
std::ostream& spot::ltl::to_spin_string ( const formula *  f,
std::ostream &  os 
)

Output a formula as a (parsable by Spin) string.

Parameters:
f The formula to translate.
os The stream where it should be output.
std::string spot::ltl::to_string ( const formula *  f,
bool  full_parent = false 
)

Output a formula as a string which is parsable unless the formula contains automaton operators (used in ELTL formulae).

Parameters:
f The formula to translate.
full_parent Whether or not the string should by fully parenthesized.
std::ostream& spot::ltl::to_string ( const formula *  f,
std::ostream &  os,
bool  full_parent = false 
)

Output a formula as a string which is parsable unless the formula contains automaton operators (used in ELTL formulae).

Parameters:
f The formula to translate.
os The stream where it should be output.
full_parent Whether or not the string should by fully parenthesized.

Please comment this page and report errors about it on the RefDocComments page.
Generated on Fri Apr 16 09:42:22 2010 for spot by doxygen 1.6.3