7 #include <vcsn/dyn/fwd.hh>
20 template <Automaton Aut>
26 std::declval<automaton_t>()));
45 for (
const auto& o:
conj_->origins())
46 if (std::get<0>(o.second) != std::get<1>(o.second)
58 "ambiguous_word: automaton is unambiguous, "
59 "or has not been tested, for ambiguity");
65 assert(!p1.empty() || !p2.empty()
66 || !
"ambiguous_word: did not find an ambiguous word");
67 return ls.mul(p1.empty() ? ls.one() : p1.begin()->first,
68 p2.empty() ? ls.one() : p2.begin()->first);
84 template <Automaton Aut>
96 template <Automaton Aut>
109 template <Automaton Aut>
122 template <Automaton Aut>
126 const auto& a = aut->
as<Aut>();
140 template <Automaton Aut>
147 if (coms.size() == 1)
149 for (
const auto &c : coms)
161 template <Automaton Aut>
167 const auto& origins = prod->origins();
172 for (
const auto& c : coms)
178 auto p = origins.at(s);
179 if (std::get<0>(p) == std::get<1>(p))
195 template <Automaton Aut>
199 const auto& a = aut->
as<Aut>();
bool is_ambiguous(const automaton &aut)
Bridge.
fresh_automaton_t_of< Aut > aut_of_component(const detail::component_t< Aut > &com, const Aut &aut)
Generate a subautomaton corresponding to an SCC.
bool is_cycle_ambiguous_scc(const Aut &aut)
Whether aut is cycle-ambiguous.
void require(Bool b, Args &&...args)
If b is not verified, raise an error with args as message.
word_t_of< automaton_t > word_t
bool is_cycle_ambiguous(const automaton &aut)
Whether the automaton is cycle-ambiguous.
automaton conjunction(const automaton &lhs, const automaton &rhs, bool lazy=false)
The conjunction (aka synchronized product) of automata.
bool is_ambiguous(const Aut &aut)
Whether an automaton is ambiguous.
detail::enumerater< Aut >::polynomial_t shortest(const Aut &aut, boost::optional< unsigned > num={}, boost::optional< unsigned > len={})
The approximated behavior of an automaton.
word_t_of< Aut > ambiguous_word(const Aut &aut)
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
typename labelset_t_of< base_t< ValueSet >>::word_t word_t_of
is_ambiguous_impl(const automaton_t &aut)
Constructor.
conjunction_t conj_
The self-conjunction of the input automaton.
decltype(conjunction(std::declval< automaton_t >(), std::declval< automaton_t >())) conjunction_t
states_t< Aut > coaccessible_states(const Aut &a, bool strict=true)
The set of coaccessible states, including post(), and possibly pre().
filter_automaton< Aut > coaccessible(const Aut &a)
Coaccessible part of an automaton.
value_impl< detail::label_tag > label
state_t_of< conjunction_t > witness_
State index in the conjunction of a state that is not on the diagonal.
ATTRIBUTE_PURE bool has(const boost::container::flat_set< Key, Compare, Allocator > &s, const Key &e)
Whether e is member of s.
bool operator()()
Whether an automaton is ambiguous.
auto & as()
Extract wrapped typed automaton.
bool is_cycle_ambiguous(const automaton &aut)
Bridge.
auto conjunction(const Aut &a, const Auts &...as)
Build the (accessible part of the) conjunction.
Whether an automaton is ambiguous.
law_t< LabelSet > make_wordset(const LabelSet &ls)
The wordset of a labelset.
label ambiguous_word(const automaton &aut)
Bridge.
const detail::components_t< Aut > strong_components(const Aut &aut, Tag={})
Find all strongly connected components of aut.