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