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>();
85 return {x.valueset(), x.valueset().complement(x.value())};
100 template <
typename ExpSet>
104 const auto& e = exp->as<ExpSet>();
105 return {e.valueset(),
106 e.valueset().complement(e.value())};
bool is_complete(const Aut &aut)
Whether aut is complete.
void complement_here(Aut &aut)
typename detail::labelset_t_of_impl< base_t< ValueSet >>::type labelset_t_of
void require(Bool b, Args &&...args)
If b is not verified, raise an error with args as message.
ATTRIBUTE_PURE bool has(const boost::container::flat_set< Key, Compare, Allocator > &s, const Key &e)
Whether e is member of s.
bool is_deterministic(const Aut &aut, state_t_of< Aut > s)
Whether state s is deterministic in aut.
typename detail::state_t_of_impl< base_t< ValueSet >>::type state_t_of
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 ...
expansion complement_expansion(const expansion &xpn)
Bridge (complement).
value_impl< detail::expansion_tag > expansion
automaton complement(const automaton &aut)
Bridge.
auto & as()
Extract wrapped typed value.
auto & as()
Extract wrapped typed automaton.
expression complement_expression(const expression &exp)
Bridge (complement).
value_impl< detail::expression_tag > expression
auto final_transitions(const Aut &aut) -> decltype(aut->all_in(aut->post()))
Indexes of transitions from (visible) final states.
auto complement(const Aut &aut) -> decltype(copy(aut))