Awali
Another Weighted Automata library
|
Implementation details of dyn layer (not stable). More...
Data Structures | |
struct | acceptor_t |
struct | acceptor_t< bool > |
struct | acceptor_t< std::string > |
struct | aut_or_exp_t |
union | aut_or_exp_t.__unnamed1__ |
struct | formatted_istream |
struct | formatted_ostream |
struct | opt_any_t |
struct | opt_typed_value |
struct | opt_untyped_value |
class | option_t |
struct | option_value_pair_t |
struct | untyped_value |
struct | Value |
Functions | |
weight_t | add_tdc_transition (automaton_t tdc, state_t src, state_t dst, const std::vector< std::string > &labels, weight_t w) |
std::vector< std::vector< char > > | alphabets (automaton_t tdc) |
template<typename T > | |
T | any_cast (const any_t &a) |
template<typename T > | |
T const & | any_cref (const any_t &a) |
template<typename T > | |
T | any_move (any_t &a) |
template<typename T > | |
bool | any_typeof (const any_t &a) |
automaton_t | breaking_derived_term (ratexp_t exp, options_t opts={}) |
Builds an automaton from a rational expression using the breaking derived term algorithm. More... | |
automaton_t | compact_thompson (ratexp_t exp) |
std::ostream & | daut (automaton_t aut, std::ostream &out) |
void | del_tdc_transition (automaton_t tdc, state_t src, state_t dst, const std::vector< std::string > &labels) |
automaton_t | deprecated_parse_automaton (std::istream &i) |
std::map< ratexp_t, weight_t > | derivation (ratexp_t exp, label_t lab, bool breaking=false) |
Derives a rational expression with respect to some label. More... | |
automaton_t | derived_term (ratexp_t exp, options_t opts={}) |
Builds an automaton from a rational expression using the derived term algorithm. More... | |
std::ostream & | dot (automaton_t aut, std::ostream &out, options_t opts={}) |
std::ostream & | efsm (automaton_t aut, std::ostream &out) |
std::ostream & | fado (automaton_t aut, std::ostream &out) |
automaton_t | fado (std::istream &in) |
std::string | gcp (const std::string &s1, const std::string &s2) |
std::string | get_final_output (automaton_t tdc, state_t src) |
std::vector< std::string > | get_tdc_label (automaton_t tdc, transition_t tr) |
transition_t | get_tdc_transition (automaton_t tdc, state_t src, state_t dst, const std::vector< std::string > &labels) |
std::ostream & | grail (automaton_t aut, std::ostream &out) |
automaton_t | grail (std::istream &in) |
bool | has_input_label (automaton_t tdc, std::string const &l) |
bool | has_label (automaton_t tdc, unsigned i, std::string const &l) |
bool | has_output_label (automaton_t tdc, std::string const &l) |
bool | has_tdc_transition (automaton_t tdc, state_t src, state_t dst, const std::vector< std::string > &labels) |
std::ostream & | img (automaton_t aut, std::ostream &o, std::string const &img, options_t opts) |
std::vector< transition_t > | incoming (abstract_automaton_t const *aut, state_t s, bool all) |
std::vector< char > | input_alphabet (automaton_t tdc) |
bool | is_quotient (automaton_t aut1, automaton_t aut2) |
std::ostream & | json (automaton_t aut, std::ostream &out) |
std::ostream & | json (ratexp_t aut, std::ostream &out, json_ast_t extra_metadata=json_ast::empty()) |
automaton_t | lift_tdc (automaton_t tdc) |
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). More... | |
json_ast_t | load_json_ast (std::string const &filename, bool recurse=false) |
Loads a json file as an AST (possibly an example). More... | |
automaton_t | make_automaton_from_context (context::context_description cd) |
automaton_t | make_automaton_from_context (context::labelset_description ls, context::weightset_description ws) |
automaton_t | make_automaton_from_context (context_t ctx) |
context_t | make_context (context::context_description cd) |
context_t | make_context (context::labelset_description ls, context::weightset_description ws) |
automaton_t | make_nullable_under_lat (automaton_t tdc) |
ratexp_t | make_ratexp (const std::string &exp, const std::string &sr="B") |
ratexp_t | make_ratexp_with_alphabet (const std::string &exp, const std::string &alph, const std::string &sr="B", bool fixed_alphabet=true) |
ratexp_t | make_ratexp_with_context (const std::string &exp, context::labelset_description ls, context::weightset_description ws, bool fixed_alphabet=true) |
ratexp_t | make_ratexp_with_context (const std::string &exp, context_t ctx, bool fixed_alphabet=true) |
ratexp_t | make_ratexp_with_context (std::string const &exp, context::context_description cd, bool fixed_alphabet) |
unsigned | num_tapes (automaton_t tdc) |
std::vector< transition_t > | outgoing (abstract_automaton_t const *aut, state_t s, bool all) |
std::vector< char > | output_alphabet (automaton_t tdc) |
aut_or_exp_t | parse_aut_or_exp (json_ast_t ast) |
automaton_t | parse_automaton (json_ast_t ast) |
automaton_t | parse_automaton (std::istream &i) |
ratexp_t | parse_ratexp (json_ast_t obj) |
std::ostream & | pdf (automaton_t aut, std::ostream &o, options_t opts={}) |
void | rename_from_origin_inplace (automaton_t dst, automaton_t orig) |
void | set_final_output (automaton_t tdc, state_t src, const std::string &output) |
transition_t | set_tdc_transition (automaton_t tdc, state_t src, state_t dst, const std::vector< std::string > &labels) |
transition_t | set_tdc_transition (automaton_t tdc, state_t src, state_t dst, const std::vector< std::string > &labels, weight_t w) |
automaton_t | standard (ratexp_t exp) |
std::vector< state_t > | states (abstract_automaton_t const *aut, bool all) |
std::ostream & | svg (automaton_t aut, std::ostream &o, options_t opts={}) |
std::vector< transition_t > | tdc_in (automaton_t tdc, state_t s, const std::vector< std::string > &label) |
std::vector< transition_t > | tdc_out (automaton_t tdc, state_t s, const std::vector< std::string > &label) |
std::vector< state_t > | tdc_predecessors (automaton_t tdc, state_t s, const std::vector< std::string > &label) |
std::vector< state_t > | tdc_successors (automaton_t tdc, state_t s, const std::vector< std::string > &label) |
automaton_t | thompson (ratexp_t exp) |
std::vector< transition_t > | transitions (abstract_automaton_t const *aut, bool all) |
automaton_t | weighted_thompson (ratexp_t exp) |
Variables | |
size_t | next_id |
Global variable that assign a unique identifier to each instance of option<T> independentely of type T. More... | |
const char | spec =127 |
Implementation details of dyn layer (not stable).
union awali::dyn::internal::aut_or_exp_t.__unnamed1__ |
Data Fields | ||
---|---|---|
automaton_t | aut | |
ratexp_t | exp |
weight_t awali::dyn::internal::add_tdc_transition | ( | automaton_t | tdc, |
state_t | src, | ||
state_t | dst, | ||
const std::vector< std::string > & | labels, | ||
weight_t | w | ||
) |
std::vector<std::vector<char> > awali::dyn::internal::alphabets | ( | automaton_t | tdc | ) |
T awali::dyn::internal::any_cast | ( | const any_t & | a | ) |
T const & awali::dyn::internal::any_cref | ( | const any_t & | a | ) |
T awali::dyn::internal::any_move | ( | any_t & | a | ) |
bool awali::dyn::internal::any_typeof | ( | const any_t & | a | ) |
automaton_t awali::dyn::internal::breaking_derived_term | ( | ratexp_t | exp, |
options_t | opts = {} |
||
) |
Builds an automaton from a rational expression using the breaking derived term algorithm.
exp | the rational expression |
opts | A set of options. The following options are meaningful: KEEP_HISTORY. |
automaton_t awali::dyn::internal::compact_thompson | ( | ratexp_t | exp | ) |
std::ostream& awali::dyn::internal::daut | ( | automaton_t | aut, |
std::ostream & | out | ||
) |
void awali::dyn::internal::del_tdc_transition | ( | automaton_t | tdc, |
state_t | src, | ||
state_t | dst, | ||
const std::vector< std::string > & | labels | ||
) |
automaton_t awali::dyn::internal::deprecated_parse_automaton | ( | std::istream & | i | ) |
std::map<ratexp_t, weight_t> awali::dyn::internal::derivation | ( | ratexp_t | exp, |
label_t | lab, | ||
bool | breaking = false |
||
) |
Derives a rational expression with respect to some label.
exp | The rational expression to derive |
lab | The rational with respect to which the expression is derived. |
breaking | Whether to use the breaking variant. |
automaton_t awali::dyn::internal::derived_term | ( | ratexp_t | exp, |
options_t | opts = {} |
||
) |
Builds an automaton from a rational expression using the derived term algorithm.
exp | the rational expression |
opts | A set of options. Only KEEP_HISTORY is meaningful. |
std::ostream& awali::dyn::internal::dot | ( | automaton_t | aut, |
std::ostream & | out, | ||
options_t | opts = {} |
||
) |
std::ostream& awali::dyn::internal::efsm | ( | automaton_t | aut, |
std::ostream & | out | ||
) |
std::ostream& awali::dyn::internal::fado | ( | automaton_t | aut, |
std::ostream & | out | ||
) |
automaton_t awali::dyn::internal::fado | ( | std::istream & | in | ) |
std::string awali::dyn::internal::gcp | ( | const std::string & | s1, |
const std::string & | s2 | ||
) |
std::string awali::dyn::internal::get_final_output | ( | automaton_t | tdc, |
state_t | src | ||
) |
std::vector<std::string> awali::dyn::internal::get_tdc_label | ( | automaton_t | tdc, |
transition_t | tr | ||
) |
transition_t awali::dyn::internal::get_tdc_transition | ( | automaton_t | tdc, |
state_t | src, | ||
state_t | dst, | ||
const std::vector< std::string > & | labels | ||
) |
std::ostream& awali::dyn::internal::grail | ( | automaton_t | aut, |
std::ostream & | out | ||
) |
automaton_t awali::dyn::internal::grail | ( | std::istream & | in | ) |
bool awali::dyn::internal::has_input_label | ( | automaton_t | tdc, |
std::string const & | l | ||
) |
bool awali::dyn::internal::has_label | ( | automaton_t | tdc, |
unsigned | i, | ||
std::string const & | l | ||
) |
bool awali::dyn::internal::has_output_label | ( | automaton_t | tdc, |
std::string const & | l | ||
) |
bool awali::dyn::internal::has_tdc_transition | ( | automaton_t | tdc, |
state_t | src, | ||
state_t | dst, | ||
const std::vector< std::string > & | labels | ||
) |
std::ostream& awali::dyn::internal::img | ( | automaton_t | aut, |
std::ostream & | o, | ||
std::string const & | img, | ||
options_t | opts | ||
) |
std::vector<transition_t> awali::dyn::internal::incoming | ( | abstract_automaton_t const * | aut, |
state_t | s, | ||
bool | all | ||
) |
std::vector<char> awali::dyn::internal::input_alphabet | ( | automaton_t | tdc | ) |
bool awali::dyn::internal::is_quotient | ( | automaton_t | aut1, |
automaton_t | aut2 | ||
) |
std::ostream& awali::dyn::internal::json | ( | automaton_t | aut, |
std::ostream & | out | ||
) |
std::ostream& awali::dyn::internal::json | ( | ratexp_t | aut, |
std::ostream & | out, | ||
json_ast_t | extra_metadata = json_ast::empty() |
||
) |
automaton_t awali::dyn::internal::lift_tdc | ( | automaton_t | tdc | ) |
automaton_t awali::dyn::internal::load | ( | const std::string & | filename, |
bool & | is_example, | ||
io_format_t | format = JSON |
||
) |
aut_or_exp_t awali::dyn::internal::load_aut_or_exp | ( | std::string const & | name, |
bool | recurse = false |
||
) |
json_ast_t awali::dyn::internal::load_json_ast | ( | bool & | found, |
std::string const & | filename, | ||
bool | recurse = false |
||
) |
Loads a json file as an AST (possibly an example).
found | indicate whether the file corresponds to an example file. |
filename | the name of the files |
recurse | if true the subdirectories of the example directories are explored |
json_ast_t awali::dyn::internal::load_json_ast | ( | std::string const & | filename, |
bool | recurse = false |
||
) |
Loads a json file as an AST (possibly an example).
automaton_t awali::dyn::internal::make_automaton_from_context | ( | context::context_description | cd | ) |
automaton_t awali::dyn::internal::make_automaton_from_context | ( | context::labelset_description | ls, |
context::weightset_description | ws | ||
) |
automaton_t awali::dyn::internal::make_automaton_from_context | ( | context_t | ctx | ) |
context_t awali::dyn::internal::make_context | ( | context::context_description | cd | ) |
context_t awali::dyn::internal::make_context | ( | context::labelset_description | ls, |
context::weightset_description | ws | ||
) |
automaton_t awali::dyn::internal::make_nullable_under_lat | ( | automaton_t | tdc | ) |
ratexp_t awali::dyn::internal::make_ratexp | ( | const std::string & | exp, |
const std::string & | sr = "B" |
||
) |
ratexp_t awali::dyn::internal::make_ratexp_with_alphabet | ( | const std::string & | exp, |
const std::string & | alph, | ||
const std::string & | sr = "B" , |
||
bool | fixed_alphabet = true |
||
) |
ratexp_t awali::dyn::internal::make_ratexp_with_context | ( | const std::string & | exp, |
context::labelset_description | ls, | ||
context::weightset_description | ws, | ||
bool | fixed_alphabet = true |
||
) |
ratexp_t awali::dyn::internal::make_ratexp_with_context | ( | const std::string & | exp, |
context_t | ctx, | ||
bool | fixed_alphabet = true |
||
) |
ratexp_t awali::dyn::internal::make_ratexp_with_context | ( | std::string const & | exp, |
context::context_description | cd, | ||
bool | fixed_alphabet | ||
) |
unsigned awali::dyn::internal::num_tapes | ( | automaton_t | tdc | ) |
std::vector<transition_t> awali::dyn::internal::outgoing | ( | abstract_automaton_t const * | aut, |
state_t | s, | ||
bool | all | ||
) |
std::vector<char> awali::dyn::internal::output_alphabet | ( | automaton_t | tdc | ) |
aut_or_exp_t awali::dyn::internal::parse_aut_or_exp | ( | json_ast_t | ast | ) |
automaton_t awali::dyn::internal::parse_automaton | ( | json_ast_t | ast | ) |
automaton_t awali::dyn::internal::parse_automaton | ( | std::istream & | i | ) |
ratexp_t awali::dyn::internal::parse_ratexp | ( | json_ast_t | obj | ) |
std::ostream& awali::dyn::internal::pdf | ( | automaton_t | aut, |
std::ostream & | o, | ||
options_t | opts = {} |
||
) |
void awali::dyn::internal::rename_from_origin_inplace | ( | automaton_t | dst, |
automaton_t | orig | ||
) |
void awali::dyn::internal::set_final_output | ( | automaton_t | tdc, |
state_t | src, | ||
const std::string & | output | ||
) |
transition_t awali::dyn::internal::set_tdc_transition | ( | automaton_t | tdc, |
state_t | src, | ||
state_t | dst, | ||
const std::vector< std::string > & | labels | ||
) |
transition_t awali::dyn::internal::set_tdc_transition | ( | automaton_t | tdc, |
state_t | src, | ||
state_t | dst, | ||
const std::vector< std::string > & | labels, | ||
weight_t | w | ||
) |
std::vector<state_t> awali::dyn::internal::states | ( | abstract_automaton_t const * | aut, |
bool | all | ||
) |
std::ostream& awali::dyn::internal::svg | ( | automaton_t | aut, |
std::ostream & | o, | ||
options_t | opts = {} |
||
) |
std::vector<transition_t> awali::dyn::internal::tdc_in | ( | automaton_t | tdc, |
state_t | s, | ||
const std::vector< std::string > & | label | ||
) |
std::vector<transition_t> awali::dyn::internal::tdc_out | ( | automaton_t | tdc, |
state_t | s, | ||
const std::vector< std::string > & | label | ||
) |
std::vector<state_t> awali::dyn::internal::tdc_predecessors | ( | automaton_t | tdc, |
state_t | s, | ||
const std::vector< std::string > & | label | ||
) |
std::vector<state_t> awali::dyn::internal::tdc_successors | ( | automaton_t | tdc, |
state_t | s, | ||
const std::vector< std::string > & | label | ||
) |
automaton_t awali::dyn::internal::thompson | ( | ratexp_t | exp | ) |
std::vector<transition_t> awali::dyn::internal::transitions | ( | abstract_automaton_t const * | aut, |
bool | all | ||
) |
automaton_t awali::dyn::internal::weighted_thompson | ( | ratexp_t | exp | ) |
|
extern |
Global variable that assign a unique identifier to each instance of option<T> independentely of type T.
const char awali::dyn::internal::spec =127 |