3 #include <unordered_map>
5 #include <boost/optional.hpp>
19 template <Automaton Aut>
28 boost::optional<label_t>
label = {})
36 for (
auto s :
aut_->states())
46 auto it =
tag_.find(s);
103 std::unordered_map<state_t, status>
tag_;
113 template <Automaton Aut>
115 std::enable_if_t<context_t_of<Aut>::has_one(),
bool>
122 template <Automaton Aut>
124 std::enable_if_t<!context_t_of<Aut>::has_one(),
bool>
130 template <Automaton Aut>
144 template <Automaton Aut>
is_acyclic_impl(const automaton_t &aut, boost::optional< label_t > label={})
#define BUILTIN_UNREACHABLE()
bool has_circuit_(state_t s)
Return true if an circuit is accessible from s.
bool is_eps_acyclic(const automaton &aut)
Bridge.
state_t_of< automaton_t > state_t
boost::optional< label_t > one_
auto out(const Aut &aut, state_t_of< Aut > s)
Indexes of visible transitions leaving state s.
bool operator()()
Whether the automaton is acyclic.
ATTRIBUTE_CONST bool is_acyclic(const Aut &aut)
There is no circuit accessible from s.
The graph reachable from s is under exploration.
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
value_impl< detail::label_tag > label
ATTRIBUTE_CONST std::enable_if_t< context_t_of< Aut >::has_one(), bool > is_eps_acyclic(const Aut &aut)
Detect epsilon-circuits.
typename detail::label_t_of_impl< base_t< ValueSet >>::type label_t_of
std::unordered_map< state_t, status > tag_
std::remove_cv_t< Aut > automaton_t
label_t_of< automaton_t > label_t
auto & as()
Extract wrapped typed automaton.
There is an circuit accessible from s.