64 #include <vcsn/dyn/registries.hh>    88 #define VCSN_CTX_INSTANTIATE_PRINT(Format, Aut)                         \    89   MAYBE_EXTERN template                                                 \    91   std::ostream& Format<Aut>(const Aut& aut, std::ostream& out)    97 #define VCSN_CTX_INSTANTIATE_1(Ctx)                                     \    98   MAYBE_EXTERN template                                                 \    99   class LIBVCSN_API mutable_automaton<Ctx>;                             \   102   MAYBE_EXTERN template                                                 \   104   to_expression<mutable_automaton<Ctx>>                                 \   105   (const mutable_automaton<Ctx>& aut,                                   \   106     const state_chooser_t<mutable_automaton<Ctx>>& next_state);         \   109   VCSN_CTX_INSTANTIATE_PRINT(dot, mutable_automaton<Ctx>);              \   112   VCSN_CTX_INSTANTIATE_PRINT(efsm, mutable_automaton<Ctx>);             \   115   MAYBE_EXTERN template                                                 \   117   print<expressionset<Ctx>>(const expressionset<Ctx>& rs,               \   118                             const Ctx::expression_t& e, std::ostream& o, \   122   MAYBE_EXTERN template                                                 \   123   class rat::standard_visitor<mutable_automaton<Ctx>, Ctx>;             \   126   VCSN_CTX_INSTANTIATE_PRINT(tikz, mutable_automaton<Ctx>);             \   129   MAYBE_EXTERN template                                                 \   130   class LIBVCSN_API detail::transpose_automaton<mutable_automaton<Ctx>>; \   131   MAYBE_EXTERN template                                                 \   132   class LIBVCSN_API detail::transposer<expressionset<Ctx>>   139 #define REGISTER(Algo, ...)                                     \   140   dyn::detail::Algo ## _register(ssignature<__VA_ARGS__>(),     \   141                                  dyn::detail::Algo<__VA_ARGS__>)   149       template <Automaton Aut>
   169 #if 2 <= VCSN_INSTANTIATION   172         REGISTER(add, aut_t, aut_t, 
const std::string);
   176         REGISTER(conjunction, std::tuple<aut_t, aut_t>, 
bool);
   178         REGISTER(infiltrate, std::tuple<aut_t, aut_t>);
   193         REGISTER(lweight, ws_t, aut_t, 
const std::string);
   198         REGISTER(rweight, aut_t, ws_t, 
const std::string);
   199         REGISTER(
shortest, aut_t, boost::optional<unsigned>, boost::optional<unsigned>);
   200         REGISTER(shuffle, std::tuple<aut_t, aut_t>);
   203         REGISTER(star, aut_t, 
const std::string);
   213       template <
typename Ctx>
   223 #if 2 <= VCSN_INSTANTIATION   235       template <
typename ExpressionSet>
   239         using rs_t = ExpressionSet;
   264 #if 2 <= VCSN_INSTANTIATION   280       template <
typename Ctx>
   287       template <
typename Ctx>
   291 #if 2 <= VCSN_INSTANTIATION   315       template <
typename Ctx>
   322       template <
typename Ctx>
   326 #if 2 <= VCSN_INSTANTIATION   336       template <
typename Ctx>
   343       template <
typename Ctx>
   351       template <
typename Ctx>
   359       template <
typename Ctx>
   366       template <
typename Ctx>
   379         register_automaton_functions<aut_t>();
   380         register_context_functions<ctx_t>();
   381         register_expression_functions<rs_t>();
   393 #if 2 <= VCSN_INSTANTIATION   407         register_functions_is_free<ctx_t>(is_free_t());
   409         return register_kind_functions<ctx_t>(
typename ctx_t::kind_t());
   416 #if VCSN_INSTANTIATION   417 # define VCSN_CTX_INSTANTIATE_2(Ctx)            \   422       static bool registered ATTRIBUTE_USED     \   423         = register_functions<Ctx>();            \   427 # define VCSN_CTX_INSTANTIATE_2(Ctx)   430 #define VCSN_CTX_INSTANTIATE(Ctx)               \   432   VCSN_CTX_INSTANTIATE_2(Ctx)   435 # define MAYBE_EXTERN extern typename detail::context_t_of_impl< base_t< ValueSet > >::type context_t_of
 
