17 #ifndef DYN_ALGOS_SYS_HH
18 #define DYN_ALGOS_SYS_HH
119 : format(fmt), o(o) {}
132 : format(fmt), i(i) {}
154 bool recurse =
false);
158 bool recurse=
false);
An automaton_t is essentially a shared pointer to an abstract_automaton_t, but also contains static f...
Definition: automaton.hh:93
An options_t is a set of optional parameters that is passed on to called functions.
Definition: options.hh:86
Main class for representing rational expresson at the dynamical layer.
Definition: ratexp.hh:66
io_format_t
The different format for input/output of automata and expressions.
Definition: enums.hh:123
@ JSON
The current Awali format.
Definition: enums.hh:128
automaton_t load(const std::string &filename, bool &is_example, io_format_t format=JSON)
aut_or_exp_t load_aut_or_exp(std::string const &name, bool recurse=false)
json_ast_t load_json_ast(bool &found, std::string const &filename, bool recurse=false)
Loads a json file as an AST (possibly an example).
aut_or_exp_t parse_aut_or_exp(json_ast_t ast)
automaton_t load(const std::string &path, options_t opts={})
Loads an automaton from file pointed by path.
std::ostream & operator<<(std::ostream &o, automaton_t aut)
std::istream & operator>>(std::istream &i, automaton_t &aut)
automaton_t parse_automaton(std::istream &in, options_t opts={})
Parse an automaton from.
ratexp_t load_exp(const std::string &filepath)
Loads a ratexp_t from file filepath
void set_warning_stream(std::ostream &o)
Setter for the warning_stream of the dynamical layer.
std::ostream * error_stream
A pointer to the error_stream used at dynamical layer.
std::ostream * warning_stream
A pointer to the error_stream used at dynamical layer.
std::ostream & put(automaton_t aut, std::ostream &o, options_t opts={})
Write aut to output stream o.
void pdfdisplay(automaton_t aut, options_t opts={})
Computes geometry of aut with program dot and displays with a pdf-viewer.
void save(const automaton_t aut, const std::string &path, options_t opts={})
Writes aut to file pointed by path.
ratexp_t parse_ratexp(json_ast_t ast)
void set_error_stream(std::ostream &o)
Setter for the error_stream of the dynamical layer.
auto format(const ValueSet &vs, const typename ValueSet::value_t &v, Args &&... args) -> std::string
Format v via vs.print.
Definition: stream.hh:109
Main namespace of Awali.
Definition: ato.hh:22
std::shared_ptr< json::object_t > json_ast_t
Definition: json_ast.hh:27
aut_or_exp_t()
Definition: sys.hh:167
aut_or_exp_t(aut_or_exp_t const &other)
bool split_case(automaton_t &a, ratexp_t &e)
Returns field is_aut and assign either a or e to the content of this.
aut_or_exp_t(automaton_t a)
Definition: sys.hh:171
bool is_aut
Definition: sys.hh:162
aut_or_exp_t & operator=(aut_or_exp_t const &other)
aut_or_exp_t(ratexp_t e)
Definition: sys.hh:170
Definition: transducer.hh:30