17 template <Automaton Aut>
21 "has_bounded_lag: automaton labelset must be a tupleset");
25 static_assert(2 <= number_of_tapes,
26 "has_bounded_lag: transducer labelset must have"
29 using automaton_t = Aut;
32 using label_t =
typename labelset_t::value_t;
42 using visited_t = std::vector<visit_state>;
45 template <std::size_t... I>
51 using delay_t = std::array<int, number_of_tapes - 1>;
62 template <std::
size_t I>
63 static int get_size_tape(label_t l)
65 using tape_labelset_t =
typename labelset_t::template valueset_t<I>;
70 template <std::size_t... I>
71 void add_delay(delay_t& d, transition_t tr, seq<I...>)
73 label_t l = aut_->label_of(tr);
74 int i0 = get_size_tape<0>(l);
75 d = {(d[I] + i0 - get_size_tape<I + 1>(l))...};
78 void add_delay(delay_t& d, transition_t tr)
80 add_delay(d, tr, delay_index_t{});
87 for (
auto tr :
all_out(aut_, src))
89 state_t dst = aut_->dst_of(tr);
108 transition_t t = p_[src];
111 while (aut_->src_of(t) != dst)
114 t = p_[aut_->src_of(t)];
149 template <Automaton Aut>
153 return blc.has_bounded_lag();
161 template <Automaton Aut>
size_t states_size(const Aut &aut)
The largest state number, plus one.
auto all_out(const Aut &aut, state_t_of< Aut > s)
Indexes of transitions leaving state s.
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
typename detail::transition_t_of_impl< base_t< ValueSet >>::type transition_t_of
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
bool has_bounded_lag(const automaton &aut)
Bridge.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
std::vector< transition_t_of< Aut >> predecessors_t_of
A state-indexed vector of predecessor transitions from the path path.
size_t size(const ExpSet &rs, const typename ExpSet::value_t &r)
auto & as()
Extract wrapped typed automaton.
bool has_bounded_lag(const Aut &aut)
Whether a transducer has a bounded lag.