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"
32 using label_t =
typename labelset_t::value_t;
45 template <std::size_t... I>
51 using delay_t = std::array<int, number_of_tapes - 1>;
62 template <std::
size_t I>
65 using tape_labelset_t =
typename labelset_t::template valueset_t<I>;
70 template <std::size_t... I>
74 int i0 = get_size_tape<0>(l);
75 d = {(d[I] + i0 - get_size_tape<I + 1>(l))...};
111 while (
aut_->src_of(t) != dst)
149 template <Automaton Aut>
161 template <Automaton Aut>
labelset_t_of< automaton_t > labelset_t
bool has_bounded_lag(state_t src)
Depth-first search.
state_t_of< automaton_t > state_t
typename labelset_t::value_t label_t
std::array< int, number_of_tapes-1 > delay_t
The delay associated with each state.
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
size_t states_size(const Aut &aut)
The largest state number, plus one.
void add_delay(delay_t &d, transition_t tr, seq< I... >)
Add the delay from the transition's label to the given delay.
transition_t_of< automaton_t > transition_t
predecessors_t_of< automaton_t > p_
size_t size(const ExpSet &rs, const typename ExpSet::value_t &r)
auto all_out(const Aut &aut, state_t_of< Aut > s)
Indexes of transitions leaving state s.
bool has_bounded_lag(const Aut &aut)
Whether a transducer has a bounded lag.
bounded_lag_checker(const automaton_t &aut)
The vectors are indexed by the state number.
std::vector< visit_state > visited_t
Keep track of what states we have visited or are visiting.
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
static int get_size_tape(label_t l)
Get the size (number of letters) of a label on a specific tape.
typename detail::transition_t_of_impl< base_t< ValueSet >>::type transition_t_of
static constexpr size_t number_of_tapes
std::vector< transition_t_of< Aut >> predecessors_t_of
A state-indexed vector of predecessor transitions from the path path.
auto & as()
Extract wrapped typed automaton.
typename detail::context_t_of_impl< base_t< ValueSet >>::type context_t_of
bool has_bounded_lag(const automaton &aut)
Bridge.
void add_delay(delay_t &d, transition_t tr)