19 template <Automaton Aut>
23 using automaton_t = Aut;
25 "complement: requires free labelset");
27 "complement: requires a deterministic automaton");
29 "complement: requires a complete automaton");
34 auto finals = std::set<state_t>{};
36 finals.insert(aut->src_of(t));
39 for (
auto s: aut->states())
46 template <Automaton Aut>
49 -> decltype(
copy(aut))
61 template <Automaton Aut>
65 const auto& a = aut->as<Aut>();
80 template <
typename ExpansionSet>
84 const auto& x = xpn->as<ExpansionSet>();
86 x.expansionset().complement(x.expansion()));
101 template <
typename ExpSet>
105 const auto& e = exp->as<ExpSet>();
107 e.expressionset().complement(e.expression()));
expression complement_expression(const expression &exp)
Bridge (complement).
expansion complement_expansion(const expansion &xpn)
Bridge (complement).
automaton make_automaton(const Aut &aut)
Build a dyn::automaton.
void require(Bool b, Args &&...args)
If b is not verified, raise an error with args as message.
std::shared_ptr< const detail::expansion_base > expansion
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut.
auto complement(const Aut &aut) -> decltype(copy(aut))
std::shared_ptr< detail::automaton_base > automaton
bool is_complete(const Aut &aut)
Whether aut is complete.
void complement_here(Aut &aut)
ATTRIBUTE_PURE bool has(const boost::container::flat_set< Key, Compare, Allocator > &s, const Key &e)
Whether e is member of s.
auto final_transitions(const Aut &aut) -> decltype(aut->all_in(aut->post()))
Indexes of transitions from (visible) final states.
std::shared_ptr< detail::expression_base > expression
expansion make_expansion(const ExpansionSet &ps, const typename ExpansionSet::value_t &expansion)
expression make_expression(const ExpSet &rs, const typename ExpSet::value_t &r)
automaton complement(const automaton &aut)
Bridge.
auto copy(const AutIn &input, KeepState keep_state, KeepTrans keep_trans) -> decltype(keep_state(input->null_state()), keep_trans(input->null_transition()), make_fresh_automaton< AutIn, AutOut >(input))
A copy of input keeping only its states that are accepted by keep_state, and transitions accepted by ...