int compare_expression(const expression &lhs, const expression &rhs)
Bridge (compare). 
 
context context_of(const automaton &aut)
Bridge. 
 
mutable_automaton< Context > divkbaseb(const Context &ctx, unsigned divisor, unsigned base)
Build the Boolean automaton which accepts a word n representing a number in base "base" if and only i...
 
expression add_expression(const expression &lhs, const expression &rhs)
Bridge (add). 
 
auto eliminate_state(const Aut &aut, state_t_of< Aut > s=Aut::element_type::null_state()) -> fresh_automaton_t_of< Aut >
A copy of automaton res without the state s. 
 
expression conjunction_expression(const expression &lhs, const expression &rhs)
Bridge (conjunction). 
 
bool is_complete(const Aut &aut)
Whether aut is complete. 
 
ATTRIBUTE_CONST std::enable_if_t< context_t_of< Aut >::has_one(), bool > is_eps_acyclic(const Aut &aut)
Detect epsilon-circuits. 
 
automaton standard_expression(const expression &exp)
Bridge (standard). 
 
auto copy(const AutIn &input, KeepState keep_state, KeepTrans keep_trans) -> decltype(keep_state(input->null_state()), keep_trans(input->null_transition()), make_fresh_automaton< AutIn, AutOut >(input))
A copy of input keeping only its states that are accepted by keep_state, and transitions accepted by ...
 
std::ostream & print_weight(const weight &weight, std::ostream &o, const std::string &fmt)
Bridge (print). 
 
word_t_of< Aut > synchronizing_word(const Aut &aut, const std::string &algo="greedy")
Return a synchronizing word for aut using algo algo. 
 
auto standard(const Aut &aut)
 
std::ostream & info(const Aut &aut, std::ostream &out=std::cout, unsigned details=2)
Print info about an automaton. 
 
bool is_ambiguous(const Aut &aut)
Whether an automaton is ambiguous. 
 
std::shared_ptr< detail::mutable_automaton_impl< Context > > mutable_automaton
 
expression difference_expression(const expression &lhs, const expression &rhs)
Bridge (difference). 
 
auto push_weights(const Aut &aut) -> decltype(::vcsn::copy(aut))
The algorithm weight pushing. 
 
expression rweight_expression(const expression &exp, const weight &weight)
Bridge (rweight). 
 
identities identities_of(const expression &exp)
Bridge. 
 
filter_automaton< Aut > accessible(const Aut &a)
Accessible part of an automaton. 
 
auto evaluate(const Aut &a, const word_t_of< Aut > &w) -> std::enable_if_t<!context_t_of< Aut >::is_lao, weight_t_of< Aut >>
General case of evaluation. 
 
weight add_weight(const weight &lhs, const weight &rhs)
Bridge (add). 
 
expression transpose_expression(const expression &exp)
Bridge (transpose). 
 
automaton multiply_repeated(const automaton &a, int min, int max, const std::string &algo)
Bridge (multiply). 
 
Aut transpose(const transpose_automaton< Aut > &aut)
The transpose of a transpose automaton is the original automaton. 
 
expression expression_zero(const context &ctx, identities ids)
Bridge. 
 
std::ostream & info_expression(const expression &exp, std::ostream &o)
Bridge (info). 
 
mutable_automaton< Context > de_bruijn(const Context &ctx, unsigned n)
Build a automaton for (a+b)*a(a+b){n}. 
 
std::integral_constant< bool, B > bool_constant
 
bool register_expression_functions()
Instantiate the core functions for expressions of type ExpSet. 
 
rat::expansionset< ExpSet >::value_t to_expansion(const ExpSet &rs, const typename ExpSet::value_t &e)
First order expansion. 
 
pair_automaton< Aut > pair(const Aut &aut, bool keep_initials=false)
 
expression complement_expression(const expression &exp)
Bridge (complement). 
 
bool is_useless(const Aut &a)
Whether all no state is useful. 
 
expression to_expression_class(const context &ctx, identities ids, const letter_class_t &letters, bool accept)
Bridge (to_expression). 
 
