Limi
Public Member Functions | List of all members
Limi::timbuk_printer< State, Symbol, Implementation, Independence > Class Template Reference

Prints automata in timbuk format. More...

#include <timbuk_printer.h>

Public Member Functions

void print_timbuk (const automaton< State, Symbol, Implementation > &automaton, std::ostream &out, const printer_base< Symbol > &symbol_printer, const std::string &name="A")
 Prints the automaton. More...
 
void print_timbuk (const automaton< State, Symbol, Implementation > &automaton, const std::string &filename, const printer_base< Symbol > &symbol_printer, const std::string &name="A")
 

Detailed Description

template<class State, class Symbol, class Implementation, class Independence = independence<Symbol>>
class Limi::timbuk_printer< State, Symbol, Implementation, Independence >

Prints automata in timbuk format.

If there is independence relation is empty (returns false for all queries) the resulting automaton will be compatible with other language inclusion tools that can read timbuk files.

Printing an automaton -> parsing it again with the timbuk parser -> and printing it again will not yield a valid automaton. This is a known behaviour because the init symbols would appear twice.

Template Parameters
StateThe class of states.
SymbolThe class of symbols.
ImplementationThe automata implementation class.

Member Function Documentation

template<class State , class Symbol , class Implementation , class Independence = independence<Symbol>>
void Limi::timbuk_printer< State, Symbol, Implementation, Independence >::print_timbuk ( const automaton< State, Symbol, Implementation > &  automaton,
std::ostream &  out,
const printer_base< Symbol > &  symbol_printer,
const std::string &  name = "A" 
)
inline

Prints the automaton.

The states of the automaton will simply be numbered as they are encountered. The symbols need to be printed in a predictable way because if a pair of automata is fed to another language inclusion tool the symbol set needs to be identical.

Parameters
automatonThe automaton to print
outThe stream to print to
symbol_printerThe printer for symbols. This may be different from the normal symbol_printer and must only produce the symbols [a-zA-Z0-9].
nameThe name for the automaton.
template<class State , class Symbol , class Implementation , class Independence = independence<Symbol>>
void Limi::timbuk_printer< State, Symbol, Implementation, Independence >::print_timbuk ( const automaton< State, Symbol, Implementation > &  automaton,
const std::string &  filename,
const printer_base< Symbol > &  symbol_printer,
const std::string &  name = "A" 
)
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.


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