spot  1.99.4
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Classes | Typedefs | Enumerations | Functions

Classes

struct  spot::parsed_aut
 Temporary encoding of an omega automaton produced by the parser. More...
 
class  spot::automaton_stream_parser
 

Typedefs

typedef std::pair
< spot::location, std::string > 
spot::parse_aut_error
 A parse diagnostic with its location. More...
 
typedef std::list
< parse_aut_error > 
spot::parse_aut_error_list
 A list of parser diagnostics, as filled by parse. More...
 
typedef std::shared_ptr
< parsed_aut > 
spot::parsed_aut_ptr
 
typedef std::shared_ptr< const
parsed_aut > 
spot::const_parsed_aut_ptr
 

Enumerations

enum  parsed_aut_type {
  HOA, NeverClaim, LBTT, DRA,
  DSA, Unknown
}
 

Functions

std::ostream & spot::kripke_save_reachable (std::ostream &os, const const_kripke_ptr &k)
 Save the reachable part of Kripke structure in text format. More...
 
std::ostream & spot::kripke_save_reachable_renumbered (std::ostream &os, const const_kripke_ptr &k)
 Save the reachable part of Kripke structure in text format. More...
 
parsed_aut_ptr spot::parse_aut (const std::string &filename, parse_aut_error_list &error_list, const bdd_dict_ptr &dict, environment &env=default_environment::instance(), bool debug=false)
 Build a spot::twa_graph from a HOA file or a neverclaim. More...
 
bool spot::format_parse_aut_errors (std::ostream &os, const std::string &filename, parse_aut_error_list &error_list)
 Format diagnostics produced by spot::parse_aut. More...
 
std::ostream & spot::print_dot (std::ostream &os, const const_twa_ptr &g, const char *options=nullptr)
 Print reachable states in dot format. More...
 
std::ostream & spot::print_hoa (std::ostream &os, const const_twa_ptr &g, const char *opt=nullptr)
 Print reachable states in Hanoi Omega Automata format. More...
 
std::ostream & spot::print_lbtt (std::ostream &os, const const_twa_ptr &g, const char *opt=nullptr)
 Print reachable states in LBTT's format. More...
 
std::ostream & spot::print_never_claim (std::ostream &os, const const_twa_ptr &g, const char *opt=nullptr)
 Print reachable states in Spin never claim format. More...
 

Detailed Description

Typedef Documentation

typedef std::pair<spot::location, std::string> spot::parse_aut_error

A parse diagnostic with its location.

typedef std::list<parse_aut_error> spot::parse_aut_error_list

A list of parser diagnostics, as filled by parse.

Function Documentation

bool spot::format_parse_aut_errors ( std::ostream &  os,
const std::string &  filename,
parse_aut_error_list &  error_list 
)

Format diagnostics produced by spot::parse_aut.

Parameters
osWhere diagnostics should be output.
filenameThe filename that should appear in the diagnostics.
error_listThe error list filled by spot::parse while parsing ltl_string.
Returns
true iff any diagnostic was output.
std::ostream& spot::kripke_save_reachable ( std::ostream &  os,
const const_kripke_ptr &  k 
)

Save the reachable part of Kripke structure in text format.

The states will be named with the value returned by the kripke::format_state() method. Such a string can be large, so the output will not be I/O efficient. We recommend using this function only for debugging. Use kripke_save_reachable_renumbered() for large output.

std::ostream& spot::kripke_save_reachable_renumbered ( std::ostream &  os,
const const_kripke_ptr &  k 
)

Save the reachable part of Kripke structure in text format.

States will be renumbered with sequential number. This is much more I/O efficient when dumping large Kripke structures with big state names. The drawback is that any information carried by the state name is lost.

parsed_aut_ptr spot::parse_aut ( const std::string &  filename,
parse_aut_error_list &  error_list,
const bdd_dict_ptr &  dict,
environment &  env = default_environment::instance(),
bool  debug = false 
)
inline

Build a spot::twa_graph from a HOA file or a neverclaim.

Parameters
filenameThe name of the file to parse.
error_listA list that will be filled with parse errors that occured during parsing.
dictThe BDD dictionary where to use.
envThe environment of atomic proposition into which parsing should take place.
debugWhen 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.

Note that the parser usually tries to recover from errors. It can return a non zero value even if it encountered error during the parsing of filename. If you want to make sure filename was parsed succesfully, check error_list for emptiness.

The specification of the HOA format can be found at http://adl.github.io/hoaf/

The grammar of neverclaim will not accept every possible neverclaim output. It has been tuned to accept the output of spin -f, ltl2ba, ltl3ba, and modella. If you know of some other tool that produce Büchi automata in the form of a neverclaim, but is not understood by this parser, please report it to spot@.nosp@m.lrde.nosp@m..epit.nosp@m.a.fr.

Warning
This function is not reentrant.
std::ostream& spot::print_dot ( std::ostream &  os,
const const_twa_ptr &  g,
const char *  options = nullptr 
)

Print reachable states in dot format.

If assume_sba is set, this assumes that the automaton is an SBA and use double elipse to mark accepting states.

Parameters
optionsan optional string of letters, each indicating a different option. Presently the following options are supported: 'v' for vertical output, 'h' for horizontal output, 't' force transition-based acceptance, 'N' hide the name of the automaton, 'n' shows the name, 'c' uses circle-shaped states, 'a' shows the acceptance.
std::ostream& spot::print_hoa ( std::ostream &  os,
const const_twa_ptr &  g,
const char *  opt = nullptr 
)

Print reachable states in Hanoi Omega Automata format.

Parameters
osThe output stream to print on.
gThe automaton to output.
opta set of characters each corresponding to a possible option: (i) implicit labels for complete and deterministic automata, (s) state-based acceptance, (t) transition-based acceptance, (m) mixed acceptance, (l) single-line output.
std::ostream& spot::print_lbtt ( std::ostream &  os,
const const_twa_ptr &  g,
const char *  opt = nullptr 
)

Print reachable states in LBTT's format.

Parameters
gThe automata to print.
osWhere to print.
optif "t", force transition-based acceptance, otherwise,
std::ostream& spot::print_never_claim ( std::ostream &  os,
const const_twa_ptr &  g,
const char *  opt = nullptr 
)

Print reachable states in Spin never claim format.

Parameters
osThe output stream to print on.
gThe (state-based degeneralized) automaton to output. There should be only one acceptance condition, and all the transitions of a state should be either all accepting or all unaccepting. If your automaton does not satisfies these requirements, call degeneralize() first.
opta string of option: 'c' to comment each state

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Thu Oct 1 2015 05:49:14 for spot by doxygen 1.8.8