Vcsn  2.2
Be Rational
lal_char_b.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vcsn/ctx/context.hh>
4 #include <vcsn/ctx/lal_char.hh>
5 #include <vcsn/weightset/b.hh>
6 
7 namespace vcsn
8 {
9  namespace ctx
10  {
12  }
13 }
14 
16 #include <vcsn/algos/complement.hh>
18 #include <vcsn/algos/universal.hh>
19 #include <vcsn/ctx/instantiate.hh>
20 #include <vcsn/misc/attributes.hh>
21 #include <vcsn/misc/name.hh>
22 
23 namespace vcsn
24 {
26 #if 0
27  MAYBE_EXTERN template
28  auto
29  determinize(const mutable_automaton<ctx::lal_char_b>& aut)
30  -> mutable_automaton<ctx::lal_char_b>;
31 
32  /* fado. */
33  MAYBE_EXTERN template
34  std::ostream& fado<mutable_automaton<ctx::lal_char_b>>
35  (const mutable_automaton<ctx::lal_char_b>& aut, std::ostream& out);
36 
37  MAYBE_EXTERN template
38  std::ostream&
39  fado<vcsn::detail::transpose_automaton<mutable_automaton<ctx::lal_char_b>>>
40  (const vcsn::detail::transpose_automaton<mutable_automaton<ctx::lal_char_b>>& aut,
41  std::ostream& out);
42 
43  /* grail. */
44  MAYBE_EXTERN template
45  std::ostream& grail<mutable_automaton<ctx::lal_char_b>>
46  (const mutable_automaton<ctx::lal_char_b>& aut, std::ostream& out);
47 
48  MAYBE_EXTERN template
49  std::ostream&
50  grail<vcsn::detail::transpose_automaton<mutable_automaton<ctx::lal_char_b>>>
51  (const vcsn::detail::transpose_automaton<mutable_automaton<ctx::lal_char_b>>& aut,
52  std::ostream& out);
53 #endif
54 
55 #if VCSN_INSTANTIATION
56  namespace ctx
57  {
58  namespace detail
59  {
60  template <typename Ctx>
61  bool
62  register_b_functions()
63  {
64  using ctx_t = Ctx;
65  using aut_t = mutable_automaton<ctx_t>;
66  using rs_t = expressionset<ctx_t>;
67 
68 # define REGISTER(Algo, ...) \
69  Algo ## _register(ssignature<__VA_ARGS__>(), dyn::detail::Algo<__VA_ARGS__>)
70 
71  REGISTER(are_equivalent, aut_t, aut_t);
72  REGISTER(complement, aut_t);
74  REGISTER(universal, aut_t);
75 # undef REGISTER
76 
77  return true;
78  }
79 
80  static bool register_lal_char_b ATTRIBUTE_USED
81  = register_b_functions<ctx::lal_char_b>();
82  }
83  }
84 #endif // ! VCSN_INSTANTIATION
85 }
VCSN_CTX_INSTANTIATE(ctx::lal_char_b)
auto are_equivalent(const Aut1 &a1, const Aut2 &a2) -> std::enable_if_t<(std::is_same< weightset_t_of< Aut1 >, b >::value &&std::is_same< weightset_t_of< Aut2 >, b >::value), bool >
Check equivalence between Boolean automata on a free labelset.
Definition: a-star.hh:8
#define REGISTER(Algo,...)
Definition: instantiate.hh:134
Aut universal(const Aut &a)
Definition: universal.hh:136
auto determinize(const Aut &a, Tag={}, bool_constant< Lazy >={})
Definition: determinize.hh:246
auto out(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions leaving state s.
Definition: automaton.hh:56
context< lal_char, b > lal_char_b
Definition: lal_char_b.hh:11
#define MAYBE_EXTERN
Definition: instantiate.hh:400
ExpSet::value_t star_normal_form(const ExpSet &rs, const typename ExpSet::value_t &e)
Star-normal form of an expression.
static dyn::context ctx(const driver &d)
Get the context of the driver.
Definition: parse.cc:82