Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
instantiate.hh
Go to the documentation of this file.
1 #ifndef VCSN_CTX_INSTANTIATE_HH
2 # define VCSN_CTX_INSTANTIATE_HH
3 
4 # include <vcsn/algos/accessible.hh>
5 # include <vcsn/algos/are-equivalent.hh> // difference
7 # include <vcsn/algos/cerny.hh>
8 # include <vcsn/algos/complete.hh>
11 # include <vcsn/algos/copy.hh>
12 # include <vcsn/algos/de-bruijn.hh>
13 # include <vcsn/algos/derivation.hh>
15 # include <vcsn/algos/divkbaseb.hh>
16 # include <vcsn/algos/dot.hh>
17 # include <vcsn/algos/double-ring.hh>
19 # include <vcsn/algos/efsm.hh>
20 # include <vcsn/algos/enumerate.hh>
21 # include <vcsn/algos/eval.hh>
22 # include <vcsn/algos/expand.hh>
23 # include <vcsn/algos/identities.hh>
24 # include <vcsn/algos/info.hh>
26 # include <vcsn/algos/is-complete.hh>
29 # include <vcsn/algos/normalize.hh>
30 # include <vcsn/algos/is-proper.hh>
32 # include <vcsn/algos/is-valid.hh>
33 # include <vcsn/algos/ladybird.hh>
34 # include <vcsn/algos/left-mult.hh>
35 # include <vcsn/algos/lift.hh>
37 # include <vcsn/algos/minimize.hh>
38 # include <vcsn/algos/print.hh>
39 # include <vcsn/algos/product.hh>
40 # include <vcsn/algos/proper.hh>
42 # include <vcsn/algos/random.hh>
43 # include <vcsn/algos/read.hh>
44 # include <vcsn/algos/sort.hh>
45 # include <vcsn/algos/split.hh>
46 # include <vcsn/algos/standard.hh>
47 # include <vcsn/algos/star-height.hh>
49 # include <vcsn/algos/star.hh>
50 # include <vcsn/algos/sum.hh>
52 # include <vcsn/algos/thompson.hh>
53 # include <vcsn/algos/tikz.hh>
56 # include <vcsn/algos/transpose.hh>
57 # include <vcsn/algos/u.hh>
58 # include <vcsn/algos/union.hh>
59 
61 
62 # include <vcsn/weightset/b.hh>
64 
65 # include <vcsn/misc/name.hh>
66 
67 /* The purpose of this file is manyfold:
68 
69  - *prevent* the instantiation of the algorithms that we will
70  provided by the context library. This is what the INSTANTIATE
71  macros do. In this case MAYBE_EXTERN is "extern".
72 
73  - instantiate them when building the context libraries. In this
74  context, MAYBE_EXTERN is "".
75 
76  - register the dyn functions. This is what the register function
77  templates do.
78 
79 */
80 
81 namespace vcsn
82 {
83 # define VCSN_CTX_INSTANTIATE_PRINT(Format, Aut) \
84  MAYBE_EXTERN template \
85  LIBVCSN_API \
86  std::ostream& Format<Aut>(const Aut& aut, std::ostream& out)
87 
88  /*-------------------------------------------------------.
89  | Instantiate the function that work for every context. |
90  `-------------------------------------------------------*/
91 
92 # define VCSN_CTX_INSTANTIATE_1(Ctx) \
93  MAYBE_EXTERN template \
94  class LIBVCSN_API mutable_automaton<Ctx>; \
95  \
96  /* to_expression. */ \
97  MAYBE_EXTERN template \
98  Ctx::ratexp_t \
99  to_expression<mutable_automaton<Ctx>> \
100  (const mutable_automaton<Ctx>& aut, \
101  const state_chooser_t<mutable_automaton<Ctx>>& next_state); \
102  \
103  /* dot. */ \
104  VCSN_CTX_INSTANTIATE_PRINT(dot, mutable_automaton<Ctx>); \
105  \
106  /* efsm. */ \
107  VCSN_CTX_INSTANTIATE_PRINT(efsm, mutable_automaton<Ctx>); \
108  \
109  /* lift. */ \
110  MAYBE_EXTERN template \
111  detail::lifted_automaton_t<mutable_automaton<Ctx>> \
112  lift<mutable_automaton<Ctx>>(const mutable_automaton<Ctx>& aut); \
113  \
114  /* print. */ \
115  MAYBE_EXTERN template \
116  std::ostream& \
117  print<ratexpset<Ctx>>(const ratexpset<Ctx>& rs, \
118  const Ctx::ratexp_t& e, std::ostream& o, \
119  symbol format); \
120  \
121  /* standard. */ \
122  MAYBE_EXTERN template \
123  class rat::standard_visitor<mutable_automaton<Ctx>, Ctx>; \
124  \
125  /* tikz. */ \
126  VCSN_CTX_INSTANTIATE_PRINT(tikz, mutable_automaton<Ctx>); \
127  \
128  /* transpose. */ \
129  MAYBE_EXTERN template \
130  class LIBVCSN_API detail::transpose_automaton<mutable_automaton<Ctx>>; \
131  MAYBE_EXTERN template \
132  class LIBVCSN_API detail::transposer<ratexpset<Ctx>>
133 
134 
135  /*----------------------------------.
136  | Register the abstract functions. |
137  `----------------------------------*/
138 
139 #define REGISTER(Algo, ...) \
140  Algo ## _register(ssignature<__VA_ARGS__>(), Algo<__VA_ARGS__>)
141 
142  namespace ctx
143  {
144  namespace detail
145  {
146  template <typename Ctx>
147  bool
149  {
150  return true;
151  }
152 
153  template <typename Ctx>
154  bool
156  {
157  using ctx_t = Ctx;
158  using aut_t = vcsn::mutable_automaton<ctx_t>;
159  using rs_t = ratexpset<ctx_t>;
160 
161  // Wordset.
163 
164  // Word polynomialset.
166 
167  // Same labelset, but over Booleans.
168  using b_ctx_t = context<labelset_t_of<Ctx>, b>;
169  using b_rs_t = ratexpset<b_ctx_t>;
170 
171  using namespace dyn::detail;
172  REGISTER(are_isomorphic, aut_t, aut_t);
173  REGISTER(cerny, ctx_t, unsigned);
174  REGISTER(complete, aut_t);
175  REGISTER(concatenate_polynomial, wps_t, wps_t);
176  REGISTER(de_bruijn, ctx_t, unsigned);
177  REGISTER(derivation, rs_t, wls_t, bool);
178  REGISTER(difference_ratexp, rs_t, b_rs_t);
179  REGISTER(divkbaseb, ctx_t, unsigned, unsigned);
180  REGISTER(double_ring, ctx_t, unsigned, const std::vector<unsigned>);
181  REGISTER(enumerate, aut_t, unsigned);
182  REGISTER(eval, aut_t, wls_t);
183  REGISTER(infiltration, aut_t, aut_t);
184  REGISTER(is_ambiguous, aut_t);
185  REGISTER(is_complete, aut_t);
186  REGISTER(is_deterministic, aut_t);
187  REGISTER(is_synchronized_by, aut_t, wls_t);
188  REGISTER(is_synchronizing, aut_t);
189  REGISTER(ladybird, ctx_t, unsigned);
190  REGISTER(list_polynomial, wps_t, std::ostream);
191  REGISTER(pair, aut_t, bool);
192  REGISTER(power, aut_t, unsigned);
193  REGISTER(print_polynomial, wps_t, std::ostream, const std::string);
194  REGISTER(product, aut_t, aut_t);
195  REGISTER(random_deterministic, ctx_t, unsigned);
196  REGISTER(shortest, aut_t, unsigned);
197  REGISTER(shuffle, aut_t, aut_t);
198  REGISTER(synchronizing_word, aut_t, const std::string);
199  REGISTER(u, ctx_t, unsigned);
200 
201  return true;
202  }
203 
204  template <typename Ctx>
205  bool
206  register_functions_is_free(std::false_type)
207  {
208  return true;
209  }
210 
211  template <typename Ctx>
212  bool
214  {
215  using ctx_t = Ctx;
216  using aut_t = vcsn::mutable_automaton<ctx_t>;
217 
218  using namespace dyn::detail;
219 
220  REGISTER(eliminate_state, aut_t, int);
221 
222  return true;
223  }
224 
225  template <typename Ctx>
226  bool
228  {
229  using ctx_t = Ctx;
230 
231  using namespace dyn::detail;
232 
233  REGISTER(de_bruijn, ctx_t, unsigned);
234  REGISTER(divkbaseb, ctx_t, unsigned, unsigned);
235  REGISTER(double_ring, ctx_t, unsigned, const std::vector<unsigned>);
236  REGISTER(ladybird, ctx_t, unsigned);
237  REGISTER(u, ctx_t, unsigned);
238 
239  return true;
240  }
241 
242  template <typename Ctx>
243  ATTRIBUTE_CONST
244  bool
246  {
247  return true;
248  }
249 
250  template <typename Ctx>
251  ATTRIBUTE_CONST
252  bool
254  {
255  return true;
256  }
257 
258  template <typename Ctx>
259  bool
261  {
262  return true;
263  }
264 
265  template <typename Ctx>
266  bool
268  {
269  using ctx_t = Ctx;
270  using aut_t = vcsn::mutable_automaton<ctx_t>;
271  using rs_t = ratexpset<ctx_t>;
272  using ls_t = labelset_t_of<ctx_t>;
273  using ws_t = weightset_t_of<ctx_t>;
274 
275  // label polynomialset.
276  using lps_t = polynomialset<ctx_t>;
277  // ratexp polynomialset.
278  using rps_t = rat::ratexp_polynomialset_t<rs_t>;
279  // expansionset.
280  using es_t = rat::expansionset<rs_t>;
281 
282 
283  using namespace dyn::detail;
284 
285  REGISTER(accessible, aut_t);
286  REGISTER(are_isomorphic, aut_t, aut_t);
287  REGISTER(chain, aut_t, int, int);
288  REGISTER(chain_ratexp, rs_t, int, int);
289  REGISTER(coaccessible, aut_t);
291  REGISTER(concatenate, aut_t, aut_t);
292  REGISTER(concatenate_ratexp, rs_t, rs_t);
293  REGISTER(conjunction_ratexp, rs_t, rs_t);
294  REGISTER(constant_term, rs_t);
295  REGISTER(context_of, aut_t);
297  REGISTER(copy, aut_t);
298  REGISTER(derived_term, rs_t, const std::string);
299  REGISTER(dot, aut_t, std::ostream, bool);
300  REGISTER(efsm, aut_t, std::ostream);
301  REGISTER(expand, rs_t);
302  REGISTER(identities, rs_t);
303  REGISTER(info, aut_t, std::ostream, bool);
304  REGISTER(info_ratexp, rs_t, std::ostream);
305  REGISTER(is_empty, aut_t);
306  REGISTER(is_eps_acyclic, aut_t);
307  REGISTER(is_normalized, aut_t);
308  REGISTER(is_out_sorted, aut_t);
309  REGISTER(is_proper, aut_t);
310  REGISTER(is_standard, aut_t);
311  REGISTER(is_trim, aut_t);
312  REGISTER(is_useless, aut_t);
313  REGISTER(is_valid, aut_t);
314  REGISTER(is_valid_ratexp, rs_t);
315  REGISTER(left_mult, ws_t, aut_t);
316  REGISTER(left_mult_ratexp, ws_t, rs_t);
317  REGISTER(lift_automaton, aut_t);
318  REGISTER(lift_ratexp, rs_t);
319  REGISTER(list_polynomial, rps_t, std::ostream);
321  REGISTER(make_context, ctx_t);
323  REGISTER(make_word_context, ctx_t);
324  REGISTER(minimize, aut_t, const std::string);
325  REGISTER(multiply_weight, ws_t, ws_t);
326  REGISTER(print_ctx, ctx_t, std::ostream, const std::string);
327  REGISTER(print_expansion, es_t, std::ostream, const std::string);
328  REGISTER(print_label, ls_t, std::ostream, const std::string);
329  REGISTER(print_polynomial, lps_t, std::ostream, const std::string);
330  REGISTER(print_polynomial, rps_t, std::ostream, const std::string);
331  REGISTER(print_ratexp, rs_t, std::ostream, const std::string);
332  REGISTER(print_weight, ws_t, std::ostream, const std::string);
333  REGISTER(proper, aut_t, direction, bool);
334  REGISTER(push_weights, aut_t);
335  REGISTER(random, ctx_t, unsigned, float, unsigned, unsigned);
336  REGISTER(read_label, std::istream, ctx_t);
337  REGISTER(read_polynomial, ctx_t, std::istream);
338  REGISTER(read_weight, ctx_t, std::istream);
339  REGISTER(right_mult, aut_t, ws_t);
340  REGISTER(right_mult_ratexp, rs_t, ws_t);
341  REGISTER(sort, aut_t);
342  REGISTER(split, rs_t);
343  REGISTER(standard, aut_t);
344  REGISTER(standard_ratexp, rs_t);
345  REGISTER(star, aut_t);
346  REGISTER(star_height, rs_t);
347  REGISTER(star_normal_form, rs_t);
348  REGISTER(sum, aut_t, aut_t);
349  REGISTER(sum_ratexp, rs_t, rs_t);
350  REGISTER(sum_weight, ws_t, ws_t);
351  REGISTER(thompson, rs_t);
352  REGISTER(tikz, aut_t, std::ostream);
353  REGISTER(to_expansion, rs_t);
354  REGISTER(to_expression, aut_t, const std::string);
355  REGISTER(transpose, aut_t);
356  REGISTER(transpose_ratexp, rs_t);
358  REGISTER(trim, aut_t);
359  REGISTER(union_a, aut_t, aut_t);
360 
361  register_functions_is_free<ctx_t>(std::integral_constant<bool, ctx_t::labelset_t::is_free()>());
362 
363  return register_kind_functions<ctx_t>(typename ctx_t::kind_t());
364  }
365  }
366  }
367 
368 # undef REGISTER
369 
370 # if VCSN_INSTANTIATION
371 # define VCSN_CTX_INSTANTIATE_2(Ctx) \
372  namespace ctx \
373  { \
374  namespace detail \
375  { \
376  static bool registered = register_functions<Ctx>(); \
377  } \
378  }
379 # else
380 # define VCSN_CTX_INSTANTIATE_2(Ctx)
381 # endif
382 
383 # define VCSN_CTX_INSTANTIATE(Ctx) \
384  /* VCSN_CTX_INSTANTIATE_1(Ctx);*/ \
385  VCSN_CTX_INSTANTIATE_2(Ctx)
386 
387 # ifndef MAYBE_EXTERN
388 # define MAYBE_EXTERN extern
389 # endif
390 
391 }
392 
393 #endif // !VCSN_CTX_INSTANTIATE_HH
std::enable_if< std::is_same< weightset_t_of< Aut >, b >::value &&labelset_t_of< Aut >::is_free(), partition_automaton< Aut > >::type minimize(const Aut &a, const std::string &algo)
Definition: minimize.hh:31
filter_automaton< Aut > coaccessible(const Aut &a)
Definition: accessible.hh:134
labelset_t_of< Aut >::word_t synchronizing_word(const Aut &aut, const std::string &algo="greedy")
Linear combination of labels: map labels to weights.
Definition: fwd.hh:32
context make_word_context(const context &ctx)
RatExpSet::value_t to_expression(const Aut &a, const state_chooser_t< Aut > &next_state)
Aut eliminate_state(const Aut &aut, state_t_of< Aut > s)
A copy of automaton res without the state s.
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut.
bool is_ambiguous(const Aut &aut)
Definition: is-ambiguous.hh:41
auto power(const Aut &aut, unsigned n) -> typename Aut::element_type::automaton_nocv_t
Definition: product.hh:674
auto product(const Auts &...as) -> product_automaton< decltype(meet_automata(as...)), Auts...>
Build the (accessible part of the) product.
Definition: product.hh:445
ratexpset< Context > make_ratexpset(const Context &ctx, rat::identities identities)
Shorthand to ratexpset constructor.
Definition: ratexpset.hh:471
mutable_automaton< Ctx > random(const Ctx &ctx, unsigned num_states, float density=0.1, unsigned num_initial=1, unsigned num_final=1)
Definition: random.hh:86
detail::enumerater< Automaton >::polynomial_t shortest(const Automaton &aut, unsigned num)
Definition: enumerate.hh:141
Aut thompson(const context_t_of< Aut > &ctx, const RatExpSet &rs, const typename RatExpSet::value_t &r)
Build a Thompson automaton from a ratexp.
Definition: thompson.hh:170
std::ostream & info(const A &aut, std::ostream &out, bool detailed=false)
Definition: info.hh:218
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
Definition: traits.hh:34
std::ostream & list_polynomial(const polynomial &polynomial, std::ostream &o)
Bridge.
Definition: print.hh:126
auto concatenate(const A &lhs, const B &rhs) -> decltype(join_automata(lhs, rhs))
Concatenate two standard automata.
Definition: concatenate.hh:99
bool is_trim(const Aut &a)
Definition: accessible.hh:151
std::ostream & print_polynomial(const polynomial &polynomial, std::ostream &o, const std::string &format)
Bridge.
Definition: print.hh:148
bool is_useless(const Aut &a)
Definition: accessible.hh:157
std::ostream & print_ctx(const context &ctx, std::ostream &o, const std::string &format)
Bridge.
Definition: print.hh:29
bool is_standard(const Aut &a)
Whether a is standard.
Definition: standard.hh:27
auto proper(const Aut &aut, direction dir=direction::backward, bool prune=true) -> mutable_automaton< decltype(proper_context(copy(aut) ->context()))>
Eliminate spontaneous transitions.
Definition: proper.hh:613
std::ostream & print_weight(const weight &weight, std::ostream &o, const std::string &format)
Bridge.
Definition: print.hh:219
detail::enumerater< Automaton >::polynomial_t enumerate(const Automaton &aut, unsigned max)
Definition: enumerate.hh:132
std::ostream & efsm(const Aut &aut, std::ostream &out)
Format automaton to EFSM format, based on FSM format.
Definition: efsm.hh:301
RatExpSet::value_t star_normal_form(const RatExpSet &rs, const typename RatExpSet::value_t &e)
Star_Normal_Forming a typed ratexp shared_ptr.
weight multiply_weight(const weight &lhs, const weight &rhs)
Bridge.
Definition: concatenate.hh:345
pair_automaton< Aut > pair(const Aut &aut, bool keep_initials=false)
Definition: pair.hh:214
ratexp transpose_ratexp(const ratexp &exp)
Bridge.
Definition: transpose.hh:272
bool are_isomorphic(const Aut1 &a1, const Aut2 &a2)
rat::expansionset< RatExpSet >::value_t to_expansion(const RatExpSet &rs, const typename RatExpSet::value_t &e)
First order expansion.
std::shared_ptr< detail::mutable_automaton_impl< Context >> mutable_automaton
Definition: fwd.hh:25
ratexp complement_ratexp(const ratexp &exp)
Bridge.
Definition: complement.hh:89
RatExpSet::value_t expand(const RatExpSet &rs, const typename RatExpSet::value_t &e)
Expanding a typed ratexp shared_ptr.
Definition: expand.hh:152
bool register_kind_functions(labels_are_letters)
Definition: instantiate.hh:148
bool is_complete(const Aut &aut)
Whether aut is complete.
Definition: is-complete.hh:15
automaton standard_ratexp(const ratexp &exp)
Bridge.
Definition: standard.hh:394
bool is_valid(const Aut &aut)
Definition: is-valid.hh:138
std::ostream & print_expansion(const expansion &expansion, std::ostream &o, const std::string &format)
Bridge.
Definition: print.hh:63
std::ostream & tikz(const AutPtr &aut, std::ostream &out)
Print automaton to TikZ format.
Definition: tikz.hh:128
context context_of(const automaton &aut)
Bridge.
Definition: make-context.hh:68
bool is_proper(const Aut &aut)
Test whether an automaton is proper.
Definition: is-proper.hh:49
weight sum_weight(const weight &lhs, const weight &rhs)
Bridge.
Definition: sum.hh:173
auto read_weight(const Context &ctx, std::istream &is) -> weight_t_of< Context >
Definition: read.hh:90
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...
Definition: cerny.hh:25
AutOut copy(const AutIn &input, Pred keep_state)
A copy of input keeping only its states that are accepted by keep_state.
Definition: copy.hh:171
ratexp lift_ratexp(const ratexp &exp)
Bridge.
Definition: lift.hh:163
context context_of_ratexp(const ratexp &exp)
Bridge.
Definition: make-context.hh:80
auto sort(const Aut &a) -> permutation_automaton< Aut >
Definition: sort.hh:185
std::ostream & info_ratexp(const ratexp &exp, std::ostream &o)
Bridge.
Definition: info.hh:319
automaton lift_automaton(const automaton &aut)
Definition: lift.hh:119
typename law_traits< LabelSet >::type law_t
The smallest wordset that includes LabelSet.
Definition: labelset.hh:67
mutable_automaton< Context > double_ring(const Context &ctx, unsigned n, const std::vector< unsigned > &finals)
Definition: double-ring.hh:17
filter_automaton< Aut > trim(const Aut &a)
Definition: accessible.hh:141
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
Definition: traits.hh:38
auto standard(const Aut &aut) -> decltype(copy(aut))
Definition: standard.hh:120
unsigned star_height(const typename RatExpSet::value_t &e)
Star height of a ratexp.
Definition: star-height.hh:86
auto complete(const Aut &aut) -> decltype(::vcsn::copy(aut))
Definition: complete.hh:64
ATTRIBUTE_CONST bool is_eps_acyclic(const Aut &aut)
bool is_valid_ratexp(const ratexp &exp)
Bridge.
Aut::element_type::automaton_nocv_t right_mult(const Aut &aut, const weight_t_of< Aut > &w)
Definition: left-mult.hh:211
std::ostream & print_ratexp(const ratexp &exp, std::ostream &o, const std::string &format)
Bridge.
Definition: print.hh:184
auto push_weights(const Aut &aut) -> decltype(::vcsn::copy(aut))
The algorithm weight pushing.
Definition: push-weights.hh:53
bool is_empty(const Aut &a) ATTRIBUTE_PURE
Definition: accessible.hh:178
mutable_automaton< Ctx > random_deterministic(const Ctx &ctx, unsigned num_states)
Definition: random.hh:235
ratexp transposition_ratexp(const ratexp &exp)
Bridge.
Definition: transpose.hh:296
std::ostream & print_label(const label &label, std::ostream &o, const std::string &format)
Bridge.
Definition: print.hh:86
auto union_a(const A &lhs, const B &rhs) -> decltype(join_automata(lhs, rhs))
Union of two automata.
Definition: union.hh:33
std::enable_if< RatExpSet::context_t::labelset_t::is_free(), automaton >::type derived_term(const ratexp &exp, const std::string &algo)
Bridge.
Provide a variadic mul on top of a binary mul(), and one().
Definition: fwd.hh:36
auto read_polynomial(const Context &ctx, std::istream &is) -> typename polynomialset< Context >::value_t
Definition: read.hh:55
mutable_automaton< Context > de_bruijn(const Context &ctx, unsigned n)
Definition: de-bruijn.hh:18
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...
Definition: divkbaseb.hh:18
weight_t_of< RatExpSet > constant_term(const RatExpSet &rs, const typename RatExpSet::value_t &e)
Aut transpose(const transpose_automaton< Aut > &aut)
Definition: transpose.hh:230
#define REGISTER(Algo,...)
Definition: instantiate.hh:139
mutable_automaton< Context > u(const Context &ctx, unsigned n)
The Brzozowski universal witness.
Definition: u.hh:17
rat::ratexp_polynomial_t< RatExpSet > derivation(const RatExpSet &rs, const typename RatExpSet::value_t &e, label_t_of< RatExpSet > a, bool breaking=false)
Derive a ratexp wrt to a letter.
Definition: derivation.hh:201
ratexp conjunction_ratexp(const ratexp &lhs, const ratexp &rhs)
Bridge.
Definition: product.hh:755
direction
Orientation.
Definition: direction.hh:10
bool is_synchronized_by(const Aut &aut, const typename labelset_t_of< Aut >::word_t &w)
mutable_automaton< Context > ladybird(const Context &ctx, unsigned n)
Definition: ladybird.hh:16
rat::ratexp_polynomial_t< RatExpSet > split(const RatExpSet &rs, const typename RatExpSet::value_t &e)
Split a ratexp.
Definition: split.hh:257
auto infiltration(const Auts &...as) -> product_automaton< decltype(join_automata(as...)), Auts...>
The (accessible part of the) infiltration product.
Definition: product.hh:617
ratexp concatenate_ratexp(const ratexp &lhs, const ratexp &rhs)
Bridge.
Definition: concatenate.hh:222
identities
A ratexpset can implement several different sets of identities on expressions.
Definition: identities.hh:17
automaton_editor * make_automaton_editor(const context &ctx)
Bridge.
ratexp chain_ratexp(const ratexp &re, int min, int max)
Bridge.
Definition: concatenate.hh:284
bool register_functions_is_free(std::true_type)
Definition: instantiate.hh:155
filter_automaton< Aut > accessible(const Aut &a)
Definition: accessible.hh:127
bool is_synchronizing(const Aut &aut)
Aut chain(const Aut &aut, int min, int max)
Definition: concatenate.hh:135
auto read_label(std::istream &is, const Context &ctx) -> label_t_of< Context >
Definition: read.hh:21
std::ostream & dot(const Aut &aut, std::ostream &out, bool dot2tex=false)
Definition: dot.hh:344
auto eval(const Aut &a, const typename labelset_t_of< Aut >::word_t &w) -> weight_t_of< Aut >
Definition: eval.hh:85
ratexp right_mult_ratexp(const ratexp &exp, const weight &weight)
Bridge.
Definition: left-mult.hh:264
bool register_functions()
Definition: instantiate.hh:267
Ctx make_context(const std::string &name)
Definition: make-context.hh:22
AutOut left_mult(const weight_t_of< AutOut > &w, const AutIn &aut)
Definition: left-mult.hh:91
polynomial concatenate_polynomial(const polynomial &lhs, const polynomial &rhs)
Bridge.
Definition: concatenate.hh:308
ratexp difference_ratexp(const ratexp &lhs, const ratexp &rhs)
Bridge.
ratexp left_mult_ratexp(const weight &weight, const ratexp &exp)
Bridge.
Definition: left-mult.hh:179
bool is_out_sorted(const Aut &a)
Whether for each state, the outgoing transitions are sorted by increasing label.
Definition: sort.hh:31
bool is_normalized(const Aut &a)
Whether a is standard and co-standard.
Definition: normalize.hh:13
ratexp sum_ratexp(const ratexp &lhs, const ratexp &rhs)
Bridge.
Definition: sum.hh:146