5 #include <vcsn/dyn/fwd.hh>
20 template <Automaton Aut>
25 "fado: requires tuple, letter or nullable labels");
27 "fado: requires Boolean weights");
40 using super_t::super_t;
60 template <
typename LS>
61 void print_label_(
const LS& ls,
const typename LS::value_t& l)
const
70 template <
typename Label>
77 template <
typename Label>
94 template <Automaton A>
95 std::enable_if_t<labelset_t_of<A>::is_free(),
bool>
101 template <Automaton A>
102 std::enable_if_t<!labelset_t_of<A>::is_free(),
bool>
113 template <Automaton Aut>
115 fado(
const Aut& aut, std::ostream&
out = std::cout)
135 template <Automaton Aut>
139 "grail: requires letter or nullable labels");
141 "grail: requires Boolean weights");
155 using super_t::super_t;
162 const char* sep =
"";
174 aut_->print_state(s,
os_) <<
" -| (FINAL)";
183 template <Automaton Aut>
state_t_of< automaton_t > state_t
std::ostream & grail(const Aut &aut, std::ostream &out)
Print automaton in Grail format.
Print as is. For instance, don't try to escape labels.
void operator()()
Actually output aut_ on os_.
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut.
void print_label_(const Label &l, std::true_type) const
Two-tape automaton.
transition_t_of< automaton_t > transition_t
std::ostream & os_
Output stream.
Provide a variadic mul on top of a binary mul(), and one().
const is_transducer_t is_transducer_
std::enable_if_t<!labelset_t_of< A >::is_free(), bool > is_deterministic_(const A &)
void print_transitions_()
Output transitions, sorted lexicographically.
auto out(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions leaving state s.
Factor common bits in automaton formatting.
std::enable_if_t< labelset_t_of< A >::is_free(), bool > is_deterministic_(const A &a)
void list_states_(const states_t &ss)
List names of states in ss, preceded by ' '.
Print an automaton in Fado format.
void print_label_(const LS &ls, const typename LS::value_t &l) const
std::ostream & fado(const Aut &aut, std::ostream &out=std::cout)
Format automaton to FAdo format.
automaton_t aut_
The automaton we have to output.
void print_label_(const Label &l, std::false_type) const
Acceptor.
states_t initials_()
The list of initial states, sorted.
typename detail::weightset_t_of_impl< base_t< ValueSet >>::type weightset_t_of
void print_transition_(const transition_t t) const override
Output the transition t.
states_t finals_()
The list of final states, sorted.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
Format an automaton into FAdo.
void operator()()
Actually output aut_ on os_.
const labelset_t_of< automaton_t > & ls_
Short-hand to the labelset.