5 #include <vcsn/dyn/fwd.hh>
20 template <Automaton Aut>
24 "fado: requires letter or nullable labels");
26 "fado: requires Boolean weights");
37 using super_t::super_t;
45 os_ << (is_deter ?
"@DFA" :
"@NFA");
56 template <Automaton A>
57 std::enable_if_t<labelset_t_of<A>::is_free(),
bool>
63 template <Automaton A>
64 std::enable_if_t<!labelset_t_of<A>::is_free(),
bool>
75 template <Automaton Aut>
77 fado(
const Aut& aut, std::ostream&
out = std::cout)
97 template <Automaton Aut>
101 "grail: requires letter or nullable labels");
103 "grail: requires Boolean weights");
117 using super_t::super_t;
124 const char* sep =
"";
136 aut_->print_state(s,
os_) <<
" -| (FINAL)";
145 template <Automaton Aut>
Factor common bits in automaton formatting.
void print_transitions_()
Output transitions, sorted lexicographically.
Format an automaton into Fado.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
states_t initials_()
The list of initial states, sorted.
void operator()()
Actually output aut_ on os_.
auto out(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions leaving state s.
std::enable_if_t< labelset_t_of< A >::is_free(), bool > is_deterministic_(const A &a)
states_t finals_()
The list of final states, sorted.
void list_states_(const states_t &ss)
List names of states in ss, preceded by ' '.
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut.
Print an automaton in Fado format.
std::ostream & grail(const Aut &aut, std::ostream &out)
Print automaton in Grail format.
transition_t_of< automaton_t > transition_t
state_t_of< automaton_t > state_t
void operator()()
Actually output aut_ on os_.
std::ostream & os_
Output stream.
std::ostream & fado(const Aut &aut, std::ostream &out=std::cout)
Format automaton to FAdo format.
std::enable_if_t<!labelset_t_of< A >::is_free(), bool > is_deterministic_(const A &)
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
automaton_t aut_
The automaton we have to output.
Provide a variadic mul on top of a binary mul(), and one().