typename detail::labelset_t_of_impl< base_t< ValueSet > >::type labelset_t_of
 
rat::expression_polynomial_t< ExpSet > derivation(const ExpSet &rs, const typename ExpSet::value_t &e, label_t_of< ExpSet > a, bool breaking=false)
Derive an expression wrt to a letter. 
 
auto read_weight(const Context &ctx, std::istream &is) -> weight_t_of< Context >
 
polynomial multiply_polynomial(const polynomial &lhs, const polynomial &rhs)
Bridge (multiply). 
 
expression rdivide_expression(const expression &lhs, const expression &rhs)
Bridge (rdivide). 
 
expression to_expression_label(const context &ctx, identities ids, const label &lbl)
Bridge (to_expression). 
 
weight_t_of< ExpSet > constant_term(const ExpSet &rs, const typename ExpSet::value_t &e)
The constant term of e. 
 
bool is_empty(const Aut &a) ATTRIBUTE_PURE
Whether has no states. 
 
bool register_kind_functions(labels_are_letters)
 
ExpSet::value_t to_expression(Aut &a, Profiler &profiler)
 
filter_automaton< Aut > coaccessible(const Aut &a)
Coaccessible part of an automaton. 
 
expression shuffle_expression(const expression &lhs, const expression &rhs)
Bridge (shuffle). 
 
auto minimize(const Aut &a, brzozowski_tag) -> std::enable_if_t< is_free_boolean< Aut >(), determinized_automaton< codeterminized_automaton< Aut >, wet_kind_t::bitset >>
Brzozowski-based minimization. 
 
std::ostream & print_context(const context &ctx, std::ostream &o, const std::string &fmt)
Bridge (print). 
 
bool is_synchronized_by(const Aut &aut, const word_t_of< Aut > &w)
Whether w synchronizes automaton aut. 
 
bool register_functions_is_free(std::true_type)
 
expression ldivide_expression(const expression &lhs, const expression &rhs)
Bridge (ldivide). 
 
typename law_traits< LabelSet >::type law_t
The smallest wordset that includes LabelSet. 
 
mutable_automaton< Context > double_ring(const Context &ctx, unsigned n, const std::vector< unsigned > &finals)
 
bool is_valid(const Aut &aut)
 
#define REGISTER(Algo,...)
 
bool is_valid_expression(const expression &exp)
Bridge (is_valid). 
 
automaton_editor * make_automaton_editor(const context &ctx)
Bridge. 
 
std::ostream & print_polynomial(const polynomial &polynomial, std::ostream &o, const std::string &fmt)
Bridge (print). 
 
typename detail::weightset_t_of_impl< base_t< ValueSet > >::type weightset_t_of
 
auto proper(const Aut &aut, direction dir=direction::backward, bool prune=true, const std::string &algo="auto") -> fresh_automaton_t_of< Aut, detail::proper_context< context_t_of< Aut >>>
Eliminate spontaneous transitions. 
 
auto sort(const Aut &a) -> permutation_automaton< Aut >
 
auto read_label(const Context &ctx, std::istream &is, bool quoted=false) -> label_t_of< Context >
 
expression multiply_expression(const expression &lhs, const expression &rhs)
Bridge (multiply). 
 
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut. 
 
std::ostream & print_label(const label &label, std::ostream &o, const std::string &fmt)
Bridge (print). 
 
auto multiply(const Aut1 &lhs, const Aut2 &rhs, Tag tag={}) -> decltype(lhs->null_state(), rhs->null_state(), detail::make_join_automaton(tag, lhs, rhs))
Concatenate two automata, general case. 
 
Aut inductive(const ExpSet &rs, const typename ExpSet::value_t &r, Tag={})
Build an automaton by induction from an expression. 
 
expression expression_one(const context &ctx, identities ids)
Bridge. 
 
Aut thompson(const context_t_of< Aut > &ctx, const ExpSet &rs, const typename ExpSet::value_t &r)
Build a Thompson automaton from an expression. 
 
automaton conjunction_repeated(const automaton &aut, unsigned n)
Bridge (conjunction). 
 
constexpr auto num_tapes() -> size_t
 
bool is_trim(const Aut &a)
Whether all its states are useful. 
 
