18 template <
typename Aut>
22 using automaton_t = Aut;
24 "complement: requires free labelset");
26 "complement: requires a deterministic automaton");
28 "complement: requires a complete automaton");
33 std::set<state_t> finals;
34 for (
auto t: aut->final_transitions())
35 finals.insert(aut->src_of(t));
38 for (
auto s: aut->states())
45 template <
typename Aut>
48 -> decltype(
copy(aut))
60 template <
typename Aut>
64 const auto& a = aut->as<Aut>();
79 template <
typename ExpSet>
83 const auto& e = exp->as<ExpSet>();
86 e.expressionset().complement(e.expression()));
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
automaton complement(const automaton &aut)
Bridge.
automaton make_automaton(const Aut &aut)
Build a dyn::automaton.
AutOut copy(const AutIn &input, KeepState keep_state, KeepTrans keep_trans)
A copy of input keeping only its states that are accepted by keep_state.
bool is_complete(const Aut &aut)
Whether aut is complete.
std::shared_ptr< detail::automaton_base > automaton
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
void complement_here(Aut &aut)
void require(bool b, Args &&...args)
If b is not verified, raise an error with args as message.
expression make_expression(const ExpSet &rs, const typename ExpSet::value_t &r)
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut.
ATTRIBUTE_PURE bool has(const std::deque< T, Allocator > &s, const T &e)
Whether e is member of s.
auto complement(const Aut &aut) -> decltype(copy(aut))
std::shared_ptr< detail::expression_base > expression
expression complement_expression(const expression &exp)
Bridge (complement).