Ctx make_context(const std::string &name)
Build a context from its name. 
 
rat::expression_polynomial_t< ExpSet > split(const ExpSet &rs, const typename ExpSet::value_t &e)
Split an expression. 
 
ExpansionSet::value_t determinize(const ExpansionSet &xs, const typename ExpansionSet::value_t &x)
Determinize an expansion. 
 
expression lweight_expression(const weight &weight, const expression &exp)
Bridge (lweight). 
 
mutable_automaton< Context > ladybird(const Context &ctx, unsigned n)
Build the ladybird automaton of n states. 
 
An expressionset can implement several different sets of identities on expressions. 
 
std::ostream & print_expansion(const expansion &expansion, std::ostream &o, const std::string &fmt)
Bridge (print). 
 
bool is_synchronizing(const Aut &aut)
Whether this automaton is synchronizing, i.e., has synchronizing words. 
 
Provide a variadic mul on top of a binary mul(), and one(). 
 
auto read_polynomial(const Context &ctx, std::istream &is) -> typename polynomialset< Context >::value_t
 
std::set< std::pair< std::string, std::string > > letter_class_t
A set of letter ranges. 
 
bool is_proper(const Aut &aut)
Test whether an automaton is proper. 
 
expression infiltrate_expression(const expression &lhs, const expression &rhs)
Bridge (infiltrate). 
 
bool is_out_sorted(const Aut &a)
Whether for each state, the outgoing transitions are sorted by increasing label. 
 
detail::enumerater< Aut >::polynomial_t shortest(const Aut &aut, boost::optional< unsigned > num={}, boost::optional< unsigned > len={})
The approximated behavior of an automaton. 
 
std::ostream & print(const Aut &aut, std::ostream &out=std::cout, const std::string &fmt="default")
 
ExpSet::value_t expand(const ExpSet &rs, const typename ExpSet::value_t &r)
Expand a typed expression, i.e., distribute multiplications over sums. 
 
std::ostream & print_expression(const expression &exp, std::ostream &o, const std::string &fmt)
Bridge (print). 
 
weight multiply_weight(const weight &lhs, const weight &rhs)
Bridge (multiply). 
 
mutable_automaton< Context > u(const Context &ctx, unsigned n)
The Brzozowski universal witness. 
 
filter_automaton< Aut > trim(const Aut &a)
Useful part of an automaton. 
 
bool register_automaton_functions()
Instantiate the functions for automata of type Aut. 
 
expression concatenate_expression(const expression &lhs, const expression &rhs)
Bridge (concatenate). 
 
bool is_normalized(const Aut &a)
Whether a is standard and co-standard. 
 
bool register_functions()
 
auto complete(const Aut &aut) -> decltype(::vcsn::copy(aut))
A complete copy of aut. 
 
context context_of_expression(const expression &exp)
Bridge (context_of). 
 
std::enable_if_t< labelset_t_of< ExpSet >::is_letterized(), expression_automaton< mutable_automaton< typename ExpSet::context_t > > > derived_term(const ExpSet &rs, const typename ExpSet::value_t &r, const std::string &algo="auto")
The derived-term automaton, for letterized labelsets. 
 
unsigned star_height(const ExpSet &es, const typename ExpSet::value_t &e)
Star height of an expression. 
 
int compare(const Lhs &lhs, const Rhs &rhs)
Comparison between lhs and rhs. 
 
expression multiply_expression_repeated(const expression &re, int min, int max)
Bridge (multiply). 
 
context make_word_context(const context &ctx)
Bridge. 
 
mutable_automaton< Ctx > cerny(const Ctx &ctx, unsigned num_states)
Cerny automata are automata whose synchronizing word length is always (n - 1)^2, the upper bound of t...
 
bool are_isomorphic(const Aut1 &a1, const Aut2 &a2)
 
std::ostream & list_polynomial(const polynomial &polynomial, std::ostream &o)
Bridge (list). 
 
bool register_context_functions()
Instantiate the core functions for expressions of type ExpSet. 
 
bool is_standard(const Aut &a)
Whether a is standard. 
 
expression transposition_expression(const expression &exp)
Bridge (transposition).